Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xb6d0C7F22bf8EBDB42697D1D16460f114E916135
Balance 0.015062 ETH
Nonce 1
Code Size 24103 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

24103 bytes
0x6080604052600436106101d75763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663018a25e8811461037557806306fdde031461039c578063079ce327146104265780630f15f4c01461044657806310f01eba1461045b57806311a09ae71461047c57806324c33d33146104915780632660316e146105085780632ce21999146105375780632e19ebdc14610568578063349cdcac146105805780633ccfd60b1461059e5780633ddd4698146105b357806349cc635d1461060f5780635893d48114610639578063624ae5c0146106545780636306643414610669578063685ffd831461069f57806372baa12e146106f2578063747dff421461070657806382bfc739146107915780638f38f309146107b85780638f7140ea146107c6578063921dec21146107e157806395d89b411461083457806398a0871d14610849578063a2bccae914610860578063a65b37a1146108a1578063c06b5281146108af578063c519500e146108c9578063c7e284b8146108e1578063ce89c80c146108f6578063cf80800014610911578063d53b267914610929578063d87574e01461093e578063de7874f314610953578063ed78cf4a146109ad578063ee0b5d8b146109b5575b6101df615ce2565b600f5460009060ff161515600114610243576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b33803b801561028a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b34633b9aca008110156102e2576040805160e560020a62461bcd0281526020600482015260216024820152600080516020615d7c833981519152604482015260f860020a607902606482015290519081900360840190fd5b69152d02c7e14af6800000811115610332576040805160e560020a62461bcd02815260206004820152600e6024820152600080516020615dbc833981519152604482015290519081900360640190fd5b61033b85610a0e565b3360009081526006602081815260408084205480855260089092529092200154919650945061036e908590600288610cb0565b5050505050005b34801561038157600080fd5b5061038a610eec565b60408051918252519081900360200190f35b3480156103a857600080fd5b506103b1610fb1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103eb5781810151838201526020016103d3565b50505050905090810190601f1680156104185780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561043257600080fd5b50610444600435602435604435610fe8565b005b34801561045257600080fd5b506104446111f4565b34801561046757600080fd5b5061038a600160a060020a0360043516611326565b34801561048857600080fd5b5061038a611338565b34801561049d57600080fd5b506104a960043561133e565b604080519c8d5260208d019b909b528b8b019990995296151560608b015260808a019590955260a089019390935260c088019190915260e087015261010086015261012085015261014084015261016083015251908190036101800190f35b34801561051457600080fd5b506105236004356024356113a1565b604080519115158252519081900360200190f35b34801561054357600080fd5b5061054f6004356113c1565b6040805192835260208301919091528051918290030190f35b34801561057457600080fd5b5061038a6004356113da565b34801561058c57600080fd5b506104446004356024356044356113ec565b3480156105aa57600080fd5b506104446115d2565b6040805160206004803580820135601f810184900484028501840190955284845261044494369492936024939284019190819084018382808284375094975050600160a060020a03853516955050505050602001351515611953565b34801561061b57600080fd5b50610444600435600160a060020a0360243516604435606435611b06565b34801561064557600080fd5b5061038a600435602435611cf1565b34801561066057600080fd5b5061038a611d0e565b34801561067557600080fd5b50610681600435611d14565b60408051938452602084019290925282820152519081900360600190f35b6040805160206004803580820135601f8101849004840285018401909552848452610444943694929360249392840191908190840183828082843750949750508435955050505050602001351515611eba565b610444600160a060020a0360043516611f94565b34801561071257600080fd5b5061071b6122de565b604080519e8f5260208f019d909d528d8d019b909b5260608d019990995260808c019790975260a08b019590955260c08a0193909352600160a060020a0390911660e08901526101008801526101208701526101408601526101608501526101808401526101a083015251908190036101c00190f35b34801561079d57600080fd5b50610444600160a060020a03600435166024356044356124dc565b6104446004356024356126d6565b3480156107d257600080fd5b506104446004356024356128bd565b6040805160206004803580820135601f8101849004840285018401909552848452610444943694929360249392840191908190840183828082843750949750508435955050505050602001351515612994565b34801561084057600080fd5b506103b1612a6e565b610444600160a060020a0360043516602435612aa5565b34801561086c57600080fd5b5061087b600435602435612c73565b604080519485526020850193909352838301919091526060830152519081900360800190f35b610444600435602435612ca5565b610444600160a060020a0360043516602435604435612eb1565b3480156108d557600080fd5b5061054f600435613081565b3480156108ed57600080fd5b5061038a61309a565b34801561090257600080fd5b5061038a600435602435613129565b34801561091d57600080fd5b5061038a6004356131d1565b34801561093557600080fd5b50610523613283565b34801561094a57600080fd5b5061038a61328c565b34801561095f57600080fd5b5061096b600435613292565b60408051600160a060020a0390981688526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b6104446132d9565b3480156109c157600080fd5b506109d6600160a060020a0360043516613356565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b610a16615ce2565b336000908152600660205260408120549080821515610ca757604080517fe56556a90000000000000000000000000000000000000000000000000000000081523360048201529051600080516020615d5c8339815191529163e56556a99160248083019260209291908290030181600087803b158015610a9557600080fd5b505af1158015610aa9573d6000803e3d6000fd5b505050506040513d6020811015610abf57600080fd5b5051604080517f82e37b2c000000000000000000000000000000000000000000000000000000008152600481018390529051919450600080516020615d5c833981519152916382e37b2c916024808201926020929091908290030181600087803b158015610b2c57600080fd5b505af1158015610b40573d6000803e3d6000fd5b505050506040513d6020811015610b5657600080fd5b5051604080517fe3c08adf000000000000000000000000000000000000000000000000000000008152600481018690529051919350600080516020615d5c8339815191529163e3c08adf916024808201926020929091908290030181600087803b158015610bc357600080fd5b505af1158015610bd7573d6000803e3d6000fd5b505050506040513d6020811015610bed57600080fd5b505133600081815260066020908152604080832088905587835260089091529020805473ffffffffffffffffffffffffffffffffffffffff1916909117905590508115610c76576000828152600760209081526040808320869055858352600882528083206001908101869055600a8352818420868552909252909120805460ff191690911790555b8015801590610c855750828114155b15610c9f5760008381526008602052604090206006018190555b845160010185525b50929392505050565b6005546002546000828152600b602052604090206004015442910181118015610d1b57506000828152600b602052604090206002015481111580610d1b57506000828152600b602052604090206002015481118015610d1b57506000828152600b6020526040902054155b15610d3557610d30600083883489898961342b565b610ee4565b6000828152600b602052604090206002015481118015610d6757506000828152600b602052604090206003015460ff16155b15610eaf576000828152600b60205260409020600301805460ff19166001179055610d91836139a0565b925080670de0b6b3a764000002836000015101836000018181525050858360200151018360200181815250507fa7801a70b37e729a11492aad44fd3dba89b4149f0609dc0f6837bf9e57e2671a3360086000898152602001908152602001600020600101543486600001518760200151886040015189606001518a608001518b60a001518c60c001518d60e00151604051808c600160a060020a0316600160a060020a031681526020018b600019166000191681526020018a815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405180910390a15b600086815260086020526040902060030154610ed1903463ffffffff613da316565b6000878152600860205260409020600301555b505050505050565b6005546002546000828152600b602052604081206004015490929142910181118015610f5a57506000828152600b602052604090206002015481111580610f5a57506000828152600b602052604090206002015481118015610f5a57506000828152600b6020526040902054155b15610fa2576000828152600b6020526040902060050154610f9b90670de0b6b3a764000090610f8f908263ffffffff613da316565b9063ffffffff613e0416565b9250610fac565b6544364c5bb00092505b505090565b60408051808201909152600981527f464f4d4f20466173740000000000000000000000000000000000000000000000602082015281565b610ff0615ce2565b600f54600090819060ff161515600114611056576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b33803b801561109d576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b85633b9aca008110156110f5576040805160e560020a62461bcd0281526020600482015260216024820152600080516020615d7c833981519152604482015260f860020a607902606482015290519081900360840190fd5b69152d02c7e14af6800000811115611145576040805160e560020a62461bcd02815260206004820152600e6024820152600080516020615dbc833981519152604482015290519081900360640190fd5b336000908152600660205260409020549450881580611174575060008581526008602052604090206001015489145b156111925760008581526008602052604090206006015493506111d1565b60008981526007602090815260408083205488845260089092529091206006015490945084146111d15760008581526008602052604090206006018490555b6111da88613e31565b97506111e985858a8a8a613e56565b505050505050505050565b600054600160a060020a03163314611256576040805160e560020a62461bcd02815260206004820152601760248201527f6f6e6c792061646d696e2063616e206163746976617465000000000000000000604482015290519081900360640190fd5b600f5460ff16156112b1576040805160e560020a62461bcd02815260206004820152601c60248201527f464f4d4f2053686f727420616c72656164792061637469766174656400000000604482015290519081900360640190fd5b600f805460ff1916600190811790915560058190556002548154600092909252600b602052429091019081037f72c6bfb7988af3a1efa6568f02a999bc52252641c659d85961ca3d372b57d5d35560b4017f72c6bfb7988af3a1efa6568f02a999bc52252641c659d85961ca3d372b57d5d155565b60066020526000908152604090205481565b60045481565b600b60208190526000918252604090912080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b01549a909b0154989a9799969860ff90961697949693959294919390928c565b600a60209081526000928352604080842090915290825290205460ff1681565b600d602052600090815260409020805460019091015482565b60076020526000908152604090205481565b6113f4615ce2565b600f5460009060ff161515600114611458576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b33803b801561149f576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b84633b9aca008110156114f7576040805160e560020a62461bcd0281526020600482015260216024820152600080516020615d7c833981519152604482015260f860020a607902606482015290519081900360840190fd5b69152d02c7e14af6800000811115611547576040805160e560020a62461bcd02815260206004820152600e6024820152600080516020615dbc833981519152604482015290519081900360640190fd5b33600090815260066020526040902054935087158061156557508388145b156115835760008481526008602052604090206006015497506115b0565b60008481526008602052604090206006015488146115b05760008481526008602052604090206006018890555b6115b987613e31565b96506115c88489898989613e56565b5050505050505050565b6000806000806115e0615ce2565b600f5460ff161515600114611641576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b33803b8015611688576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b60055433600090815260066020908152604080832054848452600b909252909120600201549198504297509550861180156116d557506000878152600b602052604090206003015460ff16155b80156116ee57506000878152600b602052604090205415155b15611894576000878152600b60205260409020600301805460ff19166001179055611718836139a0565b925061172385614076565b9350600084111561177457600085815260086020526040808220549051600160a060020a039091169186156108fc02918791818181858888f19350505050158015611772573d6000803e3d6000fd5b505b85670de0b6b3a764000002836000015101836000018181525050848360200151018360200181815250507f0bd0dba8ab932212fa78150cdb7b0275da72e255875967b5cad11464cf71bedc3360086000888152602001908152602001600020600101548686600001518760200151886040015189606001518a608001518b60a001518c60c001518d60e00151604051808c600160a060020a0316600160a060020a031681526020018b600019166000191681526020018a815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405180910390a161194a565b61189d85614076565b935060008411156118ee57600085815260086020526040808220549051600160a060020a039091169186156108fc02918791818181858888f193505050501580156118ec573d6000803e3d6000fd5b505b6000858152600860209081526040918290206001015482513381529182015280820186905260608101889052905186917f8f36579a548bc439baa172a6521207464154da77f411e2da3db2f53affe6cc3a919081900360800190a25b50505050505050565b6000808080808033803b80156119a1576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b6119aa8b6140fd565b604080517faa4d490b000000000000000000000000000000000000000000000000000000008152336004820181905260248201849052600160a060020a038e1660448301528c151560648301528251939b509950349850600080516020615d5c8339815191529263aa4d490b928a926084808201939182900301818588803b158015611a3557600080fd5b505af1158015611a49573d6000803e3d6000fd5b50505050506040513d6040811015611a6057600080fd5b508051602091820151600160a060020a03808b1660008181526006865260408082205485835260088852918190208054600190910154825188151581529889018790529416878201526060870193909352608086018c90524260a0870152915193995091975095508a92909186917fdd6176433ff5026bbce96b068584b7bbe3514227e72df9c630b749ae87e64442919081900360c00190a45050505050505050505050565b33600080516020615d5c83398151915214611b91576040805160e560020a62461bcd02815260206004820152602760248201527f796f7572206e6f7420706c617965724e616d657320636f6e74726163742e2e2e60448201527f20686d6d6d2e2e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0383166000908152600660205260409020548414611bcc57600160a060020a03831660009081526006602052604090208490555b6000828152600760205260409020548414611bf35760008281526007602052604090208490555b600084815260086020526040902054600160a060020a03848116911614611c49576000848152600860205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790555b6000848152600860205260409020600101548214611c765760008481526008602052604090206001018290555b6000848152600860205260409020600601548114611ca35760008481526008602052604090206006018190555b6000848152600a6020908152604080832085845290915290205460ff161515611ceb576000848152600a602090815260408083208584529091529020805460ff191660011790555b50505050565b600c60209081526000928352604080842090915290825290205481565b60055481565b6005546000818152600b60205260408120600201549091829182919042118015611d5057506000818152600b602052604090206003015460ff16155b8015611d6957506000818152600b602052604090205415155b15611e8a576000818152600b6020526040902054851415611e4e576000818152600b6020526040902060070154611dd790606490611dae90603063ffffffff61491016565b811515611db757fe5b60008881526008602052604090206002015491900463ffffffff613da316565b6000868152600960209081526040808320858452909152902060020154611e3090611e1290611e068986614987565b9063ffffffff614a5516565b6000888152600860205260409020600301549063ffffffff613da316565b60008781526008602052604090206004015491955093509150611eb2565b600085815260086020908152604080832060029081015460098452828520868652909352922090910154611e3090611e1290611e068986614987565b60008581526008602052604090206002810154600590910154611e3090611e12908890614ab5565b509193909250565b6000808080808033803b8015611f08576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b611f118b6140fd565b604080517f745ea0c1000000000000000000000000000000000000000000000000000000008152336004820181905260248201849052604482018e90528c151560648301528251939b509950349850600080516020615d5c8339815191529263745ea0c1928a926084808201939182900301818588803b158015611a3557600080fd5b600080600080611fa2615ce2565b600f5460ff161515600114612003576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b600554600160a060020a038716600090815260066020908152604080832054848452600b9092529091206002015491965042955093508411801561205957506000858152600b602052604090206003015460ff16155b801561207257506000858152600b602052604090205415155b15612218576000858152600b60205260409020600301805460ff1916600117905561209c816139a0565b90506120a783614076565b915060008211156120f857600083815260086020526040808220549051600160a060020a039091169184156108fc02918591818181858888f193505050501580156120f6573d6000803e3d6000fd5b505b83670de0b6b3a764000002816000015101816000018181525050828160200151018160200181815250507f0bd0dba8ab932212fa78150cdb7b0275da72e255875967b5cad11464cf71bedc86600860008681526020019081526020016000206001015484846000015185602001518660400151876060015188608001518960a001518a60c001518b60e00151604051808c600160a060020a0316600160a060020a031681526020018b600019166000191681526020018a815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405180910390a1610ee4565b61222183614076565b9150600082111561227257600083815260086020526040808220549051600160a060020a039091169184156108fc02918591818181858888f19350505050158015612270573d6000803e3d6000fd5b505b600083815260086020908152604091829020600101548251600160a060020a038a1681529182015280820184905260608101869052905184917f8f36579a548bc439baa172a6521207464154da77f411e2da3db2f53affe6cc3a919081900360800190a2505050505050565b60008060008060008060008060008060008060008060006005549050600b60008281526020019081526020016000206009015481600b600084815260200190815260200160002060050154600b600085815260200190815260200160002060020154600b600086815260200190815260200160002060040154600b600087815260200190815260200160002060070154600b600088815260200190815260200160002060000154600a02600b6000898152602001908152602001600020600101540160086000600b60008b815260200190815260200160002060000154815260200190815260200160002060000160009054906101000a9004600160a060020a031660086000600b60008c815260200190815260200160002060000154815260200190815260200160002060010154600c60008b8152602001908152602001600020600080815260200190815260200160002054600c60008c815260200190815260200160002060006001815260200190815260200160002054600c60008d815260200190815260200160002060006002815260200190815260200160002054600c60008e8152602001908152602001600020600060038152602001908152602001600020546003546103e802600454019e509e509e509e509e509e509e509e509e509e509e509e509e509e5050909192939495969798999a9b9c9d565b6124e4615ce2565b600f54600090819060ff16151560011461254a576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b33803b8015612591576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b85633b9aca008110156125e9576040805160e560020a62461bcd0281526020600482015260216024820152600080516020615d7c833981519152604482015260f860020a607902606482015290519081900360840190fd5b69152d02c7e14af6800000811115612639576040805160e560020a62461bcd02815260206004820152600e6024820152600080516020615dbc833981519152604482015290519081900360640190fd5b336000908152600660205260409020549450600160a060020a03891615806126695750600160a060020a03891633145b156126875760008581526008602052604090206006015493506111d1565b600160a060020a0389166000908152600660208181526040808420548985526008909252909220015490945084146111d15760008581526008602052604090206006018490556111da88613e31565b6126de615ce2565b600f5460009060ff161515600114612742576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b33803b8015612789576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b34633b9aca008110156127e1576040805160e560020a62461bcd0281526020600482015260216024820152600080516020615d7c833981519152604482015260f860020a607902606482015290519081900360840190fd5b69152d02c7e14af6800000811115612831576040805160e560020a62461bcd02815260206004820152600e6024820152600080516020615dbc833981519152604482015290519081900360640190fd5b61283a85610a0e565b33600090815260066020526040902054909550935086158061285b57508387145b156128795760008481526008602052604090206006015496506128a6565b60008481526008602052604090206006015487146128a65760008481526008602052604090206006018790555b6128af86613e31565b955061194a84888888610cb0565b33600080516020615d5c83398151915214612948576040805160e560020a62461bcd02815260206004820152602760248201527f796f7572206e6f7420706c617965724e616d657320636f6e74726163742e2e2e60448201527f20686d6d6d2e2e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000828152600a6020908152604080832084845290915290205460ff161515612990576000828152600a602090815260408083208484529091529020805460ff191660011790555b5050565b6000808080808033803b80156129e2576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b6129eb8b6140fd565b604080517fc0942dfd000000000000000000000000000000000000000000000000000000008152336004820181905260248201849052604482018e90528c151560648301528251939b509950349850600080516020615d5c8339815191529263c0942dfd928a926084808201939182900301818588803b158015611a3557600080fd5b60408051808201909152600481527f4641535400000000000000000000000000000000000000000000000000000000602082015281565b612aad615ce2565b600f54600090819060ff161515600114612b13576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b34633b9aca00811015612b6b576040805160e560020a62461bcd0281526020600482015260216024820152600080516020615d7c833981519152604482015260f860020a607902606482015290519081900360840190fd5b69152d02c7e14af6800000811115612bbb576040805160e560020a62461bcd02815260206004820152600e6024820152600080516020615dbc833981519152604482015290519081900360640190fd5b612bc484610a0e565b336000908152600660205260409020549094509250600160a060020a0386161580612bf75750600160a060020a03861633145b15612c15576000838152600860205260409020600601549150612c5c565b600160a060020a038616600090815260066020818152604080842054878552600890925290922001549092508214612c5c5760008381526008602052604090206006018290555b612c6585613e31565b9450610ee483838787610cb0565b600960209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b612cad615ce2565b600f54600090819060ff161515600114612d13576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b33803b8015612d5a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615ddc833981519152604482015290519081900360640190fd5b34633b9aca00811015612db2576040805160e560020a62461bcd0281526020600482015260216024820152600080516020615d7c833981519152604482015260f860020a607902606482015290519081900360840190fd5b69152d02c7e14af6800000811115612e02576040805160e560020a62461bcd02815260206004820152600e6024820152600080516020615dbc833981519152604482015290519081900360640190fd5b612e0b86610a0e565b336000908152600660205260409020549096509450871580612e3d575060008581526008602052604090206001015488145b15612e5b576000858152600860205260409020600601549350612e9a565b6000888152600760209081526040808320548884526008909252909120600601549094508414612e9a5760008581526008602052604090206006018490555b612ea387613e31565b96506115c885858989610cb0565b612eb9615ce2565b600f54600090819060ff161515600114612f1f576040805160e560020a62461bcd0281526020600482015260296024820152600080516020615d9c8339815191526044820152600080516020615d3c833981519152606482015290519081900360840190fd5b34633b9aca00811015612f77576040805160e560020a62461bcd0281526020600482015260216024820152600080516020615d7c833981519152604482015260f860020a607902606482015290519081900360840190fd5b69152d02c7e14af6800000811115612fc7576040805160e560020a62461bcd02815260206004820152600e6024820152600080516020615dbc833981519152604482015290519081900360640190fd5b612fd18785614b12565b600160a060020a038816600090815260066020526040902054909450925085158061300c575060008381526008602052604090206001015486145b1561302a576000838152600860205260409020600601549150613069565b60008681526007602090815260408083205486845260089092529091206006015490925082146130695760008381526008602052604090206006018290555b61307285613e31565b945061194a8784848888614dd0565b600e602052600090815260409020805460019091015482565b6005546000818152600b60205260408120600201549091904290811015613120576002546000838152600b6020526040902060040154018111156130fa576000828152600b6020526040902060020154610f9b908263ffffffff614a5516565b6002546000838152600b6020526040902060040154610f9b91018263ffffffff614a5516565b60009250610fac565b6002546000838152600b602052604081206004015490914291018111801561319357506000848152600b60205260409020600201548111158061319357506000848152600b60205260409020600201548111801561319357506000848152600b6020526040902054155b156131c1576000848152600b60205260409020600601546131ba908463ffffffff61500616565b91506131ca565b6131ba83615027565b5092915050565b6005546002546000828152600b60205260408120600401549092914291018111801561323f57506000828152600b60205260409020600201548111158061323f57506000828152600b60205260409020600201548111801561323f57506000828152600b6020526040902054155b15613273576000828152600b602052604090206005015461326c908590610f8f908263ffffffff613da316565b925061327c565b61326c8461509f565b5050919050565b600f5460ff1681565b60035481565b6008602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154600160a060020a039095169593949293919290919087565b6005546001016000818152600b6020526040902060070154613301903463ffffffff613da316565b6000828152600b6020908152604091829020600701929092558051838152349281019290925280517f74b1d2f771e0eff1b2c36c38499febdbea80fe4013bdace4fc4b653322c2895c9281900390910190a150565b6000806000806000806000806000600554915050600160a060020a0389166000908152600660209081526040808320548084526008808452828520600180820154600987528588208989528752948720015495839052935260028301546005909301549093849390916133ec906133ce908690614ab5565b6000878152600860205260409020600301549063ffffffff613da316565b600095865260086020908152604080882060040154600983528189209989529890915290952054939e929d50909b509950919750919550909350915050565b600085815260096020908152604080832089845290915281206001015481908190819015156134615761345e898661510c565b94505b60008a8152600b602052604090206006015468056bc75e2d631000001180156134bb575060008981526009602090815260408083208d8452909152902054670de0b6b3a7640000906134b9908a63ffffffff613da316565b115b156135425760008981526009602090815260408083208d84529091529020546134f390670de0b6b3a76400009063ffffffff614a5516565b9350613505888563ffffffff614a5516565b60008a81526008602052604090206003015490935061352a908463ffffffff613da316565b60008a81526008602052604090206003015592965086925b633b9aca008811156139935760008a8152600b6020526040902060060154613570908963ffffffff61500616565b9150670de0b6b3a764000082106135e75761358b828b61516b565b60008a8152600b602052604090205489146135b25760008a8152600b602052604090208990555b60008a8152600b602052604090206001015486146135df5760008a8152600b602052604090206001018690555b845160640185525b67016345785d8a0000881061382757600480546001019055613607615247565b15156001141561382757678ac7230489e8000088106136a85760035460649061363790604b63ffffffff61491016565b81151561364057fe5b60008b8152600860205260409020600201549190049150613667908263ffffffff613da316565b60008a81526008602052604090206002015560035461368c908263ffffffff614a5516565b60035584516d0eca8847c4129106ce83000000000185526137fc565b670de0b6b3a764000088101580156136c75750678ac7230489e8000088105b15613754576003546064906136e390603263ffffffff61491016565b8115156136ec57fe5b60008b8152600860205260409020600201549190049150613713908263ffffffff613da316565b60008a815260086020526040902060020155600354613738908263ffffffff614a5516565b60035584516d09dc5ada82b70b59df02000000000185526137fc565b67016345785d8a000088101580156137735750670de0b6b3a764000088105b156137fc5760035460649061378f90601963ffffffff61491016565b81151561379857fe5b60008b81526008602052604090206002015491900491506137bf908263ffffffff613da316565b60008a8152600860205260409020600201556003546137e4908263ffffffff614a5516565b60035584516d0eca8847c4129106ce83000000000185525b84516d314dc6448d9338c15b0a000000008202016c7e37be2022c0914b268000000001855260006004555b60045485516103e890910201855260008981526009602090815260408083208d845290915290206001015461386390839063ffffffff613da316565b60008a81526009602090815260408083208e84529091529020600181019190915554613890908990613da3565b60008a81526009602090815260408083208e8452825280832093909355600b905220600501546138c790839063ffffffff613da316565b60008b8152600b602052604090206005810191909155600601546138f290899063ffffffff613da316565b60008b8152600b6020908152604080832060060193909355600c81528282208983529052205461392990899063ffffffff613da316565b60008b8152600c602090815260408083208a84529091529020556139518a8a8a8a8a8a61545e565b94506139618a8a8a89868a615668565b9450600160a060020a038b1615156139855761398089878a85896157d6565b613993565b6139938b8a888b868a615944565b5050505050505050505050565b6139a8615ce2565b6005546000818152600b6020526040812080546001820154600790920154909280808080808060646139e189603063ffffffff61491016565b8115156139ea57fe5b04965060328860008b8152600e60205260409020549190049650606490613a18908a9063ffffffff61491016565b811515613a2157fe5b60008b8152600e60205260409020600101549190049550606490613a4c908a9063ffffffff61491016565b811515613a5557fe5b049350613a7084611e0687818a818e8e63ffffffff614a5516565b60008c8152600b6020526040902060050154909350613a9d86670de0b6b3a764000063ffffffff61491016565b811515613aa657fe5b60008d8152600b60205260409020600501549190049250613af490670de0b6b3a764000090613adc90859063ffffffff61491016565b811515613ae557fe5b8791900463ffffffff614a5516565b90506000811115613b2457613b0f858263ffffffff614a5516565b9450613b21838263ffffffff613da316565b92505b60008a815260086020526040902060020154613b4790889063ffffffff613da316565b60008b8152600860205260408082206002019290925580549151600160a060020a039092169188156108fc0291899190818181858888f19350505050158015613b94573d6000803e3d6000fd5b50600054600160a060020a03166108fc613bb18660028104614a55565b6040518115909202916000818181858888f19350505050158015613bd9573d6000803e3d6000fd5b50613be78860028604613da3565b60008c8152600b60205260409020600781019190915560080154613c1290839063ffffffff613da316565b600b60008d815260200190815260200160002060080181905550600b60008c815260200190815260200160002060020154620f4240028d60000151018d60000181815250508867016345785d8a0000028a6a52b7d2dcc80cd2e4000000028e6020015101018d6020018181525050600860008b815260200190815260200160002060000160009054906101000a9004600160a060020a03168d60400190600160a060020a03169081600160a060020a031681525050600860008b8152602001908152602001600020600101548d606001906000191690816000191681525050868d6080018181525050848d60e0018181525050838d60c0018181525050828d60a00181815250506005600081548092919060010191905055508a806001019b505042600b60008d815260200190815260200160002060040181905550613d74600254613d6860b442613da390919063ffffffff16565b9063ffffffff613da316565b60008c8152600b6020526040902060028101919091556007018390558c9b505050505050505050505050919050565b81810182811015613dfe576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b92915050565b6000613e2a613e21613e1c858563ffffffff614a5516565b61509f565b611e068561509f565b9392505050565b600080821080613e415750600382115b15613e4e57506002613e51565b50805b919050565b6005546002546000828152600b602052604090206004015442910181118015613ec157506000828152600b602052604090206002015481111580613ec157506000828152600b602052604090206002015481118015613ec157506000828152600b6020526040902054155b15613efc57613ed384611e0689614076565b600088815260086020526040812060030191909155613ef7908389878a8a8961342b565b61194a565b6000828152600b602052604090206002015481118015613f2e57506000828152600b602052604090206003015460ff16155b1561194a576000828152600b60205260409020600301805460ff19166001179055613f58836139a0565b925080670de0b6b3a764000002836000015101836000018181525050868360200151018360200181815250507f88261ac70d02d5ea73e54fa6da17043c974de1021109573ec1f6f57111c823dd33600860008a815260200190815260200160002060010154856000015186602001518760400151886060015189608001518a60a001518b60c001518c60e00151604051808b600160a060020a0316600160a060020a031681526020018a6000191660001916815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019a505050505050505050505060405180910390a150505050505050565b6000818152600860205260408120600501548190614095908490615ab3565b6000838152600860205260409020600481015460038201546002909201546140c792613d68919063ffffffff613da316565b905060008111156140f35760008381526008602052604081206002810182905560038101829055600401555b8091505b50919050565b80516000908290828080602084118015906141185750600084115b1515614194576040805160e560020a62461bcd02815260206004820152602a60248201527f737472696e67206d757374206265206265747765656e203120616e642033322060448201527f6368617261637465727300000000000000000000000000000000000000000000606482015290519081900360840190fd5b8460008151811015156141a357fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a021415801561420a575084600185038151811015156141e257fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214155b1515614286576040805160e560020a62461bcd02815260206004820152602560248201527f737472696e672063616e6e6f74207374617274206f7220656e6420776974682060448201527f7370616365000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b84600081518110151561429557fe5b90602001015160f860020a900460f860020a02600160f860020a031916603060f860020a0214156143d8578460018151811015156142cf57fe5b90602001015160f860020a900460f860020a02600160f860020a031916607860f860020a021415151561434c576040805160e560020a62461bcd02815260206004820152601b60248201527f737472696e672063616e6e6f7420737461727420776974682030780000000000604482015290519081900360640190fd5b84600181518110151561435b57fe5b90602001015160f860020a900460f860020a02600160f860020a031916605860f860020a02141515156143d8576040805160e560020a62461bcd02815260206004820152601b60248201527f737472696e672063616e6e6f7420737461727420776974682030580000000000604482015290519081900360640190fd5b600091505b838210156148a85784517f40000000000000000000000000000000000000000000000000000000000000009086908490811061441557fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015614489575084517f5b000000000000000000000000000000000000000000000000000000000000009086908490811061446a57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b156144f657848281518110151561449c57fe5b90602001015160f860020a900460f860020a0260f860020a900460200160f860020a0285838151811015156144cd57fe5b906020010190600160f860020a031916908160001a9053508215156144f157600192505b61489d565b848281518110151561450457fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214806145d4575084517f60000000000000000000000000000000000000000000000000000000000000009086908490811061456057fe5b90602001015160f860020a900460f860020a02600160f860020a0319161180156145d4575084517f7b00000000000000000000000000000000000000000000000000000000000000908690849081106145b557fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b8061467e575084517f2f000000000000000000000000000000000000000000000000000000000000009086908490811061460a57fe5b90602001015160f860020a900460f860020a02600160f860020a03191611801561467e575084517f3a000000000000000000000000000000000000000000000000000000000000009086908490811061465f57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b15156146fa576040805160e560020a62461bcd02815260206004820152602260248201527f737472696e6720636f6e7461696e7320696e76616c696420636861726163746560448201527f7273000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b848281518110151561470857fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214156147e757848260010181518110151561474457fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a02141515156147e7576040805160e560020a62461bcd02815260206004820152602860248201527f737472696e672063616e6e6f7420636f6e7461696e20636f6e7365637574697660448201527f6520737061636573000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b82158015614893575084517f30000000000000000000000000000000000000000000000000000000000000009086908490811061482057fe5b90602001015160f860020a900460f860020a02600160f860020a0319161080614893575084517f39000000000000000000000000000000000000000000000000000000000000009086908490811061487457fe5b90602001015160f860020a900460f860020a02600160f860020a031916115b1561489d57600192505b6001909101906143dd565b600183151514614902576040805160e560020a62461bcd02815260206004820152601d60248201527f737472696e672063616e6e6f74206265206f6e6c79206e756d62657273000000604482015290519081900360640190fd5b505050506020015192915050565b600082151561492157506000613dfe565b5081810281838281151561493157fe5b0414613dfe576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b60008281526009602090815260408083208484528252808320600190810154600b8085528386206005810154938101548752600e8652938620548787529452600790920154670de0b6b3a764000093614a449392614a38929091614a0f9187916064916149f99163ffffffff61491016565b811515614a0257fe5b049063ffffffff61491016565b811515614a1857fe5b6000888152600b602052604090206008015491900463ffffffff613da316565b9063ffffffff61491016565b811515614a4d57fe5b049392505050565b600082821115614aaf576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b600082815260096020908152604080832084845282528083206002810154600190910154600b90935290832060080154613e2a92670de0b6b3a764000091614afc91614910565b811515614b0557fe5b049063ffffffff614a5516565b614b1a615ce2565b600160a060020a0383166000908152600660205260408120549080821515614dc657604080517fe56556a9000000000000000000000000000000000000000000000000000000008152600160a060020a03881660048201529051600080516020615d5c8339815191529163e56556a99160248083019260209291908290030181600087803b158015614bab57600080fd5b505af1158015614bbf573d6000803e3d6000fd5b505050506040513d6020811015614bd557600080fd5b5051604080517f82e37b2c000000000000000000000000000000000000000000000000000000008152600481018390529051919450600080516020615d5c833981519152916382e37b2c916024808201926020929091908290030181600087803b158015614c4257600080fd5b505af1158015614c56573d6000803e3d6000fd5b505050506040513d6020811015614c6c57600080fd5b5051604080517fe3c08adf000000000000000000000000000000000000000000000000000000008152600481018690529051919350600080516020615d5c8339815191529163e3c08adf916024808201926020929091908290030181600087803b158015614cd957600080fd5b505af1158015614ced573d6000803e3d6000fd5b505050506040513d6020811015614d0357600080fd5b5051600160a060020a038716600081815260066020908152604080832088905587835260089091529020805473ffffffffffffffffffffffffffffffffffffffff1916909117905590508115614d95576000828152600760209081526040808320869055858352600882528083206001908101869055600a8352818420868552909252909120805460ff191690911790555b8015801590614da45750828114155b15614dbe5760008381526008602052604090206006018190555b845160010185525b5092949350505050565b6005546002546000828152600b602052604090206004015442910181118015614e3b57506000828152600b602052604090206002015481111580614e3b57506000828152600b602052604090206002015481118015614e3b57506000828152600b6020526040902054155b15614e4f57613ef78783883489898961342b565b6000828152600b602052604090206002015481118015614e8157506000828152600b602052604090206003015460ff16155b15614fc9576000828152600b60205260409020600301805460ff19166001179055614eab836139a0565b925080670de0b6b3a764000002836000015101836000018181525050858360200151018360200181815250507fa7801a70b37e729a11492aad44fd3dba89b4149f0609dc0f6837bf9e57e2671a8760086000898152602001908152602001600020600101543486600001518760200151886040015189606001518a608001518b60a001518c60c001518d60e00151604051808c600160a060020a0316600160a060020a031681526020018b600019166000191681526020018a815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405180910390a15b600086815260086020526040902060030154614feb903463ffffffff613da316565b60008781526008602052604090206003015550505050505050565b6000613e2a61501484615027565b611e06615027868663ffffffff613da316565b60006309502f9061508f6d03b2a1d15167e7c5699bfde00000611e0661508a7a0dac7055469777a6122ee4310dd6c14410500f2904840000000000613d686b01027e72f1f1281308800000614a388a670de0b6b3a764000063ffffffff61491016565b615b4a565b81151561509857fe5b0492915050565b60006150b2670de0b6b3a7640000615b9d565b61508f60026150e56150d286670de0b6b3a764000063ffffffff61491016565b65886c8f6730709063ffffffff61491016565b8115156150ee57fe5b04613d686150fb86615b9d565b6304a817c89063ffffffff61491016565b615114615ce2565b6000838152600860205260409020600501541561514857600083815260086020526040902060050154615148908490615ab3565b506005805460009384526008602052604090932001919091558051600a01815290565b6000818152600b60205260408120600201544291908211801561519a57506000838152600b6020526040902054155b156151be576151b782613d68600a670de0b6b3a764000088614a02565b90506151eb565b6000838152600b60205260409020600201546151e890613d68600a670de0b6b3a764000088614a02565b90505b6151fd61012c8363ffffffff613da316565b81101561521d576000838152600b60205260409020600201819055611ceb565b61522f61012c8363ffffffff613da316565b6000848152600b602052604090206002015550505050565b6000806153b843613d6842336040516020018082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106152c25780518252601f1990920191602091820191016152a3565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120925050508115156152f857fe5b04613d6845613d6842416040516020018082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106153715780518252601f199092019160209182019101615352565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120925050508115156153a757fe5b04613d68424463ffffffff613da316565b604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106154065780518252601f1990920191602091820191016153e7565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912060045490945092506103e89150839050046103e80282031015615455576001915061545a565b600091505b5090565b615466615ce2565b60648504603286046000808061547c8486613da3565b60008054604051929650600160a060020a031691869181818185875af19250505015156154a95760009392505b600a8a0491508a89141580156154cf575060008981526008602052604090206001015415155b1561556f576000898152600860205260409020600401546154f790839063ffffffff613da316565b60008a815260086020908152604091829020600481019390935582546001909301548251600160a060020a03909416845290830152818101849052426060830152518c918e918c917f590bbc0fc16915a85269a48f74783c39842b7ae9eceb7c295c95dbe8b3ec7331919081900360800190a4615573565b8192505b6000888152600d60205260409020600101546155b59060649061559d908d9063ffffffff61491016565b8115156155a657fe5b8591900463ffffffff613da316565b9250600083111561565857506000546002830490600160a060020a03166108fc6155df8584614a55565b6040518115909202916000818181858888f19350505050158015615607573d6000803e3d6000fd5b5060008c8152600b602052604090206007015461562a908263ffffffff613da316565b60008d8152600b602052604090206007015560c087015161565290849063ffffffff613da316565b60c08801525b50949a9950505050505050505050565b615670615ce2565b6000848152600d6020526040812054819081908190606490615699908b9063ffffffff61491016565b8115156156a257fe5b0493506064890492506156c083600354613da390919063ffffffff16565b6003556000888152600d602052604090206001015461573190615724906064906156f1908d9063ffffffff61491016565b8115156156fa57fe5b04606461570e8d600e63ffffffff61491016565b81151561571757fe5b049063ffffffff613da316565b8a9063ffffffff614a5516565b9850615743898563ffffffff614a5516565b91506157518b8b868a615ba9565b9050600081111561576f5761576c848263ffffffff614a5516565b93505b60008b8152600b602052604090206007015461579590613d68848463ffffffff613da316565b60008c8152600b602052604090206007015560e08601516157bd90859063ffffffff613da316565b60e0870152506101008501525091979650505050505050565b836c01431e0fae6d7217caa00000000242670de0b6b3a76400000282600001510101816000018181525050600554751aba4714957d300d0e549208b31adb100000000000000285826020015101018160200181815250507f500e72a0e114930aebdbcb371ccdbf43922c49f979794b5de4257ff7e310c7468160000151826020015160086000898152602001908152602001600020600101543387878760400151886060015189608001518a60a001518b60c001518c60e001518d6101000151600354604051808f81526020018e81526020018d600019166000191681526020018c600160a060020a0316600160a060020a031681526020018b81526020018a815260200189600160a060020a0316600160a060020a0316815260200188600019166000191681526020018781526020018681526020018581526020018481526020018381526020018281526020019e50505050505050505050505050505060405180910390a15050505050565b836c01431e0fae6d7217caa00000000242670de0b6b3a76400000282600001510101816000018181525050600554751aba4714957d300d0e549208b31adb100000000000000285826020015101018160200181815250507f500e72a0e114930aebdbcb371ccdbf43922c49f979794b5de4257ff7e310c7468160000151826020015160086000898152602001908152602001600020600101548987878760400151886060015189608001518a60a001518b60c001518c60e001518d6101000151600354604051808f81526020018e81526020018d600019166000191681526020018c600160a060020a0316600160a060020a031681526020018b81526020018a815260200189600160a060020a0316600160a060020a0316815260200188600019166000191681526020018781526020018681526020018581526020018481526020018381526020018281526020019e50505050505050505050505050505060405180910390a1505050505050565b6000615abf8383614ab5565b90506000811115615b4557600083815260086020526040902060030154615aed90829063ffffffff613da316565b6000848152600860209081526040808320600301939093556009815282822085835290522060020154615b2790829063ffffffff613da316565b60008481526009602090815260408083208684529091529020600201555b505050565b6000806002615b5a846001613da3565b811515615b6357fe5b0490508291505b818110156140f7578091506002615b8c8285811515615b8557fe5b0483613da3565b811515615b9557fe5b049050615b6a565b6000613dfe8283614910565b6000848152600b602052604081206005015481908190615bd786670de0b6b3a764000063ffffffff61491016565b811515615be057fe5b6000898152600b60205260409020600801549190049250615c0890839063ffffffff613da316565b6000888152600b6020526040902060080155670de0b6b3a7640000615c33838663ffffffff61491016565b811515615c3c57fe5b60008881526009602090815260408083208c8452825280832060020154600b90925290912060080154929091049250615c8f91613d68908490670de0b6b3a764000090614afc908a63ffffffff61491016565b60008781526009602090815260408083208b8452825280832060020193909355600b90522060050154615cd790670de0b6b3a764000090613adc90859063ffffffff61491016565b979650505050505050565b6101206040519081016040528060008152602001600081526020016000600160a060020a03168152602001600080191681526020016000815260200160008152602001600081526020016000815260200160008152509056006e20646973636f726400000000000000000000000000000000000000000000000000000000000000000000001c52eff9c47fe419e3b269f5759d98d2072cc91a706f636b6574206c696e743a206e6f7420612076616c69642063757272656e63697473206e6f74207265616479207965742e2020636865636b203f65746120696e6f20766974616c696b2c206e6f000000000000000000000000000000000000736f7272792068756d616e73206f6e6c79000000000000000000000000000000a165627a7a723058203d48f1462965cf5109e648036bd7a48b8285217386ca37814e40a27770b9a4870029

