Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x5AB97a44D024871ba1c0dF8C9bE97387BBE844c8
Balance 0 ETH
Nonce 1
Code Size 12775 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

12775 bytes
0x6080604052600436106102885760003560e01c80635fdbefb71161015a578063b88d4fde116100c1578063dc84e3a41161007a578063dc84e3a414610acd578063e65f349a14610b00578063e8a3d48514610b15578063e985e9c514610b2a578063f2fde38b14610b65578063f421764814610b9857610288565b8063b88d4fde1461095e578063beb9716d14610a31578063c1e1ce2914610a46578063c87b56dd14610a5b578063db4dfc0e14610a85578063dc4af4a014610ab857610288565b806382b95cab1161011357806382b95cab146108785780638da5cb5b146108b15780638f32d59b146108c657806395d89b41146108db578063a22cb465146108f0578063ade706c61461092b57610288565b80635fdbefb7146107145780636352211e1461072957806370a0823114610753578063715018a6146107865780637e518ec81461079b57806381530b681461084e57610288565b80633d151d5a116101fe57806351ed8288116101b757806351ed8288146106135780635218ff5c1461063057806352ef6faa1461065a57806354e556f41461069357806355c5fc7d146106c65780635fd8c710146106ff57610288565b80633d151d5a146104d757806341e687f11461050a57806342842e0e146105555780634518714e1461059857806346a7dadc146105ad5780634a5db3b5146105e057610288565b806308c2f9541161025057806308c2f954146103e1578063095ea7b3146103f65780630d0e96da1461043157806323b872dd14610446578063353da41f146104895780633884d635146104c257610288565b806301ffc9a71461028d578063047aa345146102d557806306fdde03146103065780630776c7bd14610390578063081812fc146103b7575b600080fd5b34801561029957600080fd5b506102c1600480360360208110156102b057600080fd5b50356001600160e01b031916610c48565b604080519115158252519081900360200190f35b3480156102e157600080fd5b506102ea610cc5565b604080516001600160a01b039092168252519081900360200190f35b34801561031257600080fd5b5061031b610cd4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561035557818101518382015260200161033d565b50505050905090810190601f1680156103825780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561039c57600080fd5b506103a5610d62565b60408051918252519081900360200190f35b3480156103c357600080fd5b506102ea600480360360208110156103da57600080fd5b5035610d68565b3480156103ed57600080fd5b506102ea610dca565b34801561040257600080fd5b5061042f6004803603604081101561041957600080fd5b506001600160a01b038135169060200135610dd9565b005b34801561043d57600080fd5b506103a5610eb4565b34801561045257600080fd5b5061042f6004803603606081101561046957600080fd5b506001600160a01b03813581169160208101359091169060400135610eba565b34801561049557600080fd5b5061042f600480360360408110156104ac57600080fd5b50803590602001356001600160a01b0316610f11565b3480156104ce57600080fd5b5061042f61108c565b3480156104e357600080fd5b5061042f600480360360208110156104fa57600080fd5b50356001600160a01b031661120c565b34801561051657600080fd5b5061042f6004803603608081101561052d57600080fd5b506001600160a01b038135811691602081013582169160408201358116916060013516611274565b34801561056157600080fd5b5061042f6004803603606081101561057857600080fd5b506001600160a01b0381358116916020810135909116906040013561130b565b3480156105a457600080fd5b506103a5611326565b3480156105b957600080fd5b5061042f600480360360208110156105d057600080fd5b50356001600160a01b031661132c565b3480156105ec57600080fd5b5061042f6004803603602081101561060357600080fd5b50356001600160a01b0316611395565b61042f6004803603602081101561062957600080fd5b5035611400565b34801561063c57600080fd5b5061042f6004803603602081101561065357600080fd5b503561155c565b34801561066657600080fd5b5061042f6004803603604081101561067d57600080fd5b506001600160a01b0381351690602001356115a8565b34801561069f57600080fd5b506103a5600480360360208110156106b657600080fd5b50356001600160a01b0316611643565b3480156106d257600080fd5b5061042f600480360360408110156106e957600080fd5b50803590602001356001600160a01b0316611655565b34801561070b57600080fd5b5061042f61177d565b34801561072057600080fd5b506102ea611801565b34801561073557600080fd5b506102ea6004803603602081101561074c57600080fd5b5035611810565b34801561075f57600080fd5b506103a56004803603602081101561077657600080fd5b50356001600160a01b031661186a565b34801561079257600080fd5b5061042f6118cd565b3480156107a757600080fd5b5061042f600480360360208110156107be57600080fd5b8101906020810181356401000000008111156107d957600080fd5b8201836020820111156107eb57600080fd5b8035906020019184600183028401116401000000008311171561080d57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061195e945050505050565b34801561085a57600080fd5b5061042f6004803603602081101561087157600080fd5b50356119ae565b34801561088457600080fd5b5061042f6004803603604081101561089b57600080fd5b50803590602001356001600160a01b0316611a35565b3480156108bd57600080fd5b506102ea611c31565b3480156108d257600080fd5b506102c1611c40565b3480156108e757600080fd5b5061031b611c67565b3480156108fc57600080fd5b5061042f6004803603604081101561091357600080fd5b506001600160a01b0381351690602001351515611cc1565b34801561093757600080fd5b506102c16004803603602081101561094e57600080fd5b50356001600160a01b0316611dc6565b34801561096a57600080fd5b5061042f6004803603608081101561098157600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156109bc57600080fd5b8201836020820111156109ce57600080fd5b803590602001918460018302840111640100000000831117156109f057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ddb945050505050565b348015610a3d57600080fd5b506102c1611e39565b348015610a5257600080fd5b5061042f611e49565b348015610a6757600080fd5b5061031b60048036036020811015610a7e57600080fd5b5035611ea5565b348015610a9157600080fd5b506102c160048036036020811015610aa857600080fd5b50356001600160a01b0316611f8b565b348015610ac457600080fd5b5061042f611fa0565b348015610ad957600080fd5b506102c160048036036020811015610af057600080fd5b50356001600160a01b0316611ff6565b348015610b0c57600080fd5b506102ea61200b565b348015610b2157600080fd5b5061031b61201a565b348015610b3657600080fd5b506102c160048036036040811015610b4d57600080fd5b506001600160a01b038135811691602001351661203a565b348015610b7157600080fd5b5061042f60048036036020811015610b8857600080fd5b50356001600160a01b03166120e5565b348015610ba457600080fd5b5061042f60048036036020811015610bbb57600080fd5b810190602081018135640100000000811115610bd657600080fd5b820183602082011115610be857600080fd5b80359060200191846020830284011164010000000083111715610c0a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612135945050505050565b60006001600160e01b031982166301ffc9a760e01b1480610c7957506001600160e01b031982166380ac58cd60e01b145b80610c9457506001600160e01b03198216635b5e139f60e01b145b80610caf57506001600160e01b0319821663780e9d6360e01b145b15610cbc57506001610cc0565b5060005b919050565b6017546001600160a01b031681565b6000805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d5a5780601f10610d2f57610100808354040283529160200191610d5a565b820191906000526020600020905b815481529060010190602001808311610d3d57829003601f168201915b505050505081565b600c5481565b6000610d73826121d5565b610dae5760405162461bcd60e51b815260040180806020018281038252602c8152602001806130a7602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6019546001600160a01b031681565b6000610de482611810565b9050806001600160a01b0316836001600160a01b03161415610e375760405162461bcd60e51b81526004018080602001828103825260218152602001806131416021913960400191505060405180910390fd5b806001600160a01b0316610e496121f2565b6001600160a01b03161480610e6a5750610e6a81610e656121f2565b61203a565b610ea55760405162461bcd60e51b815260040180806020018281038252603881526020018061301c6038913960400191505060405180910390fd5b610eaf83836121f6565b505050565b60095481565b610ecb610ec56121f2565b82612264565b610f065760405162461bcd60e51b81526004018080602001828103825260318152602001806131626031913960400191505060405180910390fd5b610eaf838383612300565b601954600160a01b900460ff16610f2757600080fd5b33600090815260126020526040902054821115610f8b576040805162461bcd60e51b815260206004820152601e60248201527f4d61726b6574696e672051756f7461206973206e6f7420656e6f756768210000604482015290519081900360640190fd5b600954600101610fa683600b5461243090919063ffffffff16565b1115610ff0576040805162461bcd60e51b8152602060048201526014602482015273546f74616c20416d6f756e74204578636565642160601b604482015290519081900360640190fd5b60005b828110156110575761100782600b5461248a565b600b5461101b90600163ffffffff61243016565b600b81905560115460408051918252516001600160a01b03851691600080516020613193833981519152919081900360200190a3600101610ff3565b5033600090815260126020526040902054611078908363ffffffff6125b716565b336000908152601260205260409020555050565b601954600160a01b900460ff166110a257600080fd5b6110ab33612614565b806110ba57506110ba33612871565b6110fa576040805162461bcd60e51b815260206004820152600c60248201526b556e7175616c69666965642160a01b604482015290519081900360640190fd5b600954600b54111561114a576040805162461bcd60e51b8152602060048201526014602482015273546f74616c20416d6f756e74204578636565642160601b604482015290519081900360640190fd5b6000600d541161115957600080fd5b61116533600b5461248a565b600b5461117990600163ffffffff61243016565b600b81905560115460408051918252513391600080516020613193833981519152919081900360200190a33360009081526014602052604090205460ff16156111d857336000908152601460205260409020805460ff191690556111f3565b336000908152601360205260409020805460ff191660011790555b600d5461120790600163ffffffff6125b716565b600d55565b611214611c40565b611253576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152601560205260409020805460ff19169055565b61127c611c40565b6112bb576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b601680546001600160a01b039586166001600160a01b0319918216179091556017805494861694821694909417909355601880549285169284169290921790915560198054919093169116179055565b610eaf83838360405180602001604052806000815250611ddb565b600b5481565b611334611c40565b611373576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b61139d611c40565b6113dc576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152601560205260409020805460ff19166001179055565b601954600160a01b900460ff1661141657600080fd5b600c54611429908263ffffffff61288f16565b341015611470576040805162461bcd60e51b815260206004820152601060248201526f092dce6eaccccd2c6d2cadce8408aa8960831b604482015290519081900360640190fd5b80601054101561147f57600080fd5b60095460010161149a82600b5461243090919063ffffffff16565b11156114e4576040805162461bcd60e51b8152602060048201526014602482015273546f74616c20416d6f756e74204578636565642160601b604482015290519081900360640190fd5b60005b81811015611542576114fb33600b5461248a565b600b5461150f90600163ffffffff61243016565b600b81905560115460408051918252513391600080516020613193833981519152919081900360200190a36001016114e7565b50601054611556908263ffffffff6125b716565b60105550565b611564611c40565b6115a3576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b601155565b6115b0611c40565b6115ef576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b600081116115fc57600080fd5b80600a54101561160b57600080fd5b6001600160a01b0382166000908152601260205260409020805482019055600a5461163c908263ffffffff6125b716565b600a555050565b60126020526000908152604090205481565b601954600160a01b900460ff1661166b57600080fd5b3360009081526015602052604090205460ff1661168757600080fd5b81600e54101561169657600080fd5b6009546001016116b183600b5461243090919063ffffffff16565b11156116fb576040805162461bcd60e51b8152602060048201526014602482015273546f74616c20416d6f756e74204578636565642160601b604482015290519081900360640190fd5b60005b828110156117625761171282600b5461248a565b600b5461172690600163ffffffff61243016565b600b81905560115460408051918252516001600160a01b03851691600080516020613193833981519152919081900360200190a36001016116fe565b50600e54611776908363ffffffff6125b716565b600e555050565b611785611c40565b6117c4576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b6006546040516001600160a01b0390911690303180156108fc02916000818181858888f193505050501580156117fe573d6000803e3d6000fd5b50565b6016546001600160a01b031681565b6000818152600260205260408120546001600160a01b0316806118645760405162461bcd60e51b815260040180806020018281038252602981526020018061307e6029913960400191505060405180910390fd5b92915050565b60006001600160a01b0382166118b15760405162461bcd60e51b815260040180806020018281038252602a815260200180613054602a913960400191505060405180910390fd5b506001600160a01b031660009081526003602052604090205490565b6118d5611c40565b611914576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b611966611c40565b6119a5576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b6117fe816128f7565b6119b6611c40565b6119f5576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b60008111611a0257600080fd5b600c81905560405181907f390fa6f5641344c18975681f7e2891cd82e560e1c7da76da38277104231ebf6e90600090a250565b611a3d611c40565b611a7c576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b601954600160a01b900460ff16611a9257600080fd5b600954600101611aad83600b5461243090919063ffffffff16565b1115611af7576040805162461bcd60e51b8152602060048201526014602482015273546f74616c20416d6f756e74204578636565642160601b604482015290519081900360640190fd5b81600a541015611b42576040805162461bcd60e51b81526020600482015260116024820152704e4654206e6f7420617661696c61626c6560781b604482015290519081900360640190fd5b81600f541015611b99576040805162461bcd60e51b815260206004820152601760248201527f506572736572766520416d6f756e742045786365656421000000000000000000604482015290519081900360640190fd5b60005b82811015611c0057611bb082600b5461248a565b600b54611bc490600163ffffffff61243016565b600b81905560115460408051918252516001600160a01b03851691600080516020613193833981519152919081900360200190a3600101611b9c565b50600a54611c14908363ffffffff6125b716565b600a55600f54611c2a908363ffffffff6125b716565b600f555050565b6006546001600160a01b031681565b6006546000906001600160a01b0316611c576121f2565b6001600160a01b03161490505b90565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d5a5780601f10610d2f57610100808354040283529160200191610d5a565b611cc96121f2565b6001600160a01b0316826001600160a01b03161415611d2f576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060056000611d3c6121f2565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611d806121f2565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b60136020526000908152604090205460ff1681565b611dec611de66121f2565b83612264565b611e275760405162461bcd60e51b81526004018080602001828103825260318152602001806131626031913960400191505060405180910390fd5b611e338484848461290e565b50505050565b601954600160a01b900460ff1681565b611e51611c40565b611e90576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b6019805460ff60a01b1916600160a01b179055565b6060611eb0826121d5565b611eeb5760405162461bcd60e51b81526004018080602001828103825260258152602001806130d36025913960400191505060405180910390fd5b60078054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526118649390929091830182828015611f785780601f10611f4d57610100808354040283529160200191611f78565b820191906000526020600020905b815481529060010190602001808311611f5b57829003601f168201915b5050505050611f8684612925565b6129e6565b60146020526000908152604090205460ff1681565b611fa8611c40565b611fe7576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b6019805460ff60a01b19169055565b60156020526000908152604090205460ff1681565b6018546001600160a01b031681565b6060604051806060016040528060278152602001612fc960279139905090565b6008546040805163c455279160e01b81526001600160a01b0385811660048301529151600093831692851691839163c455279191602480820192602092909190829003018186803b15801561208e57600080fd5b505afa1580156120a2573d6000803e3d6000fd5b505050506040513d60208110156120b857600080fd5b50516001600160a01b031614156120d3576001915050611864565b6120dd8484612a22565b949350505050565b6120ed611c40565b61212c576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b6117fe81612a50565b61213d611c40565b61217c576040805162461bcd60e51b815260206004820181905260248201526000805160206130f8833981519152604482015290519081900360640190fd5b805160005b81811015610eaf5760016014600085848151811061219b57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101612181565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061222b82611810565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061226f826121d5565b6122aa5760405162461bcd60e51b815260040180806020018281038252602c815260200180612ff0602c913960400191505060405180910390fd5b60006122b583611810565b9050806001600160a01b0316846001600160a01b031614806122f05750836001600160a01b03166122e584610d68565b6001600160a01b0316145b806120dd57506120dd818561203a565b826001600160a01b031661231382611810565b6001600160a01b0316146123585760405162461bcd60e51b81526004018080602001828103825260298152602001806131186029913960400191505060405180910390fd5b6001600160a01b03821661239d5760405162461bcd60e51b8152600401808060200182810382526024815260200180612fa56024913960400191505060405180910390fd5b6123a8838383610eaf565b6123b36000826121f6565b6001600160a01b038084166000818152600360209081526040808320805460001901905593861680835284832080546001019055858352600290915283822080546001600160a01b031916821790559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600082820183811015612483576040805162461bcd60e51b8152602060048201526016602482015275536166654d617468236164643a204f564552464c4f5760501b604482015290519081900360640190fd5b9392505050565b6001600160a01b0382166124e5576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b6124ee816121d5565b15612540576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b61254c60008383610eaf565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008282111561260e576040805162461bcd60e51b815260206004820152601760248201527f536166654d617468237375623a20554e444552464c4f57000000000000000000604482015290519081900360640190fd5b50900390565b6001600160a01b03811660009081526013602052604081205460ff161561263d57506000610cc0565b601654604080516370a0823160e01b81526001600160a01b038581166004830152915160009392909216916370a0823191602480820192602092909190829003018186803b15801561268e57600080fd5b505afa1580156126a2573d6000803e3d6000fd5b505050506040513d60208110156126b857600080fd5b505111156126c857506001610cc0565b601754604080516370a0823160e01b81526001600160a01b038581166004830152915160009392909216916370a0823191602480820192602092909190829003018186803b15801561271957600080fd5b505afa15801561272d573d6000803e3d6000fd5b505050506040513d602081101561274357600080fd5b5051111561275357506001610cc0565b601854604080516370a0823160e01b81526001600160a01b038581166004830152915160009392909216916370a0823191602480820192602092909190829003018186803b1580156127a457600080fd5b505afa1580156127b8573d6000803e3d6000fd5b505050506040513d60208110156127ce57600080fd5b505111156127de57506001610cc0565b601954604080516370a0823160e01b81526001600160a01b038581166004830152915160009392909216916370a0823191602480820192602092909190829003018186803b15801561282f57600080fd5b505afa158015612843573d6000803e3d6000fd5b505050506040513d602081101561285957600080fd5b5051111561286957506001610cc0565b506000610cc0565b6001600160a01b031660009081526014602052604090205460ff1690565b60008261289e57506000611864565b828202828482816128ab57fe5b0414612483576040805162461bcd60e51b8152602060048201526016602482015275536166654d617468236d756c3a204f564552464c4f5760501b604482015290519081900360640190fd5b805161290a906007906020840190612ec4565b5050565b612919848484612300565b611e3384848484612af1565b60608161294a57506040805180820190915260018152600360fc1b6020820152610cc0565b8160005b811561296257600101600a8204915061294e565b6060816040519080825280601f01601f19166020018201604052801561298f576020820181803883390190505b50905060001982015b85156129dd57600a860660300160f81b828280600190039350815181106129bb57fe5b60200101906001600160f81b031916908160001a905350600a86049550612998565b50949350505050565b60606124838383604051806020016040528060008152506040518060200160405280600081525060405180602001604052806000815250612c79565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6001600160a01b038116612a955760405162461bcd60e51b8152600401808060200182810382526026815260200180612f5d6026913960400191505060405180910390fd5b6006546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b612b03836001600160a01b0316612e8d565b15611e33576000836001600160a01b031663150b7a02612b216121f2565b8786866040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612ba6578181015183820152602001612b8e565b50505050905090810190601f168015612bd35780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015612bf557600080fd5b505af1158015612c09573d6000803e3d6000fd5b505050506040513d6020811015612c1f57600080fd5b505190506001600160e01b0319811663785cf2dd60e11b14612c725760405162461bcd60e51b8152600401808060200182810382526022815260200180612f836022913960400191505060405180910390fd5b5050505050565b6060808690506060869050606086905060608690506060869050606081518351855187518951010101016040519080825280601f01601f191660200182016040528015612ccd576020820181803883390190505b509050806000805b8851811015612d2657888181518110612cea57fe5b602001015160f81c60f81b838380600101945081518110612d0757fe5b60200101906001600160f81b031916908160001a905350600101612cd5565b5060005b8751811015612d7b57878181518110612d3f57fe5b602001015160f81c60f81b838380600101945081518110612d5c57fe5b60200101906001600160f81b031916908160001a905350600101612d2a565b5060005b8651811015612dd057868181518110612d9457fe5b602001015160f81c60f81b838380600101945081518110612db157fe5b60200101906001600160f81b031916908160001a905350600101612d7f565b5060005b8551811015612e2557858181518110612de957fe5b602001015160f81c60f81b838380600101945081518110612e0657fe5b60200101906001600160f81b031916908160001a905350600101612dd4565b5060005b8451811015612e7a57848181518110612e3e57fe5b602001015160f81c60f81b838380600101945081518110612e5b57fe5b60200101906001600160f81b031916908160001a905350600101612e29565b50909d9c50505050505050505050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906120dd5750141592915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612f0557805160ff1916838001178555612f32565b82800160010185558215612f32579182015b82811115612f32578251825591602001919060010190612f17565b50612f3e929150612f42565b5090565b611c6491905b80821115612f3e5760008155600101612f4856fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a20494e56414c49445f4f4e5f524543454956455f4d4553534147454552433732313a207472616e7366657220746f20746865207a65726f206164647265737368747470733a2f2f7777772e636f736d6f736368616e6d6265722e6172742f61626f75742d75734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732315472616461626c65237572693a204e4f4e4558495354454e545f544f4b454e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564ffa55b278bf03679f0e30ab08cf1b28540e6f72664096eb483cc4deddcd096b8a265627a7a72315820d5abfefc82eb7d08b081d785ecd7a2d6a3a8dab00f91f8f192606daf2172d14964736f6c634300050c0032

