Address Contract Partially Verified
Address
0xf03E8FE4D5733D562C491825f1c975Bd9bA90455
Balance
0 ETH
Nonce
1
Code Size
12556 bytes
Creator
0xd2881085...Af5b at tx 0xfced4cd7...3147de
Indexed Transactions
0
Contract Bytecode
12556 bytes
0x60806040526004361061031d5760003560e01c8063715018a6116101ab578063c87b56dd116100f7578063e8a3d48511610095578063f07c2c9f1161006f578063f07c2c9f146109d7578063f1763ebf146109ed578063f2fde38b14610a0d578063fa9a309d14610a2d57600080fd5b8063e8a3d48514610963578063e985e9c514610978578063ebf0c717146109c157600080fd5b8063d5507007116100d1578063d550700714610906578063d6e7b8e41461091b578063dbceb00514610930578063e0fa65591461094357600080fd5b8063c87b56dd146108b1578063d03be3ec146108d1578063d1df402a146108e657600080fd5b8063a1d8bd7e11610164578063b1c9fe6e1161013e578063b1c9fe6e14610847578063b4ed16b31461085c578063b88d4fde14610871578063b8a20ed01461089157600080fd5b8063a1d8bd7e146107ef578063a22cb4651461080f578063b187bd261461082f57600080fd5b8063715018a61461075f57806383197ef01461077457806385aa9436146107895780638da5cb5b1461079c578063938e3d7b146107ba57806395d89b41146107da57600080fd5b806342842e0e1161026a5780636352211e116102235780636e17f797116101fd5780636e17f797146106ea5780636f8b44b01461070a57806370a082311461072a578063714c53981461074a57600080fd5b80636352211e1461067e57806369473f891461069e5780636c21fb00146106b457600080fd5b806342842e0e146105d357806342966c68146105f35780634c0f38c2146106135780634f0a23091461062857806351524e5b1461063e57806355f804b31461065e57600080fd5b8063088a4ed0116102d7578063239c70ae116102b1578063239c70ae1461055b57806323b872dd1461057157806341dcf4541461059157806341f43434146105b157600080fd5b8063088a4ed0146104f8578063095ea7b31461051857806318160ddd1461053857600080fd5b8062621fda1461041257806301ffc9a71461044857806302329a291461047857806306af73121461049857806306fdde03146104ab578063081812fc146104c057600080fd5b3661040d5760006064601a543461033491906126c0565b61033e91906126d7565b601e546040519192506001600160a01b03169082156108fc029083906000818181858888f19350505050158015610379573d6000803e3d6000fd5b5060006064601b543461038c91906126c0565b61039691906126d7565b601f546040519192506001600160a01b03169082156108fc029083906000818181858888f193505050501580156103d1573d6000803e3d6000fd5b506020546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505015801561040b573d6000803e3d6000fd5b005b600080fd5b34801561041e57600080fd5b5061043261042d3660046126f9565b610a4d565b60405161043f9190612762565b60405180910390f35b34801561045457600080fd5b5061046861046336600461278b565b610a84565b604051901515815260200161043f565b34801561048457600080fd5b5061040b6104933660046127b6565b610ad6565b61040b6104a63660046128bc565b610af1565b3480156104b757600080fd5b50610432610d49565b3480156104cc57600080fd5b506104e06104db3660046126f9565b610ddb565b6040516001600160a01b03909116815260200161043f565b34801561050457600080fd5b5061040b6105133660046126f9565b610e1f565b34801561052457600080fd5b5061040b610533366004612914565b610e2c565b34801561054457600080fd5b5061054d610e45565b60405190815260200161043f565b34801561056757600080fd5b5061054d600e5481565b34801561057d57600080fd5b5061040b61058c366004612940565b610e53565b34801561059d57600080fd5b506104326105ac3660046129f8565b610e7e565b3480156105bd57600080fd5b506104e06daaeb6d7670e522a718067333cd4e81565b3480156105df57600080fd5b5061040b6105ee366004612940565b610f05565b3480156105ff57600080fd5b5061040b61060e3660046126f9565b610f2a565b34801561061f57600080fd5b50600d5461054d565b34801561063457600080fd5b5061054d600f5481565b34801561064a57600080fd5b5061040b610659366004612a3e565b610fab565b34801561066a57600080fd5b5061040b610679366004612af5565b611145565b34801561068a57600080fd5b506104e06106993660046126f9565b61115d565b3480156106aa57600080fd5b5061054d60175481565b3480156106c057600080fd5b5061054d6106cf366004612b29565b6001600160a01b031660009081526016602052604090205490565b3480156106f657600080fd5b5061040b6107053660046126f9565b61116f565b34801561071657600080fd5b5061040b6107253660046126f9565b61117c565b34801561073657600080fd5b5061054d610745366004612b29565b611189565b34801561075657600080fd5b506104326111d7565b34801561076b57600080fd5b5061040b6111e6565b34801561078057600080fd5b5061040b6111fa565b61040b610797366004612b46565b61127a565b3480156107a857600080fd5b506009546001600160a01b03166104e0565b3480156107c657600080fd5b5061040b6107d5366004612af5565b61143b565b3480156107e657600080fd5b5061043261144f565b3480156107fb57600080fd5b5061054d61080a366004612914565b61145e565b34801561081b57600080fd5b5061040b61082a366004612b76565b61148f565b34801561083b57600080fd5b5060105460ff16610468565b34801561085357600080fd5b5061054d6114a3565b34801561086857600080fd5b5061054d6114e9565b34801561087d57600080fd5b5061040b61088c366004612ba4565b611502565b34801561089d57600080fd5b506104686108ac366004612c23565b61152f565b3480156108bd57600080fd5b506104326108cc3660046126f9565b611545565b3480156108dd57600080fd5b5060175461054d565b3480156108f257600080fd5b5061040b610901366004612c67565b611612565b34801561091257600080fd5b5061054d611742565b34801561092757600080fd5b50600e5461054d565b61040b61093e3660046126f9565b61177f565b34801561094f57600080fd5b5061040b61095e3660046126f9565b611843565b34801561096f57600080fd5b50610432611850565b34801561098457600080fd5b50610468610993366004612c93565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b3480156109cd57600080fd5b5061054d60235481565b3480156109e357600080fd5b5061054d60185481565b3480156109f957600080fd5b5061040b610a083660046126f9565b61185f565b348015610a1957600080fd5b5061040b610a28366004612b29565b61186c565b348015610a3957600080fd5b5061054d610a483660046126f9565b6118e2565b6060600a610a5a83611903565b600b604051602001610a6e93929190612d6e565b6040516020818303038152906040529050919050565b60006001600160e01b031982166380ac58cd60e01b1480610ab557506001600160e01b03198216635b5e139f60e01b145b80610ad057506301ffc9a760e01b6001600160e01b03198316145b92915050565b610ade611995565b6010805460ff1916911515919091179055565b610af96114a3565b15610b4b5760405162461bcd60e51b815260206004820152601860248201527f4d696e7420576169744c697374206465736174697661646f000000000000000060448201526064015b60405180910390fd5b60105460ff1615610b6e5760405162461bcd60e51b8152600401610b4290612da1565b6000610b78610e45565b905060008411610bca5760405162461bcd60e51b815260206004820152601f60248201527f50726563697361206d696e7461722070656c6f206d656e6f732031204e4654006044820152606401610b42565b600f54610bd684611189565b610be09086612dcd565b1115610bfe5760405162461bcd60e51b8152600401610b4290612de0565b600d54610c0b8583612dcd565b1115610c295760405162461bcd60e51b8152600401610b4290612e2f565b6040516bffffffffffffffffffffffff19606085901b166020820152610c699083906034016040516020818303038152906040528051906020012061152f565b610cb55760405162461bcd60e51b815260206004820152601960248201527f566f6365206e616f2065737461206e6120576169744c697374000000000000006044820152606401610b42565b610cbe8461177f565b6000610cc8610e45565b600d54610cd59190612e70565b905060015b858111610d3f57610cec8560016119ef565b6000610cf9846001612dcd565b9050610d0481611545565b50610d0e83612e83565b6001600160a01b03871660009081526016602052604090208390559250819050610d3781612e9a565b915050610cda565b5060125550505050565b606060038054610d5890612cc1565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8490612cc1565b8015610dd15780601f10610da657610100808354040283529160200191610dd1565b820191906000526020600020905b815481529060010190602001808311610db457829003601f168201915b5050505050905090565b6000610de682611a09565b610e03576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b610e27611995565b600e55565b81610e3681611a42565b610e408383611afb565b505050565b600254600154036000190190565b826001600160a01b0381163314610e6d57610e6d33611a42565b610e78848484611b83565b50505050565b6060610e8983611a09565b610ea657604051630a14c4b560e41b815260040160405180910390fd5b6000610eb06111d7565b90508051600003610ed05760405180602001604052806000815250610efd565b80610eda85611903565b84604051602001610eed93929190612eb3565b6040516020818303038152906040525b949350505050565b826001600160a01b0381163314610f1f57610f1f33611a42565b610e78848484611b8e565b33610f348261115d565b6001600160a01b03161480610f5357506014546001600160a01b031633145b610f9f5760405162461bcd60e51b815260206004820152601b60248201527f596f752063616e2774207265766f6b65207468697320746f6b656e00000000006044820152606401610b42565b610fa881611ba9565b50565b610fb3611995565b60105460ff1615610fd65760405162461bcd60e51b8152600401610b4290612da1565b805182511461101c5760405162461bcd60e51b81526020600482015260126024820152714d617472697a657320696e76616c6964617360701b6044820152606401610b42565b81516001600160401b03811115611035576110356127e8565b60405190808252806020026020018201604052801561105e578160200160208202803683370190505b50805161107391602291602090910190612634565b50600061107e610e45565b600d5461108b9190612e70565b905060005b8351811015610e785760006110a3610e45565b90506110c98583815181106110ba576110ba612ef6565b602002602001015160016119ef565b60006110d6826001612dcd565b90506110e181611545565b506110eb84612e83565b9350826016600088868151811061110457611104612ef6565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055505050808061113d90612e9a565b915050611090565b61114d611995565b600a6111598282612f5a565b5050565b600061116882611bb4565b5192915050565b611177611995565b601755565b611184611995565b600d55565b60006001600160a01b0382166111b2576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6060600a8054610d5890612cc1565b6111ee611995565b6111f86000611cdb565b565b611202611995565b6014546001600160a01b0316331461126c5760405162461bcd60e51b815260206004820152602760248201527f4f6e6c7920746865206f776e65722063616e2064657374726f792074686520636044820152661bdb9d1c9858dd60ca1b6064820152608401610b42565b6014546001600160a01b0316ff5b6112826114a3565b6001146112ca5760405162461bcd60e51b81526020600482015260166024820152754d696e74205075626c6963206465736174697661646f60501b6044820152606401610b42565b60105460ff16156112ed5760405162461bcd60e51b8152600401610b4290612da1565b60006112f7610e45565b9050600083116113495760405162461bcd60e51b815260206004820152601f60248201527f50726563697361206d696e7461722070656c6f206d656e6f732031204e4654006044820152606401610b42565b600e5461135583611189565b61135f9085612dcd565b111561137d5760405162461bcd60e51b8152600401610b4290612de0565b600d5461138a8483612dcd565b11156113a85760405162461bcd60e51b8152600401610b4290612e2f565b6113b18361177f565b60006113bb610e45565b600d546113c89190612e70565b905060015b848111611432576113df8460016119ef565b60006113ec846001612dcd565b90506113f781611545565b5061140183612e83565b6001600160a01b0386166000908152601660205260409020839055925081905061142a81612e9a565b9150506113cd565b50601255505050565b611443611995565b60136111598282612f5a565b606060048054610d5890612cc1565b6000602052816000526040600020818154811061147a57600080fd5b90600052602060002001600091509150505481565b8161149981611a42565b610e408383611d2d565b600060255442101580156114b957506026544211155b156114c45750600090565b60265442101580156114d857506027544211155b156114e35750600190565b50600290565b601254600090156114fb575060125490565b50600d5490565b836001600160a01b038116331461151c5761151c33611a42565b61152885858585611dc2565b5050505050565b600061153e8360235484611e0d565b9392505050565b606061155082611a09565b6115b45760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b42565b60006115be6111d7565b905060008151116115de576040518060200160405280600081525061153e565b806115e884611903565b600b6040516020016115fc93929190613019565b6040516020818303038152906040529392505050565b61161a611995565b8282116116a55760405162461bcd60e51b815260206004820152604d60248201527f4461746120496e696369616c2064652076656e6461207075626c69636120646560448201527f766520736572206d656e6f722071756520646120646174612064652076656e6460648201526c184819184815d85a5d131a5cdd609a1b608482015260a401610b42565b8181116117345760405162461bcd60e51b815260206004820152605160248201527f446174612046696e616c2064652076656e6461207075626c696361206465766560448201527f20736572206d656e6f722071756520646120646174612066696e616c206465206064820152701d995b99184819184815d85a5d131a5cdd607a1b608482015260a401610b42565b602592909255602655602755565b60008061174d6114a3565b90508060000361175f57505060185490565b806001148061176e5750806002145b1561177b57505060175490565b5090565b6000611789611742565b905061179582826126c0565b34101561180a5760405162461bcd60e51b815260206004820152603960248201527f56616c6f72206461206d696e746167656d206469666572656e746520646f207660448201527f616c6f7220646566696e69646f206e6f20636f6e747261746f000000000000006064820152608401610b42565b601d546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610e40573d6000803e3d6000fd5b61184b611995565b601855565b606060138054610d5890612cc1565b611867611995565b602355565b611874611995565b6001600160a01b0381166118d95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b42565b610fa881611cdb565b602481815481106118f257600080fd5b600091825260209091200154905081565b6060600061191083611e23565b60010190506000816001600160401b0381111561192f5761192f6127e8565b6040519080825280601f01601f191660200182016040528015611959576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461196357509392505050565b6009546001600160a01b031633146111f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b42565b611159828260405180602001604052806000815250611efb565b600081600111158015611a1d575060015482105b8015610ad0575050600090815260056020526040902054600160e01b900460ff161590565b6daaeb6d7670e522a718067333cd4e3b15610fa857604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611aaf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad3919061303f565b610fa857604051633b79c77360e21b81526001600160a01b0382166004820152602401610b42565b6000611b068261115d565b9050806001600160a01b0316836001600160a01b031603611b3a5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590611b5a5750611b588133610993565b155b15611b78576040516367d9dca160e11b815260040160405180910390fd5b610e40838383611f08565b610e40838383611f64565b610e4083838360405180602001604052806000815250611502565b610fa881600061213d565b60408051606081018252600080825260208201819052918101919091528180600111158015611be4575060015481105b15611cc257600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611cc05780516001600160a01b031615611c57579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611cbb579392505050565b611c57565b505b604051636f96cda160e11b815260040160405180910390fd5b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b336001600160a01b03831603611d565760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611dcd848484611f64565b6001600160a01b0383163b15158015611def5750611ded848484846122f1565b155b15610e78576040516368d2bf6b60e11b815260040160405180910390fd5b600082611e1a85846123dc565b14949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611e625772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611e8e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611eac57662386f26fc10000830492506010015b6305f5e1008310611ec4576305f5e100830492506008015b6127108310611ed857612710830492506004015b60648310611eea576064830492506002015b600a8310610ad05760010192915050565b610e408383836001612450565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000611f6f82611bb4565b9050836001600160a01b031681600001516001600160a01b031614611fa65760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480611fc45750611fc48533610993565b80611fdf575033611fd484610ddb565b6001600160a01b0316145b905080611fff57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661202657604051633a954ecd60e21b815260040160405180910390fd5b61203260008487611f08565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661210657600154821461210657805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03166000805160206130b783398151915260405160405180910390a4611528565b600061214883611bb4565b805190915082156121ae576000336001600160a01b038316148061217157506121718233610993565b8061218c57503361218186610ddb565b6001600160a01b0316145b9050806121ac57604051632ce44b5f60e11b815260040160405180910390fd5b505b6121ba60008583611f08565b6001600160a01b0380821660008181526006602090815260408083208054600160801b6000196001600160401b0380841691909101811667ffffffffffffffff198416811783900482166001908101831690930277ffffffffffffffff0000000000000000ffffffffffffffff19909416179290921783558b86526005909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b1785559189018084529220805491949091166122b85760015482146122b857805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416906000805160206130b7833981519152908390a450506002805460010190555050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061232690339089908890889060040161305c565b6020604051808303816000875af1925050508015612361575060408051601f3d908101601f1916820190925261235e91810190613099565b60015b6123bf573d80801561238f576040519150601f19603f3d011682016040523d82523d6000602084013e612394565b606091505b5080516000036123b7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b600081815b84518110156124485760008582815181106123fe576123fe612ef6565b602002602001015190508083116124245760008381526020829052604090209250612435565b600081815260208490526040902092505b508061244081612e9a565b9150506123e1565b509392505050565b6001546001600160a01b03851661247957604051622e076360e81b815260040160405180910390fd5b8360000361249a5760405163b562e8dd60e01b815260040160405180910390fd5b3360009081526020819052604081206124b29161267b565b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600590925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561256357506001600160a01b0387163b15155b156125d9575b60405182906001600160a01b038916906000906000805160206130b7833981519152908290a46125a260008884806001019550886122f1565b6125bf576040516368d2bf6b60e11b815260040160405180910390fd5b8082036125695782600154146125d457600080fd5b61262b565b5b336000908152602081815260408083208054600181810183559185529284209092018590555190840193916001600160a01b038a16916000805160206130b7833981519152908290a48082036125da575b50600155611528565b82805482825590600052602060002090810192821561266f579160200282015b8281111561266f578251825591602001919060010190612654565b5061177b929150612695565b5080546000825590600052602060002090810190610fa891905b5b8082111561177b5760008155600101612696565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610ad057610ad06126aa565b6000826126f457634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561270b57600080fd5b5035919050565b60005b8381101561272d578181015183820152602001612715565b50506000910152565b6000815180845261274e816020860160208601612712565b601f01601f19169290920160200192915050565b60208152600061153e6020830184612736565b6001600160e01b031981168114610fa857600080fd5b60006020828403121561279d57600080fd5b813561153e81612775565b8015158114610fa857600080fd5b6000602082840312156127c857600080fd5b813561153e816127a8565b6001600160a01b0381168114610fa857600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612826576128266127e8565b604052919050565b60006001600160401b03821115612847576128476127e8565b5060051b60200190565b600082601f83011261286257600080fd5b813560206128776128728361282e565b6127fe565b82815260059290921b8401810191818101908684111561289657600080fd5b8286015b848110156128b1578035835291830191830161289a565b509695505050505050565b6000806000606084860312156128d157600080fd5b8335925060208401356128e3816127d3565b915060408401356001600160401b038111156128fe57600080fd5b61290a86828701612851565b9150509250925092565b6000806040838503121561292757600080fd5b8235612932816127d3565b946020939093013593505050565b60008060006060848603121561295557600080fd5b8335612960816127d3565b92506020840135612970816127d3565b929592945050506040919091013590565b60006001600160401b0383111561299a5761299a6127e8565b6129ad601f8401601f19166020016127fe565b90508281528383830111156129c157600080fd5b828260208301376000602084830101529392505050565b600082601f8301126129e957600080fd5b61153e83833560208501612981565b60008060408385031215612a0b57600080fd5b8235915060208301356001600160401b03811115612a2857600080fd5b612a34858286016129d8565b9150509250929050565b60008060408385031215612a5157600080fd5b82356001600160401b0380821115612a6857600080fd5b818501915085601f830112612a7c57600080fd5b81356020612a8c6128728361282e565b82815260059290921b84018101918181019089841115612aab57600080fd5b948201945b83861015612ad2578535612ac3816127d3565b82529482019490820190612ab0565b96505086013592505080821115612ae857600080fd5b50612a3485828601612851565b600060208284031215612b0757600080fd5b81356001600160401b03811115612b1d57600080fd5b610efd848285016129d8565b600060208284031215612b3b57600080fd5b813561153e816127d3565b60008060408385031215612b5957600080fd5b823591506020830135612b6b816127d3565b809150509250929050565b60008060408385031215612b8957600080fd5b8235612b94816127d3565b91506020830135612b6b816127a8565b60008060008060808587031215612bba57600080fd5b8435612bc5816127d3565b93506020850135612bd5816127d3565b92506040850135915060608501356001600160401b03811115612bf757600080fd5b8501601f81018713612c0857600080fd5b612c1787823560208401612981565b91505092959194509250565b60008060408385031215612c3657600080fd5b82356001600160401b03811115612c4c57600080fd5b612c5885828601612851565b95602094909401359450505050565b600080600060608486031215612c7c57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612ca657600080fd5b8235612cb1816127d3565b91506020830135612b6b816127d3565b600181811c90821680612cd557607f821691505b602082108103612cf557634e487b7160e01b600052602260045260246000fd5b50919050565b60008154612d0881612cc1565b60018281168015612d205760018114612d3557612d64565b60ff1984168752821515830287019450612d64565b8560005260208060002060005b85811015612d5b5781548a820152908401908201612d42565b50505082870194505b5050505092915050565b6000612d7a8286612cfb565b8451612d8a818360208901612712565b612d9681830186612cfb565b979650505050505050565b6020808252601290820152714f20636f6e747261746f207061757361646f60701b604082015260600190565b80820180821115610ad057610ad06126aa565b6020808252602f908201527f5175616e746964616465206c696d697465206465206d696e7420706f7220636160408201526e72746569726120657863656469646160881b606082015260800190565b60208082526021908201527f5175616e746964616465206c696d697465206465204e465420657863656469646040820152606160f81b606082015260800190565b81810381811115610ad057610ad06126aa565b600081612e9257612e926126aa565b506000190190565b600060018201612eac57612eac6126aa565b5060010190565b60008451612ec5818460208901612712565b845190830190612ed9818360208901612712565b8451910190612eec818360208801612712565b0195945050505050565b634e487b7160e01b600052603260045260246000fd5b601f821115610e4057600081815260208120601f850160051c81016020861015612f335750805b601f850160051c820191505b81811015612f5257828155600101612f3f565b505050505050565b81516001600160401b03811115612f7357612f736127e8565b612f8781612f818454612cc1565b84612f0c565b602080601f831160018114612fbc5760008415612fa45750858301515b600019600386901b1c1916600185901b178555612f52565b600085815260208120601f198616915b82811015612feb57888601518255948401946001909101908401612fcc565b50858210156130095787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000845161302b818460208901612712565b845190830190612d8a818360208901612712565b60006020828403121561305157600080fd5b815161153e816127a8565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061308f90830184612736565b9695505050505050565b6000602082840312156130ab57600080fd5b815161153e8161277556feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220b45ac9367fcfbec33a27fb166a5a6e8a2f465479df56edcc41598f7d91911e1164736f6c63430008110033
Verified Source Code Partial Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: Yes (200 runs)
SurfJunkie.sol 2927 lines
//File: https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/lib/Constants.sol
pragma solidity ^0.8.13;
address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
//File: https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/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: https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/OperatorFilterer.sol
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.
* Please note that if your token contract does not provide an owner with EIP-173, it must provide
* administration methods on the contract itself to interact with the registry otherwise the subscription
* will be locked to the options set during construction.
*/
abstract contract OperatorFilterer {
/// @dev Emitted when an operator is not allowed.
error OperatorNotAllowed(address operator);
IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);
/// @dev The constructor that is called when the contract is being deployed.
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));
}
}
}
}
/**
* @dev A helper function to check if an 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 an operator approval is allowed.
*/
modifier onlyAllowedOperatorApproval(address operator) virtual {
_checkFilterOperator(operator);
_;
}
/**
* @dev A helper function to check if an operator is allowed.
*/
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) {
// 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 (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
revert OperatorNotAllowed(operator);
}
}
}
}
//File: @openzeppelin/[email protected]/utils/cryptography/MerkleProof.sol
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = _efficientHash(computedHash, proofElement);
} else {
// Hash(current element of the proof + current computed hash)
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
//File: @openzeppelin/contracts/utils/Counters.sol
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
//File: @openzeppelin/contracts/utils/math/Math.sol
// 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;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}
//File: @openzeppelin/contracts/utils/Strings.sol
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}
//File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// 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/utils/Context.sol
// 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/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/utils/introspection/IERC165.sol
// 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/IERC721.sol
// 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/extensions/IERC721Metadata.sol
// 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/introspection/ERC165.sol
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
//File: @openzeppelin/contracts/token/ERC721/ERC721.sol
// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;...
// [truncated — 106259 bytes total]
Read Contract
OPERATOR_FILTER_REGISTRY 0x41f43434 → address
_addressLastMintedTokenIds 0xa1d8bd7e → uint256
_nftEtherValue 0x69473f89 → uint256
_nftEtherValueWaitList 0xf07c2c9f → uint256
balanceOf 0x70a08231 → uint256
conditionPrice 0xd5507007 → uint256
contractURI 0xe8a3d485 → string
getAddressLastMintedTokenId 0x6c21fb00 → uint256
getApproved 0x081812fc → address
getBaseURI 0x714c5398 → string
getMaxMintAmount 0xd6e7b8e4 → uint256
getMaxSupply 0x4c0f38c2 → uint256
getNFTURI 0x00621fda → string
getNftEtherValue 0xd03be3ec → uint256
getQtdAvailableTokens 0xb4ed16b3 → uint256
isApprovedForAll 0xe985e9c5 → bool
isPaused 0xb187bd26 → bool
isValid 0xb8a20ed0 → bool
maxMintAmount 0x239c70ae → uint256
maxMintAmountWaitList 0x4f0a2309 → uint256
merkleProof 0xfa9a309d → bytes32
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
phase 0xb1c9fe6e → uint256
root 0xebf0c717 → bytes32
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0x41dcf454 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
Write Contract 22 functions
These functions modify contract state and require a wallet transaction to execute.
AirDrop 0x51524e5b
address[] endUser
uint256[] amount
approve 0x095ea7b3
address operator
uint256 tokenId
burn 0x42966c68
uint256 _tokenId
destroy 0x83197ef0
No parameters
mintPublic 0x85aa9436
uint256 _mintAmount
address endUser
mintWaitlist 0x06af7312
uint256 _mintAmount
address endUser
bytes32[] proof
pause 0x02329a29
bool _state
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _newBaseURI
setContractURI 0x938e3d7b
string contractURI_
setMaxMintAmount 0x088a4ed0
uint256 _maxMintAmount
setMaxSupply 0x6f8b44b0
uint256 _maxSupply
setNewTimesSales 0xd1df402a
uint256 _initSaleWaitList
uint256 _endSaleWaitList
uint256 _endSalePublic
setNftEtherValue 0x6e17f797
uint256 nftEtherValue
setNftEtherValueWaitList 0xe0fa6559
uint256 _nftEtherValue
setRootKey 0xf1763ebf
bytes32 _newRootKey
split 0xdbceb005
uint256 _mintAmount
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
Token Balances (1)
View Transfers →Recent Transactions
No transactions found for this address