Verified Source Code Partial Match

Compiler: v0.4.24+commit.e67f0147 EVM: byzantium Optimization: Yes (200 runs)
FoMo3DFast.sol 2250 lines
pragma solidity ^0.4.24;


library NameFilter {
    /**
     * @dev filters name strings
     * -converts uppercase to lower case.
     * -makes sure it does not start/end with a space
     * -makes sure it does not contain multiple spaces in a row
     * -cannot be only numbers
     * -cannot start with 0x
     * -restricts characters to A-Z, a-z, 0-9, and space.
     * @return reprocessed string in bytes32 format
     */
    function nameFilter(string _input)
        internal
        pure
        returns(bytes32)
    {
        bytes memory _temp = bytes(_input);
        uint256 _length = _temp.length;

        //sorry limited to 32 characters
        require (_length <= 32 && _length > 0, "string must be between 1 and 32 characters");
        // make sure it doesnt start with or end with space
        require(_temp[0] != 0x20 && _temp[_length-1] != 0x20, "string cannot start or end with space");
        // make sure first two characters are not 0x
        if (_temp[0] == 0x30)
        {
            require(_temp[1] != 0x78, "string cannot start with 0x");
            require(_temp[1] != 0x58, "string cannot start with 0X");
        }

        // create a bool to track if we have a non number character
        bool _hasNonNumber;

        // convert & check
        for (uint256 i = 0; i < _length; i++)
        {
            // if its uppercase A-Z
            if (_temp[i] > 0x40 && _temp[i] < 0x5b)
            {
                // convert to lower case a-z
                _temp[i] = byte(uint(_temp[i]) + 32);

                // we have a non number
                if (_hasNonNumber == false)
                    _hasNonNumber = true;
            } else {
                require
                (
                    // require character is a space
                    _temp[i] == 0x20 ||
                    // OR lowercase a-z
                    (_temp[i] > 0x60 && _temp[i] < 0x7b) ||
                    // or 0-9
                    (_temp[i] > 0x2f && _temp[i] < 0x3a),
                    "string contains invalid characters"
                );
                // make sure theres not 2x spaces in a row
                if (_temp[i] == 0x20)
                    require( _temp[i+1] != 0x20, "string cannot contain consecutive spaces");

                // see if we have a character other than a number
                if (_hasNonNumber == false && (_temp[i] < 0x30 || _temp[i] > 0x39))
                    _hasNonNumber = true;
            }
        }

        require(_hasNonNumber == true, "string cannot be only numbers");

        bytes32 _ret;
        assembly {
            _ret := mload(add(_temp, 32))
        }
        return (_ret);
    }
}