Verified Source Code Partial Match

Compiler: v0.5.12+commit.7709ece9 EVM: petersburg Optimization: Yes (200 runs)
CosmoChamber.sol 966 lines
pragma solidity >=0.5.0;

library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    require(c / a == b, "SafeMath#mul: OVERFLOW");

    return c;
  }
  
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b > 0, "SafeMath#div: DIVISION_BY_ZERO");
    uint256 c = a / b;

    return c;
  }

  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a, "SafeMath#sub: UNDERFLOW");
    uint256 c = a - b;

    return c;
  }

  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath#add: OVERFLOW");

    return c; 
  }

  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0, "SafeMath#mod: DIVISION_BY_ZERO");
    return a % b;
  }

}

library Address {
  function isContract(address account) internal view returns (bool) {
    bytes32 codehash;
    bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;

    // XXX Currently there is no better way to check if there is a contract in an address
    // than to check the size of the code at that address.
    // See https://ethereum.stackexchange.com/a/14016/36603
    // for more details about how this works.
    // TODO Check this again before the Serenity release, because all addresses will be
    // contracts then.
    assembly { codehash := extcodehash(account) }
    return (codehash != 0x0 && codehash != accountHash);
  }

}

library Strings {
	function strConcat(
		string memory _a,
		string memory _b,
		string memory _c,
		string memory _d,
		string memory _e
	) internal pure returns (string memory) {
		bytes memory _ba = bytes(_a);
		bytes memory _bb = bytes(_b);
		bytes memory _bc = bytes(_c);
		bytes memory _bd = bytes(_d);
		bytes memory _be = bytes(_e);
		string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length);
		bytes memory babcde = bytes(abcde);
		uint256 k = 0;
		for (uint256 i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];
		for (uint256 i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];
		for (uint256 i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];
		for (uint256 i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];
		for (uint256 i = 0; i < _be.length; i++) babcde[k++] = _be[i];
		return string(babcde);
	}

	function strConcat(
		string memory _a,
		string memory _b,
		string memory _c,
		string memory _d
	) internal pure returns (string memory) {
		return strConcat(_a, _b, _c, _d, "");
	}

	function strConcat(
		string memory _a,
		string memory _b,
		string memory _c
	) internal pure returns (string memory) {
		return strConcat(_a, _b, _c, "", "");
	}

	function strConcat(string memory _a, string memory _b) internal pure returns (string memory) {
		return strConcat(_a, _b, "", "", "");
	}

	function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
		if (_i == 0) {
			return "0";
		}
		uint256 j = _i;
		uint256 len;
		while (j != 0) {
			len++;
			j /= 10;
		}
		bytes memory bstr = new bytes(len);
		uint256 k = len - 1;
		while (_i != 0) {
			bstr[k--] = bytes1(uint8(48 + (_i % 10)));
			_i /= 10;
		}
		return string(bstr);
	}
}