/**
 * @title SafeMath v0.1.9
 * @dev Math operations with safety checks that throw on error
 * change notes:  original SafeMath library from OpenZeppelin modified by Inventor
 * - added sqrt
 * - added sq
 * - added pwr
 * - changed asserts to requires with error log outputs
 * - removed div, its useless
 */
library SafeMath {

    /**
    * @dev Multiplies two numbers, throws on overflow.
    */
    function mul(uint256 a, uint256 b)
        internal
        pure
        returns (uint256 c)
    {
        if (a == 0) {
            return 0;
        }
        c = a * b;
        require(c / a == b, "SafeMath mul failed");
        return c;
    }

    /**
    * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        require(b <= a, "SafeMath sub failed");
        return a - b;
    }

    /**
    * @dev Adds two numbers, throws on overflow.
    */
    function add(uint256 a, uint256 b)
        internal
        pure
        returns (uint256 c)
    {
        c = a + b;
        require(c >= a, "SafeMath add failed");
        return c;
    }

    /**
     * @dev gives square root of given x.
     */
    function sqrt(uint256 x)
        internal
        pure
        returns (uint256 y)
    {
        uint256 z = ((add(x,1)) / 2);
        y = x;
        while (z < y)
        {
            y = z;
            z = ((add((x / z),z)) / 2);
        }
    }

    /**
     * @dev gives square. multiplies x by x
     */
    function sq(uint256 x)
        internal
        pure
        returns (uint256)
    {
        return (mul(x,x));
    }

    /**
     * @dev x to the power of y
     */
    function pwr(uint256 x, uint256 y)
        internal
        pure
        returns (uint256)
    {
        if (x==0)
            return (0);
        else if (y==0)
            return (1);
        else
        {
            uint256 z = x;
            for (uint256 i=1; i < y; i++)
                z = mul(z,x);
            return (z);
        }
    }
}



//==============================================================================
//   __|_ _    __|_ _  .
//  _\ | | |_|(_ | _\  .
//==============================================================================
library F3Ddatasets {
    //compressedData key
    // [76-33][32][31][30][29][28-18][17][16-6][5-3][2][1][0]
        // 0 - new player (bool)
        // 1 - joined round (bool)
        // 2 - new  leader (bool)
        // 3-5 - air drop tracker (uint 0-999)
        // 6-16 - round end time
        // 17 - winnerTeam
        // 18 - 28 timestamp
        // 29 - team
        // 30 - 0 = reinvest (round), 1 = buy (round), 2 = buy (ico), 3 = reinvest (ico)
        // 31 - airdrop happened bool
        // 32 - airdrop tier
        // 33 - airdrop amount won
    //compressedIDs key
    // [77-52][51-26][25-0]
        // 0-25 - pID
        // 26-51 - winPID
        // 52-77 - rID
    struct EventReturns {
        uint256 compressedData;
        uint256 compressedIDs;
        address winnerAddr;         // winner address
        bytes32 winnerName;         // winner name
        uint256 amountWon;          // amount won
        uint256 newPot;             // amount in new pot
        uint256 P3DAmount;          // amount distributed to p3d
        uint256 genAmount;          // amount distributed to gen
        uint256 potAmount;          // amount added to pot
    }
    struct Player {
        address addr;   // player address
        bytes32 name;   // player name
        uint256 win;    // winnings vault
        uint256 gen;    // general vault
        uint256 aff;    // affiliate vault
        uint256 lrnd;   // last round played
        uint256 laff;   // last affiliate id used
    }
    struct PlayerRounds {
        uint256 eth;    // eth player has added to round (used for eth limiter)
        uint256 keys;   // keys
        uint256 mask;   // player mask
        uint256 ico;    // ICO phase investment
    }
    struct Round {
        uint256 plyr;   // pID of player in lead
        uint256 team;   // tID of team in lead
        uint256 end;    // time ends/ended
        bool ended;     // has round end function been ran
        uint256 strt;   // time round started
        uint256 keys;   // keys
        uint256 eth;    // total eth in
        uint256 pot;    // eth to pot (during round) / final amount paid to winner (after round ends)
        uint256 mask;   // global mask
        uint256 ico;    // total eth sent in during ICO phase
        uint256 icoGen; // total eth for gen during ICO phase
        uint256 icoAvg; // average key price for ICO phase
    }
    struct TeamFee {
        uint256 gen;    // % of buy in thats paid to key holders of current round
        uint256 p3d;    // % of buy in thats paid to p3d holders
    }
    struct PotSplit {
        uint256 gen;    // % of pot thats paid to key holders of current round
        uint256 p3d;    // % of pot thats paid to p3d holders
    }
}