contract Context {
    constructor () internal { }

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; 
        return msg.data;
    }
}

contract Ownable is Context {
    address payable public owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor () internal {
        owner = msg.sender;
        emit OwnershipTransferred(address(0), msg.sender);
    }

    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    function isOwner() public view returns (bool) {
        return _msgSender() == owner;
    }
    
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(owner, address(0));
        owner = address(0);
    }
    
    function transferOwnership(address payable newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    function _transferOwnership(address payable newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }
}

interface IERC165 {
    /**
     * @notice Query if a contract implements an interface
     * @dev Interface identification is specified in ERC-165. This function
     * uses less than 30,000 gas
     * @param _interfaceId The interface identifier, as specified in ERC-165
     */
    function supportsInterface(bytes4 _interfaceId)
    external
    view
    returns (bool);
}

interface 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
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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 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);

    /**
     * @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;
}

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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

interface 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);
}

contract ERC721 is Context, IERC165, IERC721, IERC721Metadata {
    using Address for address;

    // Token name
    string public name;

    // Token symbol
    string public 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;

    bytes4 constant private INTERFACE_SIGNATURE_ERC165 = 0x01ffc9a7;
    bytes4 constant private INTERFACE_SIGNATURE_ERC721 = 0x80ac58cd;
    bytes4 constant private INTERFACE_SIGNATURE_ERC721METADATA = 0x5b5e139f;
    bytes4 constant private INTERFACE_SIGNATURE_ERC721ENUMERABLE = 0x780e9d63;

    function supportsInterface(bytes4 _interfaceId) external view returns (bool) {
        if (
            _interfaceId == INTERFACE_SIGNATURE_ERC165 ||
            _interfaceId == INTERFACE_SIGNATURE_ERC721 ||
            _interfaceId == INTERFACE_SIGNATURE_ERC721METADATA ||
            _interfaceId == INTERFACE_SIGNATURE_ERC721ENUMERABLE
            ) {
                return true;
            }
        return false;
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view  returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view  returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }
    
    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal {
        _transfer(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, _data);
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal {
        _mint(to, tokenId);
        _checkOnERC721Received(address(0), to, tokenId, _data);
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    bytes4 constant internal ERC721_RECEIVED_VALUE = 0xf0b9e5ba; 
    
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private{
        if (to.isContract()) {
            bytes4 retval = IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data);
            require(retval == ERC721_RECEIVED_VALUE, "ERC721: INVALID_ON_RECEIVE_MESSAGE");
        }
            
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal {}
}

contract OwnableDelegateProxy {}

contract ProxyRegistry {
	mapping(address => OwnableDelegateProxy) public proxies;
}


interface ERC721Token {
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    function balanceOf(address owner) external view returns (uint256 balance);
    function ownerOf(uint256 tokenId) external view returns (address owner);
    function safeTransferFrom(address from, address to, uint256 tokenId) external;
    function transferFrom(address from, address to, uint256 tokenId) external;
    function approve(address to, uint256 tokenId) external;
    function getApproved(uint256 tokenId) external view returns (address operator);
    function setApprovalForAll(address operator, bool _approved) external;
    function isApprovedForAll(address owner, address operator) external view returns (bool);
    function safeTransferFrom(address from, address to, uint256 tokenId,  bytes calldata data) external;

    function supportsInterface(bytes4 interfaceID) external view returns (bool);
}

contract ERC721Tradable is ERC721, Ownable{
    using SafeMath for uint256;
    using Strings for string;
    
    event NFTGenerated(address indexed _owner, uint256 indexed _nftId, uint256 _series);
    event NewNFTPrice(uint256 indexed _newprice);
    
    string internal baseMetadataURI;
	address proxyRegistryAddress;
	uint256 public totalNFTs;
	uint256 NFTAvaliable;
	uint256 public currentNFTid = 0;
	uint256 public NFTprice = 0.05 * 10**18;
	
	uint256 totalAirDrop;
	uint256 totalAuthorize;
	uint256 totalPerverse;
	uint256 totalFreeBuy;
	
    uint256 series = 0;
	
	mapping (address => uint256) public MarketingQuota;
	mapping (address => bool) public PartnerTokenCheck;
	mapping (address => bool) public IfWhiteList;
	mapping (address => bool) public Authorized;
	
	bytes4 constant InterfaceSignature_ERC721 = 0x80ac58cd;
	ERC721Token public CryptoPunks;
	ERC721Token public LOSTPOETS;
	ERC721Token public PakCube;
	ERC721Token public TheCurrency;
	
	bool public canMint = true;
	modifier CanMint() {
	    require(canMint);
	    _;
	}
    
	constructor(
		string memory  _name,
		string memory _symbol,
		uint256 _totalNFTs,
		uint256 _airdrop,
		uint256 _authorize,
		uint256 _perserve,
		uint256 _freebuy,
		address _proxyRegistryAddress
	) public {
		name = _name;
		symbol = _symbol;
		totalNFTs = _totalNFTs;
		totalAirDrop = _airdrop;
		totalAuthorize = _authorize;
		totalPerverse = _perserve;
		totalFreeBuy = _freebuy;
		NFTAvaliable = _totalNFTs - _airdrop - _authorize - _perserve;
		proxyRegistryAddress = _proxyRegistryAddress;
	}
	
	function mintDisable() public onlyOwner {
	    canMint = false;
	}
	
	function mintEnable() public onlyOwner {
	    canMint = true;
	}
	
	// Regular Purchase
	function buyNFT(uint256 _amount) public payable CanMint {
	    require(msg.value >= NFTprice.mul(_amount), "Insufficient ETH");
	    require(totalFreeBuy >= _amount);
	    require(currentNFTid.add(_amount) <= totalNFTs+1, "Total Amount Exceed!");
	    for(uint i=0; i< _amount; i++) {
	        _mint(msg.sender, currentNFTid);
	        currentNFTid = currentNFTid.add(1);
	        emit NFTGenerated(msg.sender, currentNFTid, series);
	    }
	    totalFreeBuy = totalFreeBuy.sub(_amount);
	}
	
	function adminGenerator(uint256 _amount, address receiver) public onlyOwner CanMint {
	    require(currentNFTid.add(_amount) <= totalNFTs+1, "Total Amount Exceed!");
	    require(NFTAvaliable >= _amount, "NFT not available");
	    require(totalPerverse >= _amount, "Perserve Amount Exceed!");
	    for(uint i=0; i< _amount; i++) {
	        _mint(receiver, currentNFTid);
	        currentNFTid = currentNFTid.add(1);
	        emit NFTGenerated(receiver, currentNFTid, series);
	    }
	    NFTAvaliable = NFTAvaliable.sub(_amount);
	    totalPerverse = totalPerverse.sub(_amount);
	}
	
	function marketGenerator(uint256 _amount, address receiver) public CanMint {
	    require(MarketingQuota[msg.sender] >= _amount, "Marketing Quota is not enough!");
	    require(currentNFTid.add(_amount) <= totalNFTs+1, "Total Amount Exceed!");
	    for(uint i=0; i< _amount; i++) {
	        _mint(receiver, currentNFTid);
	        currentNFTid = currentNFTid.add(1);
	        emit NFTGenerated(receiver, currentNFTid, series);
	    }
	    MarketingQuota[msg.sender] = MarketingQuota[msg.sender].sub(_amount);
	}
	
	function authorizedGenerator(uint256 _amount, address receiver) public CanMint {
	    require(Authorized[msg.sender]);
	    require(totalAuthorize >= _amount);
	    require(currentNFTid.add(_amount) <= totalNFTs+1, "Total Amount Exceed!");
	    for(uint i=0; i< _amount; i++) {
	        _mint(receiver, currentNFTid);
	        currentNFTid = currentNFTid.add(1);
	        emit NFTGenerated(receiver, currentNFTid, series);
	    }
	    totalAuthorize = totalAuthorize.sub(_amount);
	}
	
	function authorizeAddress(address _vp) public onlyOwner {
	    Authorized[_vp] = true;
	}
	
	function cancelAuthorized(address _vp) public onlyOwner {
	    Authorized[_vp] = false;
	}
	
	function setSeries(uint256 _series) public onlyOwner {
	    series = _series;
	}
	
	function setMarketQuota(address _spender, uint256 _amount) public onlyOwner {
	    require(_amount >0);
	    require(NFTAvaliable >= _amount);
	    MarketingQuota[_spender] = MarketingQuota[_spender] + _amount;
	    NFTAvaliable = NFTAvaliable.sub(_amount);
	}
	
	function airdrop() public CanMint {
	    require(_canAirdrop(msg.sender) || _ifWhiteListed(msg.sender), "Unqualified!");
	    require(currentNFTid <= totalNFTs, "Total Amount Exceed!");
	    require(totalAirDrop > 0);
	    _mint(msg.sender, currentNFTid);
	    currentNFTid = currentNFTid.add(1);
	    emit NFTGenerated(msg.sender, currentNFTid, series);
	    if(IfWhiteList[msg.sender]) {
	        IfWhiteList[msg.sender] = false;
	    } else {
	        PartnerTokenCheck[msg.sender] = true;
	    }
	    totalAirDrop = totalAirDrop.sub(1);
	}
	
	function setWhitelist(address[] memory _users) public onlyOwner {
	    uint userLength = _users.length;
	    for (uint i = 0; i < userLength; i++) {
	        IfWhiteList[_users[i]] = true;
	    }
	}
	
	function initialPartnerNFT(address _cryptoPunksAddress, address _lostpoetsAddress, address _pakCube, address _theCurrencyAddress) public onlyOwner {
	    ERC721Token cryptoPunks = ERC721Token(_cryptoPunksAddress);
        CryptoPunks = cryptoPunks;
        
        ERC721Token lostpoets = ERC721Token(_lostpoetsAddress);
        LOSTPOETS = lostpoets;
        
        ERC721Token pakCube = ERC721Token(_pakCube);
        PakCube = pakCube;
        
        ERC721Token theCurrencyAddress = ERC721Token(_theCurrencyAddress);
        TheCurrency = theCurrencyAddress;
	}

	function _canAirdrop(address _user) private view returns(bool) {
	    if (PartnerTokenCheck[_user]){
	        return false;
	    }
	    if(CryptoPunks.balanceOf(_user) > 0) {
	        return true;
	    } else if (LOSTPOETS.balanceOf(_user) > 0) {
	        return true;
	    } else if (PakCube.balanceOf(_user) > 0) {
	        return true;
	    } else if (TheCurrency.balanceOf(_user) > 0) {
	        return true;
	    } else{
	        return false;
	    }
	}
	
	function _ifWhiteListed(address _user) private view returns(bool) {
	    return IfWhiteList[_user];
	}
	
	function setNFTPrice(uint256 _newPrice) public onlyOwner {
	    require(_newPrice > 0);
	    NFTprice = _newPrice;
	    emit NewNFTPrice(_newPrice);
	}
	
	function setProxyAddress(address _proxyAddress) public onlyOwner {
	    proxyRegistryAddress = _proxyAddress;
	}

    function tokenURI(uint256 _tokenId) public view returns (string memory) {
        require(_exists(_tokenId), "ERC721Tradable#uri: NONEXISTENT_TOKEN");
        return Strings.strConcat(baseMetadataURI, Strings.uint2str(_tokenId));
    }
    
    function _setBaseMetadataURI(string memory _newBaseMetadataURI) internal {
        baseMetadataURI = _newBaseMetadataURI;
    }

	function setBaseMetadataURI(string memory _newBaseMetadataURI) public onlyOwner {
		_setBaseMetadataURI(_newBaseMetadataURI);
	}

	function isApprovedForAll(address _owner, address _operator) public view returns (bool isOperator) {
		ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress);
		if (address(proxyRegistry.proxies(_owner)) == _operator) {
			return true;
		}

		return ERC721.isApprovedForAll(_owner, _operator);
	}
}

contract CosmoChamber is ERC721Tradable {
	constructor(address _proxyRegistryAddress) public ERC721Tradable("CosmoChamber", "CC", 6001, 800, 500, 500, 4201, _proxyRegistryAddress) {
		_setBaseMetadataURI("https://api.cosmochamber.art/metadata/");
	}

	function contractURI() public pure returns (string memory) {
		return "https://www.cosmoschanmber.art/about-us";
	}
	
	function withdrawBalance() external onlyOwner {
        owner.transfer(address(this).balance);
    }

}

Read Contract

Authorized 0xdc84e3a4 → bool
CryptoPunks 0x5fdbefb7 → address
IfWhiteList 0xdb4dfc0e → bool
LOSTPOETS 0x047aa345 → address
MarketingQuota 0x54e556f4 → uint256
NFTprice 0x0776c7bd → uint256
PakCube 0xe65f349a → address
PartnerTokenCheck 0xade706c6 → bool
TheCurrency 0x08c2f954 → address
balanceOf 0x70a08231 → uint256
canMint 0xbeb9716d → bool
contractURI 0xe8a3d485 → string
currentNFTid 0x4518714e → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isOwner 0x8f32d59b → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalNFTs 0x0d0e96da → uint256

Write Contract 24 functions

These functions modify contract state and require a wallet transaction to execute.

adminGenerator 0x82b95cab
uint256 _amount
address receiver
airdrop 0x3884d635
No parameters
approve 0x095ea7b3
address to
uint256 tokenId
authorizeAddress 0x4a5db3b5
address _vp
authorizedGenerator 0x55c5fc7d
uint256 _amount
address receiver
buyNFT 0x51ed8288
uint256 _amount
cancelAuthorized 0x3d151d5a
address _vp
initialPartnerNFT 0x41e687f1
address _cryptoPunksAddress
address _lostpoetsAddress
address _pakCube
address _theCurrencyAddress
marketGenerator 0x353da41f
uint256 _amount
address receiver
mintDisable 0xdc4af4a0
No parameters
mintEnable 0xc1e1ce29
No parameters
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
setBaseMetadataURI 0x7e518ec8
string _newBaseMetadataURI
setMarketQuota 0x52ef6faa
address _spender
uint256 _amount
setNFTPrice 0x81530b68
uint256 _newPrice
setProxyAddress 0x46a7dadc
address _proxyAddress
setSeries 0x5218ff5c
uint256 _series
setWhitelist 0xf4217648
address[] _users
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdrawBalance 0x5fd8c710
No parameters

Recent Transactions

No transactions found for this address