//==============================================================================
//  |  _      _ _ | _  .
//  |<(/_\/  (_(_||(_  .
//=======/======================================================================
library F3DKeysCalcShort {
    using SafeMath for *;
    /**
     * @dev calculates number of keys received given X eth
     * @param _curEth current amount of eth in contract
     * @param _newEth eth being spent
     * @return amount of ticket purchased
     */
    function keysRec(uint256 _curEth, uint256 _newEth)
        internal
        pure
        returns (uint256)
    {
        return(keys((_curEth).add(_newEth)).sub(keys(_curEth)));
    }

    /**
     * @dev calculates amount of eth received if you sold X keys
     * @param _curKeys current amount of keys that exist
     * @param _sellKeys amount of keys you wish to sell
     * @return amount of eth received
     */
    function ethRec(uint256 _curKeys, uint256 _sellKeys)
        internal
        pure
        returns (uint256)
    {
        return((eth(_curKeys)).sub(eth(_curKeys.sub(_sellKeys))));
    }

    /**
     * @dev calculates how many keys would exist with given an amount of eth
     * @param _eth eth "in contract"
     * @return number of keys that would exist
     */
    function keys(uint256 _eth)
        internal
        pure
        returns(uint256)
    {
        return ((((((_eth).mul(1000000000000000000)).mul(312500000000000000000000000)).add(5624988281256103515625000000000000000000000000000000000000000000)).sqrt()).sub(74999921875000000000000000000000)) / (156250000);
    }

    /**
     * @dev calculates how much eth would be in contract given a number of keys
     * @param _keys number of keys "in contract"
     * @return eth that would exists
     */
    function eth(uint256 _keys)
        internal
        pure
        returns(uint256)
    {
        return ((78125000).mul(_keys.sq()).add(((149999843750000).mul(_keys.mul(1000000000000000000))) / (2))) / ((1000000000000000000).sq());
    }
}

//==============================================================================
//  . _ _|_ _  _ |` _  _ _  _  .
//  || | | (/_| ~|~(_|(_(/__\  .
//==============================================================================


contract F3Devents {
    // fired whenever a player registers a name
    event onNewName
    (
        uint256 indexed playerID,
        address indexed playerAddress,
        bytes32 indexed playerName,
        bool isNewPlayer,
        uint256 affiliateID,
        address affiliateAddress,
        bytes32 affiliateName,
        uint256 amountPaid,
        uint256 timeStamp
    );

    // fired at end of buy or reload
    event onEndTx
    (
        uint256 compressedData,
        uint256 compressedIDs,
        bytes32 playerName,
        address playerAddress,
        uint256 ethIn,
        uint256 keysBought,
        address winnerAddr,
        bytes32 winnerName,
        uint256 amountWon,
        uint256 newPot,
        uint256 P3DAmount,
        uint256 genAmount,
        uint256 potAmount,
        uint256 airDropPot
    );

	// fired whenever theres a withdraw
    event onWithdraw
    (
        uint256 indexed playerID,
        address playerAddress,
        bytes32 playerName,
        uint256 ethOut,
        uint256 timeStamp
    );

    // fired whenever a withdraw forces end round to be ran
    event onWithdrawAndDistribute
    (
        address playerAddress,
        bytes32 playerName,
        uint256 ethOut,
        uint256 compressedData,
        uint256 compressedIDs,
        address winnerAddr,
        bytes32 winnerName,
        uint256 amountWon,
        uint256 newPot,
        uint256 P3DAmount,
        uint256 genAmount
    );

    // (fomo3d short only) fired whenever a player tries a buy after round timer
    // hit zero, and causes end round to be ran.
    event onBuyAndDistribute
    (
        address playerAddress,
        bytes32 playerName,
        uint256 ethIn,
        uint256 compressedData,
        uint256 compressedIDs,
        address winnerAddr,
        bytes32 winnerName,
        uint256 amountWon,
        uint256 newPot,
        uint256 P3DAmount,
        uint256 genAmount
    );

    // (fomo3d short only) fired whenever a player tries a reload after round timer
    // hit zero, and causes end round to be ran.
    event onReLoadAndDistribute
    (
        address playerAddress,
        bytes32 playerName,
        uint256 compressedData,
        uint256 compressedIDs,
        address winnerAddr,
        bytes32 winnerName,
        uint256 amountWon,
        uint256 newPot,
        uint256 P3DAmount,
        uint256 genAmount
    );

    // fired whenever an affiliate is paid
    event onAffiliatePayout
    (
        uint256 indexed affiliateID,
        address affiliateAddress,
        bytes32 affiliateName,
        uint256 indexed roundID,
        uint256 indexed buyerID,
        uint256 amount,
        uint256 timeStamp
    );

    // received pot swap deposit
    event onPotSwapDeposit
    (
        uint256 roundID,
        uint256 amountAddedToPot
    );
}


interface PlayerBookInterface {
    function getPlayerID(address _addr) external returns (uint256);
    function getPlayerName(uint256 _pID) external view returns (bytes32);
    function getPlayerLAff(uint256 _pID) external view returns (uint256);
    function getPlayerAddr(uint256 _pID) external view returns (address);
    function getNameFee() external view returns (uint256);
    function registerNameXIDFromDapp(address _addr, bytes32 _name, uint256 _affCode, bool _all) external payable returns(bool, uint256);
    function registerNameXaddrFromDapp(address _addr, bytes32 _name, address _affCode, bool _all) external payable returns(bool, uint256);
    function registerNameXnameFromDapp(address _addr, bytes32 _name, bytes32 _affCode, bool _all) external payable returns(bool, uint256);
}



contract modularFast is F3Devents {}


contract FoMo3DFast is modularFast {
    using SafeMath for *;
    using NameFilter for string;
    using F3DKeysCalcShort for uint256;

    PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0x1c52efF9C47fE419E3b269f5759d98d2072cC91A);

    address private admin = msg.sender;
    string constant public name = "FOMO Fast";
    string constant public symbol = "FAST";
    uint256 private rndExtra_ = 1 minutes;     // length of the very first ICO
    uint256 private rndGap_ = 2 minutes;         // length of ICO phase, set to 1 year for EOS.
    uint256 constant private rndInit_ = 3 minutes;                // round timer starts at this
    uint256 constant private rndInc_ = 10 seconds;              // every full key purchased adds this much to the timer
    uint256 constant private rndMax_ = 5 minutes;                // max length a round timer can be
    uint256 public airDropPot_;             // person who gets the airdrop wins part of this pot
    uint256 public airDropTracker_ = 0;     // incremented each time a "qualified" tx occurs.  used to determine winning air drop
    uint256 public rID_;    // round id number / total rounds that have happened
  //****************
  // PLAYER DATA
  //****************
    mapping (address => uint256) public pIDxAddr_;          // (addr => pID) returns player id by address
    mapping (bytes32 => uint256) public pIDxName_;          // (name => pID) returns player id by name
    mapping (uint256 => F3Ddatasets.Player) public plyr_;   // (pID => data) player data
    // (pID => rID => data) player round data by player id & round id
    mapping (uint256 => mapping (uint256 => F3Ddatasets.PlayerRounds)) public plyrRnds_;
    mapping (uint256 => mapping (bytes32 => bool)) public plyrNames_; // (pID => name => bool) list of names a player owns.  (used so you can change your display name amongst any name you own)
  //****************
  // ROUND DATA
  //****************
    mapping (uint256 => F3Ddatasets.Round) public round_;   // (rID => data) round data
    mapping (uint256 => mapping(uint256 => uint256)) public rndTmEth_;      // (rID => tID => data) eth in per team, by round id and team id
  //****************
  // TEAM FEE DATA
  //****************
    mapping (uint256 => F3Ddatasets.TeamFee) public fees_;          // (team => fees) fee distribution by team
    mapping (uint256 => F3Ddatasets.PotSplit) public potSplit_;     // (team => fees) pot split distribution by team

    constructor()
        public
    {
    // Team allocation structures
        // 0 = whales
        // 1 = bears
        // 2 = sneks
        // 3 = bulls

    // Team allocation percentages
        // (F3D, P3D) + (Pot , Referrals, Community)  解读:TeamFee, PotSplit 第一个参数都是分给现在key holder的比例, 第二个是给Pow3D的比例
            // Referrals / Community rewards are mathematically designed to come from the winner's share of the pot.
        fees_[0] = F3Ddatasets.TeamFee(30,6);   //50% to pot, 10% to aff, 2% to com, 1% to pot swap, 1% to air drop pot
        fees_[1] = F3Ddatasets.TeamFee(43,0);   //43% to pot, 10% to aff, 2% to com, 1% to pot swap, 1% to air drop pot
        fees_[2] = F3Ddatasets.TeamFee(56,10);  //20% to pot, 10% to aff, 2% to com, 1% to pot swap, 1% to air drop pot
        fees_[3] = F3Ddatasets.TeamFee(43,8);   //35% to pot, 10% to aff, 2% to com, 1% to pot swap, 1% to air drop pot

        // how to split up the final pot based on which team was picked
        // (F3D, P3D)
        potSplit_[0] = F3Ddatasets.PotSplit(15,10);  //48% to winner, 25% to next round, 2% to com
        potSplit_[1] = F3Ddatasets.PotSplit(25,0);   //48% to winner, 25% to next round, 2% to com
        potSplit_[2] = F3Ddatasets.PotSplit(20,20);  //48% to winner, 10% to next round, 2% to com
        potSplit_[3] = F3Ddatasets.PotSplit(30,10);  //48% to winner, 10% to next round, 2% to com
  	}
  //==============================================================================
  //     _ _  _  _|. |`. _  _ _  .
  //    | | |(_)(_||~|~|(/_| _\  .  (these are safety checks)
  //==============================================================================
      /**
       * @dev used to make sure no one can interact with contract until it has
       * been activated.
       */
      modifier isActivated() {
          require(activated_ == true, "its not ready yet.  check ?eta in discord");
          _;
      }

      /**
       * @dev prevents contracts from interacting with fomo3d
       */
      modifier isHuman() {
          address _addr = msg.sender;
          uint256 _codeLength;

          assembly {_codeLength := extcodesize(_addr)}
          require(_codeLength == 0, "sorry humans only");
          _;
      }

      /**
       * @dev sets boundaries for incoming tx
       */
      modifier isWithinLimits(uint256 _eth) {
          require(_eth >= 1000000000, "pocket lint: not a valid currency");
          require(_eth <= 100000000000000000000000, "no vitalik, no");
          _;
      }

  //==============================================================================
  //     _    |_ |. _   |`    _  __|_. _  _  _  .
  //    |_)|_||_)||(_  ~|~|_|| |(_ | |(_)| |_\  .  (use these to interact with contract)
  //====|=========================================================================
      /**
       * @dev emergency buy uses last stored affiliate ID and team snek
       */
      function()
          isActivated()
          isHuman()
          isWithinLimits(msg.value)
          public
          payable
      {
          // set up our tx event data and determine if player is new or not
          F3Ddatasets.EventReturns memory _eventData_ = determinePID(_eventData_);

          // fetch player id
          uint256 _pID = pIDxAddr_[msg.sender];

          // buy core
          buyCore(_pID, plyr_[_pID].laff, 2, _eventData_);
      }

      /**
       * @dev converts all incoming ethereum to keys.
       * -functionhash- 0x8f38f309 (using ID for affiliate)
       * -functionhash- 0x98a0871d (using address for affiliate)
       * -functionhash- 0xa65b37a1 (using name for affiliate)
       * @param _affCode the ID/address/name of the player who gets the affiliate fee
       * @param _team what team is the player playing for?
       */
      function buyXid(uint256 _affCode, uint256 _team)
          isActivated()
          isHuman()
          isWithinLimits(msg.value)
          public
          payable
      {
          // set up our tx event data and determine if player is new or not
          F3Ddatasets.EventReturns memory _eventData_ = determinePID(_eventData_);

          // fetch player id
          uint256 _pID = pIDxAddr_[msg.sender];

          // manage affiliate residuals
          // if no affiliate code was given or player tried to use their own, lolz
          if (_affCode == 0 || _affCode == _pID)
          {
              // use last stored affiliate code
              _affCode = plyr_[_pID].laff;

          // if affiliate code was given & its not the same as previously stored
          } else if (_affCode != plyr_[_pID].laff) {
              // update last affiliate
              plyr_[_pID].laff = _affCode;
          }

          // verify a valid team was selected
          _team = verifyTeam(_team);

          // buy core
          buyCore(_pID, _affCode, _team, _eventData_);
      }

      function buyXaddr(address _affCode, uint256 _team)
          isActivated()
          isWithinLimits(msg.value)
          public
          payable
      {
          // set up our tx event data and determine if player is new or not
          F3Ddatasets.EventReturns memory _eventData_ = determinePID(_eventData_);

          // fetch player id
          uint256 _pID = pIDxAddr_[msg.sender];

          // manage affiliate residuals
          uint256 _affID;
          // if no affiliate code was given or player tried to use their own, lolz
          if (_affCode == address(0) || _affCode == msg.sender)
          {
              // use last stored affiliate code
              _affID = plyr_[_pID].laff;

          // if affiliate code was given
          } else {
              // get affiliate ID from aff Code
              _affID = pIDxAddr_[_affCode];

              // if affID is not the same as previously stored
              if (_affID != plyr_[_pID].laff)
              {
                  // update last affiliate
                  plyr_[_pID].laff = _affID;
              }
          }

          // verify a valid team was selected
          _team = verifyTeam(_team);

          // buy core
          buyCore(_pID, _affID, _team, _eventData_);
      }

      function buyXname(bytes32 _affCode, uint256 _team)
          isActivated()
          isHuman()
          isWithinLimits(msg.value)
          public
          payable
      {
          // set up our tx event data and determine if player is new or not
          F3Ddatasets.EventReturns memory _eventData_ = determinePID(_eventData_);

          // fetch player id
          uint256 _pID = pIDxAddr_[msg.sender];

          // manage affiliate residuals
          uint256 _affID;
          // if no affiliate code was given or player tried to use their own, lolz
          if (_affCode == '' || _affCode == plyr_[_pID].name)
          {
              // use last stored affiliate code
              _affID = plyr_[_pID].laff;

          // if affiliate code was given
          } else {
              // get affiliate ID from aff Code
              _affID = pIDxName_[_affCode];

              // if affID is not the same as previously stored
              if (_affID != plyr_[_pID].laff)
              {
                  // update last affiliate
                  plyr_[_pID].laff = _affID;
              }
          }

          // verify a valid team was selected
          _team = verifyTeam(_team);

          // buy core
          buyCore(_pID, _affID, _team, _eventData_);
      }


       function buyXnameQR(address _realSender,bytes32 _affCode, uint256 _team)
          isActivated()
          isWithinLimits(msg.value)
          public
          payable
      {
          // set up our tx event data and determine if player is new or not
          F3Ddatasets.EventReturns memory _eventData_ = determinePIDQR(_realSender,_eventData_);

          // fetch player id
          uint256 _pID = pIDxAddr_[_realSender];

          // manage affiliate residuals
          uint256 _affID;
          // if no affiliate code was given or player tried to use their own, lolz
          if (_affCode == '' || _affCode == plyr_[_pID].name)
          {
              // use last stored affiliate code
              _affID = plyr_[_pID].laff;

          // if affiliate code was given
          } else {
              // get affiliate ID from aff Code
              _affID = pIDxName_[_affCode];

              // if affID is not the same as previously stored
              if (_affID != plyr_[_pID].laff)
              {
                  // update last affiliate
                  plyr_[_pID].laff = _affID;
              }
          }

          // verify a valid team was selected
          _team = verifyTeam(_team);

          // buy core
          buyCoreQR(_realSender, _pID, _affID, _team, _eventData_);
      }

      /**
       * @dev essentially the same as buy, but instead of you sending ether
       * from your wallet, it uses your unwithdrawn earnings.
       * -functionhash- 0x349cdcac (using ID for affiliate)
       * -functionhash- 0x82bfc739 (using address for affiliate)
       * -functionhash- 0x079ce327 (using name for affiliate)
       * @param _affCode the ID/address/name of the player who gets the affiliate fee
       * @param _team what team is the player playing for?
       * @param _eth amount of earnings to use (remainder returned to gen vault)
       */
      function reLoadXid(uint256 _affCode, uint256 _team, uint256 _eth)
          isActivated()
          isHuman()
          isWithinLimits(_eth)
          public
      {
          // set up our tx event data
          F3Ddatasets.EventReturns memory _eventData_;

          // fetch player ID
          uint256 _pID = pIDxAddr_[msg.sender];

          // manage affiliate residuals
          // if no affiliate code was given or player tried to use their own, lolz
          if (_affCode == 0 || _affCode == _pID)
          {
              // use last stored affiliate code
              _affCode = plyr_[_pID].laff;

          // if affiliate code was given & its not the same as previously stored
          } else if (_affCode != plyr_[_pID].laff) {
              // update last affiliate
              plyr_[_pID].laff = _affCode;
          }

          // verify a valid team was selected
          _team = verifyTeam(_team);

          // reload core
          reLoadCore(_pID, _affCode, _team, _eth, _eventData_);
      }

      function reLoadXaddr(address _affCode, uint256 _team, uint256 _eth)
          isActivated()
          isHuman()
          isWithinLimits(_eth)
          public
      {
          // set up our tx event data
          F3Ddatasets.EventReturns memory _eventData_;

          // fetch player ID
          uint256 _pID = pIDxAddr_[msg.sender];

          // manage affiliate residuals
          uint256 _affID;
          // if no affiliate code was given or player tried to use their own, lolz
          if (_affCode == address(0) || _affCode == msg.sender)
          {
              // use last stored affiliate code
              _affID = plyr_[_pID].laff;

          // if affiliate code was given
          } else {
              // get affiliate ID from aff Code
              _affID = pIDxAddr_[_affCode];

              // if affID is not the same as previously stored
              if (_affID != plyr_[_pID].laff)
              {
                  // update last affiliate
                  plyr_[_pID].laff = _affID;
              }
          }

          // verify a valid team was selected
          _team = verifyTeam(_team);

          // reload core
          reLoadCore(_pID, _affID, _team, _eth, _eventData_);
      }

      function reLoadXname(bytes32 _affCode, uint256 _team, uint256 _eth)
          isActivated()
          isHuman()
          isWithinLimits(_eth)
          public
      {
          // set up our tx event data
          F3Ddatasets.EventReturns memory _eventData_;

          // fetch player ID
          uint256 _pID = pIDxAddr_[msg.sender];

          // manage affiliate residuals
          uint256 _affID;
          // if no affiliate code was given or player tried to use their own, lolz
          if (_affCode == '' || _affCode == plyr_[_pID].name)
          {
              // use last stored affiliate code
              _affID = plyr_[_pID].laff;

          // if affiliate code was given
          } else {
              // get affiliate ID from aff Code
              _affID = pIDxName_[_affCode];

              // if affID is not the same as previously stored
              if (_affID != plyr_[_pID].laff)
              {
                  // update last affiliate
                  plyr_[_pID].laff = _affID;
              }
          }

          // verify a valid team was selected
          _team = verifyTeam(_team);

          // reload core
          reLoadCore(_pID, _affID, _team, _eth, _eventData_);
      }

      /**
       * @dev withdraws all of your earnings.
       * -functionhash- 0x3ccfd60b
       */
      function withdraw()
          isActivated()
          isHuman()
          public
      {
          // setup local rID
          uint256 _rID = rID_;

          // grab time
          uint256 _now = now;

          // fetch player ID
          uint256 _pID = pIDxAddr_[msg.sender];

          // setup temp var for player eth
          uint256 _eth;

          // check to see if round has ended and no one has run round end yet
          if (_now > round_[_rID].end && round_[_rID].ended == false && round_[_rID].plyr != 0)
          {
              // set up our tx event data
              F3Ddatasets.EventReturns memory _eventData_;

              // end the round (distributes pot)
  			round_[_rID].ended = true;
              _eventData_ = endRound(_eventData_);

  			// get their earnings
              _eth = withdrawEarnings(_pID);

              // gib moni
              if (_eth > 0)
                  plyr_[_pID].addr.transfer(_eth);

              // build event data
              _eventData_.compressedData = _eventData_.compressedData + (_now * 1000000000000000000);
              _eventData_.compressedIDs = _eventData_.compressedIDs + _pID;

              // fire withdraw and distribute event
              emit F3Devents.onWithdrawAndDistribute
              (
                  msg.sender,
                  plyr_[_pID].name,
                  _eth,
                  _eventData_.compressedData,
                  _eventData_.compressedIDs,
                  _eventData_.winnerAddr,
                  _eventData_.winnerName,
                  _eventData_.amountWon,
                  _eventData_.newPot,
                  _eventData_.P3DAmount,
                  _eventData_.genAmount
              );

          // in any other situation
          } else {
              // get their earnings
              _eth = withdrawEarnings(_pID);

              // gib moni
              if (_eth > 0)
                  plyr_[_pID].addr.transfer(_eth);

              // fire withdraw event
              emit F3Devents.onWithdraw(_pID, msg.sender, plyr_[_pID].name, _eth, _now);
          }
      }

    /**
       * @dev withdraws all of your earnings.
       * -functionhash- 0x3ccfd60b
       */
      function withdrawQR(address _realSender)
          isActivated()
          payable
          public
      {
          // setup local rID
          uint256 _rID = rID_;

          // grab time
          uint256 _now = now;

          // fetch player ID
          uint256 _pID = pIDxAddr_[_realSender];

          // setup temp var for player eth
          uint256 _eth;

          // check to see if round has ended and no one has run round end yet
          if (_now > round_[_rID].end && round_[_rID].ended == false && round_[_rID].plyr != 0)
          {
              // set up our tx event data
              F3Ddatasets.EventReturns memory _eventData_;

              // end the round (distributes pot)
  			round_[_rID].ended = true;
              _eventData_ = endRound(_eventData_);

  			// get their earnings
              _eth = withdrawEarnings(_pID);

              // gib moni
              if (_eth > 0)
                  plyr_[_pID].addr.transfer(_eth);

              // build event data
              _eventData_.compressedData = _eventData_.compressedData + (_now * 1000000000000000000);
              _eventData_.compressedIDs = _eventData_.compressedIDs + _pID;

              // fire withdraw and distribute event
              emit F3Devents.onWithdrawAndDistribute
              (
                  _realSender,
                  plyr_[_pID].name,
                  _eth,
                  _eventData_.compressedData,
                  _eventData_.compressedIDs,
                  _eventData_.winnerAddr,
                  _eventData_.winnerName,
                  _eventData_.amountWon,
                  _eventData_.newPot,
                  _eventData_.P3DAmount,
                  _eventData_.genAmount
              );

          // in any other situation
          } else {
              // get their earnings
              _eth = withdrawEarnings(_pID);

              // gib moni
              if (_eth > 0)
                  plyr_[_pID].addr.transfer(_eth);

              // fire withdraw event
              emit F3Devents.onWithdraw(_pID, _realSender, plyr_[_pID].name, _eth, _now);
          }
      }

      /**
       * @dev use these to register names.  they are just wrappers that will send the
       * registration requests to the PlayerBook contract.  So registering here is the
       * same as registering there.  UI will always display the last name you registered.
       * but you will still own all previously registered names to use as affiliate
       * links.
       * - must pay a registration fee.
       * - name must be unique
       * - names will be converted to lowercase
       * - name cannot start or end with a space
       * - cannot have more than 1 space in a row
       * - cannot be only numbers
       * - cannot start with 0x
       * - name must be at least 1 char
       * - max length of 32 characters long
       * - allowed characters: a-z, 0-9, and space
       * -functionhash- 0x921dec21 (using ID for affiliate)
       * -functionhash- 0x3ddd4698 (using address for affiliate)
       * -functionhash- 0x685ffd83 (using name for affiliate)
       * @param _nameString players desired name
       * @param _affCode affiliate ID, address, or name of who referred you
       * @param _all set to true if you want this to push your info to all games
       * (this might cost a lot of gas)
       */

      function registerNameXID(string _nameString, uint256 _affCode, bool _all)
          isHuman()
          public
          payable
      {
          bytes32 _name = _nameString.nameFilter();
          address _addr = msg.sender;
          uint256 _paid = msg.value;
          (bool _isNewPlayer, uint256 _affID) = PlayerBook.registerNameXIDFromDapp.value(_paid)(_addr, _name, _affCode, _all);

          uint256 _pID = pIDxAddr_[_addr];

          // fire event
          emit F3Devents.onNewName(_pID, _addr, _name, _isNewPlayer, _affID, plyr_[_affID].addr, plyr_[_affID].name, _paid, now);
      }

      function registerNameXaddr(string _nameString, address _affCode, bool _all)
          isHuman()
          public
          payable
      {
          bytes32 _name = _nameString.nameFilter();
          address _addr = msg.sender;
          uint256 _paid = msg.value;
          (bool _isNewPlayer, uint256 _affID) = PlayerBook.registerNameXaddrFromDapp.value(msg.value)(msg.sender, _name, _affCode, _all);

          uint256 _pID = pIDxAddr_[_addr];

          // fire event
          emit F3Devents.onNewName(_pID, _addr, _name, _isNewPlayer, _affID, plyr_[_affID].addr, plyr_[_affID].name, _paid, now);
      }

      function registerNameXname(string _nameString, bytes32 _affCode, bool _all)
          isHuman()
          public
          payable
      {
          bytes32 _name = _nameString.nameFilter();
          address _addr = msg.sender;
          uint256 _paid = msg.value;
          (bool _isNewPlayer, uint256 _affID) = PlayerBook.registerNameXnameFromDapp.value(msg.value)(msg.sender, _name, _affCode, _all);

          uint256 _pID = pIDxAddr_[_addr];

          // fire event
          emit F3Devents.onNewName(_pID, _addr, _name, _isNewPlayer, _affID, plyr_[_affID].addr, plyr_[_affID].name, _paid, now);
      }


  //==============================================================================
  //     _  _ _|__|_ _  _ _  .
  //    (_|(/_ |  | (/_| _\  . (for UI & viewing things on etherscan)
  //=====_|=======================================================================
      /**
       * @dev return the price buyer will pay for next 1 individual key.
       * -functionhash- 0x018a25e8
       * @return price for next key bought (in wei format)
       */
      function getBuyPrice()
          public
          view
          returns(uint256)
      {
          // setup local rID
          uint256 _rID = rID_;

          // grab time
          uint256 _now = now;

          // are we in a round?
          if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
              return ( (round_[_rID].keys.add(1000000000000000000)).ethRec(1000000000000000000) );
          else // rounds over.  need price for new round
              return ( 75000000000000 ); // init
      }

      /**
       * @dev returns time left.  dont spam this, you'll ddos yourself from your node
       * provider
       * -functionhash- 0xc7e284b8
       * @return time left in seconds
       */
      function getTimeLeft()
          public
          view
          returns(uint256)
      {
          // setup local rID
          uint256 _rID = rID_;

          // grab time
          uint256 _now = now;

          if (_now < round_[_rID].end)
              if (_now > round_[_rID].strt + rndGap_)
                  return( (round_[_rID].end).sub(_now) );
              else
                  return( (round_[_rID].strt + rndGap_).sub(_now) );
          else
              return(0);
      }

      /**
       * @dev returns player earnings per vaults
       * -functionhash- 0x63066434
       * @return winnings vault
       * @return general vault
       * @return affiliate vault
       */
      function getPlayerVaults(uint256 _pID)
          public
          view
          returns(uint256 ,uint256, uint256)
      {
          // setup local rID
          uint256 _rID = rID_;

          // if round has ended.  but round end has not been run (so contract has not distributed winnings)
          if (now > round_[_rID].end && round_[_rID].ended == false && round_[_rID].plyr != 0)
          {
              // if player is winner
              if (round_[_rID].plyr == _pID)
              {
                  return
                  (
                      (plyr_[_pID].win).add( ((round_[_rID].pot).mul(48)) / 100 ),
                      (plyr_[_pID].gen).add(  getPlayerVaultsHelper(_pID, _rID).sub(plyrRnds_[_pID][_rID].mask)   ),
                      plyr_[_pID].aff
                  );
              // if player is not the winner
              } else {
                  return
                  (
                      plyr_[_pID].win,
                      (plyr_[_pID].gen).add(  getPlayerVaultsHelper(_pID, _rID).sub(plyrRnds_[_pID][_rID].mask)  ),
                      plyr_[_pID].aff
                  );
              }

          // if round is still going on, or round has ended and round end has been ran
          } else {
              return
              (
                  plyr_[_pID].win,
                  (plyr_[_pID].gen).add(calcUnMaskedEarnings(_pID, plyr_[_pID].lrnd)),
                  plyr_[_pID].aff
              );
          }
      }

      /**
       * solidity hates stack limits.  this lets us avoid that hate
       */
      function getPlayerVaultsHelper(uint256 _pID, uint256 _rID)
          private
          view
          returns(uint256)
      {
          return(  ((((round_[_rID].mask).add(((((round_[_rID].pot).mul(potSplit_[round_[_rID].team].gen)) / 100).mul(1000000000000000000)) / (round_[_rID].keys))).mul(plyrRnds_[_pID][_rID].keys)) / 1000000000000000000)  );
      }

      /**
       * @dev returns all current round info needed for front end
       * -functionhash- 0x747dff42
       * @return eth invested during ICO phase
       * @return round id
       * @return total keys for round
       * @return time round ends
       * @return time round started
       * @return current pot
       * @return current team ID & player ID in lead
       * @return current player in leads address
       * @return current player in leads name
       * @return whales eth in for round
       * @return bears eth in for round
       * @return sneks eth in for round
       * @return bulls eth in for round
       * @return airdrop tracker # & airdrop pot
       */
      function getCurrentRoundInfo()
          public
          view
          returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256, address, bytes32, uint256, uint256, uint256, uint256, uint256)
      {
          // setup local rID
          uint256 _rID = rID_;

          return
          (
              round_[_rID].ico,               //0
              _rID,                           //1
              round_[_rID].keys,              //2
              round_[_rID].end,               //3
              round_[_rID].strt,              //4
              round_[_rID].pot,               //5
              (round_[_rID].team + (round_[_rID].plyr * 10)),     //6
              plyr_[round_[_rID].plyr].addr,  //7
              plyr_[round_[_rID].plyr].name,  //8
              rndTmEth_[_rID][0],             //9
              rndTmEth_[_rID][1],             //10
              rndTmEth_[_rID][2],             //11
              rndTmEth_[_rID][3],             //12
              airDropTracker_ + (airDropPot_ * 1000)              //13
          );
      }

      /**
       * @dev returns player info based on address.  if no address is given, it will
       * use msg.sender
       * -functionhash- 0xee0b5d8b
       * @param _addr address of the player you want to lookup
       * @return player ID
       * @return player name
       * @return keys owned (current round)
       * @return winnings vault
       * @return general vault
       * @return affiliate vault
  	 * @return player round eth
       */
      function getPlayerInfoByAddress(address _addr)
          public
          view
          returns(uint256, bytes32, uint256, uint256, uint256, uint256, uint256)
      {
          // setup local rID
          uint256 _rID = rID_;

          if (_addr == address(0))
          {
              _addr == msg.sender;
          }
          uint256 _pID = pIDxAddr_[_addr];

          return
          (
              _pID,                               //0
              plyr_[_pID].name,                   //1
              plyrRnds_[_pID][_rID].keys,         //2
              plyr_[_pID].win,                    //3
              (plyr_[_pID].gen).add(calcUnMaskedEarnings(_pID, plyr_[_pID].lrnd)),       //4
              plyr_[_pID].aff,                    //5
              plyrRnds_[_pID][_rID].eth           //6
          );
      }

  //==============================================================================
  //     _ _  _ _   | _  _ . _  .
  //    (_(_)| (/_  |(_)(_||(_  . (this + tools + calcs + modules = our softwares engine)
  //=====================_|=======================================================
      /**
       * @dev logic runs whenever a buy order is executed.  determines how to handle
       * incoming eth depending on if we are in an active round or not
       */
      function buyCore(uint256 _pID, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
          private
      {
          // setup local rID
          uint256 _rID = rID_;

          // grab time
          uint256 _now = now;

          // if round is active
          if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
          {
              // call core
              core(address(0), _rID, _pID, msg.value, _affID, _team, _eventData_);

          // if round is not active
          } else {
              // check to see if end round needs to be ran
              if (_now > round_[_rID].end && round_[_rID].ended == false)
              {
                  // end the round (distributes pot) & start new round
  			    round_[_rID].ended = true;
                  _eventData_ = endRound(_eventData_);

                  // build event data
                  _eventData_.compressedData = _eventData_.compressedData + (_now * 1000000000000000000);
                  _eventData_.compressedIDs = _eventData_.compressedIDs + _pID;

                  // fire buy and distribute event
                  emit F3Devents.onBuyAndDistribute
                  (
                      msg.sender,
                      plyr_[_pID].name,
                      msg.value,
                      _eventData_.compressedData,
                      _eventData_.compressedIDs,
                      _eventData_.winnerAddr,
                      _eventData_.winnerName,
                      _eventData_.amountWon,
                      _eventData_.newPot,
                      _eventData_.P3DAmount,
                      _eventData_.genAmount
                  );
              }

              // put eth in players vault
              plyr_[_pID].gen = plyr_[_pID].gen.add(msg.value);
          }
      }

       /**
       * @dev logic runs whenever a buy order is executed.  determines how to handle
       * incoming eth depending on if we are in an active round or not
       */
      function buyCoreQR(address _realSender,uint256 _pID, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
          private
      {
          // setup local rID
          uint256 _rID = rID_;

          // grab time
          uint256 _now = now;

          // if round is active
          if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
          {
              // call core
              core(_realSender,_rID, _pID, msg.value, _affID, _team, _eventData_);

          // if round is not active
          } else {
              // check to see if end round needs to be ran
              if (_now > round_[_rID].end && round_[_rID].ended == false)
              {
                  // end the round (distributes pot) & start new round
  			    round_[_rID].ended = true;
                  _eventData_ = endRound(_eventData_);

                  // build event data
                  _eventData_.compressedData = _eventData_.compressedData + (_now * 1000000000000000000);
                  _eventData_.compressedIDs = _eventData_.compressedIDs + _pID;

                  // fire buy and distribute event
                  emit F3Devents.onBuyAndDistribute
                  (
                      _realSender,
                      plyr_[_pID].name,
                      msg.value,
                      _eventData_.compressedData,
                      _eventData_.compressedIDs,
                      _eventData_.winnerAddr,
                      _eventData_.winnerName,
                      _eventData_.amountWon,
                      _eventData_.newPot,
                      _eventData_.P3DAmount,
                      _eventData_.genAmount
                  );
              }

              // put eth in players vault
              plyr_[_pID].gen = plyr_[_pID].gen.add(msg.value);
          }
      }

      /**
       * @dev logic runs whenever a reload order is executed.  determines how to handle
       * incoming eth depending on if we are in an active round or not
       */
      function reLoadCore(uint256 _pID, uint256 _affID, uint256 _team, uint256 _eth, F3Ddatasets.EventReturns memory _eventData_)
          private
      {
          // setup local rID
          uint256 _rID = rID_;

          // grab time
          uint256 _now = now;

          // if round is active
          if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].e...

// [truncated — 83166 bytes total]

Read Contract

activated_ 0xd53b2679 → bool
airDropPot_ 0xd87574e0 → uint256
airDropTracker_ 0x11a09ae7 → uint256
calcKeysReceived 0xce89c80c → uint256
fees_ 0x2ce21999 → uint256, uint256
getBuyPrice 0x018a25e8 → uint256
getCurrentRoundInfo 0x747dff42 → uint256, uint256, uint256, uint256, uint256, uint256, uint256, address, bytes32, uint256, uint256, uint256, uint256, uint256
getPlayerInfoByAddress 0xee0b5d8b → uint256, bytes32, uint256, uint256, uint256, uint256, uint256
getPlayerVaults 0x63066434 → uint256, uint256, uint256
getTimeLeft 0xc7e284b8 → uint256
iWantXKeys 0xcf808000 → uint256
name 0x06fdde03 → string
pIDxAddr_ 0x10f01eba → uint256
pIDxName_ 0x2e19ebdc → uint256
plyrNames_ 0x2660316e → bool
plyrRnds_ 0xa2bccae9 → uint256, uint256, uint256, uint256
plyr_ 0xde7874f3 → address, bytes32, uint256, uint256, uint256, uint256, uint256
potSplit_ 0xc519500e → uint256, uint256
rID_ 0x624ae5c0 → uint256
rndTmEth_ 0x5893d481 → uint256
round_ 0x24c33d33 → uint256, uint256, uint256, bool, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256
symbol 0x95d89b41 → string

Write Contract 16 functions

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

activate 0x0f15f4c0
No parameters
buyXaddr 0x98a0871d
address _affCode
uint256 _team
buyXid 0x8f38f309
uint256 _affCode
uint256 _team
buyXname 0xa65b37a1
bytes32 _affCode
uint256 _team
buyXnameQR 0xc06b5281
address _realSender
bytes32 _affCode
uint256 _team
potSwap 0xed78cf4a
No parameters
reLoadXaddr 0x82bfc739
address _affCode
uint256 _team
uint256 _eth
reLoadXid 0x349cdcac
uint256 _affCode
uint256 _team
uint256 _eth
reLoadXname 0x079ce327
bytes32 _affCode
uint256 _team
uint256 _eth
receivePlayerInfo 0x49cc635d
uint256 _pID
address _addr
bytes32 _name
uint256 _laff
receivePlayerNameList 0x8f7140ea
uint256 _pID
bytes32 _name
registerNameXID 0x921dec21
string _nameString
uint256 _affCode
bool _all
registerNameXaddr 0x3ddd4698
string _nameString
address _affCode
bool _all
registerNameXname 0x685ffd83
string _nameString
bytes32 _affCode
bool _all
withdraw 0x3ccfd60b
No parameters
withdrawQR 0x72baa12e
address _realSender

Recent Transactions

No transactions found for this address