More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 78,700 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Funds | 8219173 | 2024 days ago | IN | 0 ETH | 0.00029157 | ||||
Withdraw Funds | 8219000 | 2024 days ago | IN | 0 ETH | 0.00071595 | ||||
Settle Bet | 7892183 | 2075 days ago | IN | 0 ETH | 0.00032094 | ||||
Place Bet | 7892180 | 2075 days ago | IN | 0.01 ETH | 0.00168 | ||||
Settle Bet | 7892166 | 2075 days ago | IN | 0 ETH | 0.00031995 | ||||
Place Bet | 7892164 | 2075 days ago | IN | 0.01 ETH | 0.00258462 | ||||
Settle Bet | 7892162 | 2075 days ago | IN | 0 ETH | 0.00031995 | ||||
Place Bet | 7892156 | 2075 days ago | IN | 0.02 ETH | 0.00116307 | ||||
Settle Bet | 7892152 | 2075 days ago | IN | 0 ETH | 0.00032094 | ||||
Place Bet | 7892149 | 2075 days ago | IN | 0.01 ETH | 0.00116307 | ||||
Settle Bet | 7892145 | 2075 days ago | IN | 0 ETH | 0.00032037 | ||||
Place Bet | 7892139 | 2075 days ago | IN | 0.01 ETH | 0.0011625 | ||||
Settle Bet | 7892133 | 2075 days ago | IN | 0 ETH | 0.00032037 | ||||
Place Bet | 7892127 | 2075 days ago | IN | 0.01 ETH | 0.00116307 | ||||
Settle Bet | 7847966 | 2082 days ago | IN | 0 ETH | 0.0003231 | ||||
Place Bet | 7847958 | 2082 days ago | IN | 0.01 ETH | 0.00090185 | ||||
Settle Bet | 7815383 | 2087 days ago | IN | 0 ETH | 0.00032297 | ||||
Place Bet | 7815380 | 2087 days ago | IN | 0.01 ETH | 0.00040403 | ||||
Settle Bet | 7815073 | 2087 days ago | IN | 0 ETH | 0.00031995 | ||||
Place Bet | 7815065 | 2087 days ago | IN | 0.01 ETH | 0.00139887 | ||||
Settle Bet | 7796354 | 2090 days ago | IN | 0 ETH | 0.00031933 | ||||
Place Bet | 7796347 | 2090 days ago | IN | 0.03 ETH | 0.00025832 | ||||
Settle Bet | 7796323 | 2090 days ago | IN | 0 ETH | 0.00031991 | ||||
Place Bet | 7796319 | 2090 days ago | IN | 0.06 ETH | 0.00025845 | ||||
Settle Bet | 7796297 | 2090 days ago | IN | 0 ETH | 0.00032032 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
8219000 | 2024 days ago | 49.075 ETH | ||||
7892183 | 2075 days ago | 0.01141176 ETH | ||||
7892166 | 2075 days ago | 1 wei | ||||
7892162 | 2075 days ago | 1 wei | ||||
7892152 | 2075 days ago | 0.0194 ETH | ||||
7892145 | 2075 days ago | 0.0194 ETH | ||||
7892133 | 2075 days ago | 0.0194 ETH | ||||
7847966 | 2082 days ago | 0.0194 ETH | ||||
7815383 | 2087 days ago | 0.0194 ETH | ||||
7815073 | 2087 days ago | 1 wei | ||||
7796354 | 2090 days ago | 1 wei | ||||
7796323 | 2090 days ago | 1 wei | ||||
7796297 | 2090 days ago | 0.09428571 ETH | ||||
7796233 | 2090 days ago | 0.06319148 ETH | ||||
7796220 | 2090 days ago | 1 wei | ||||
7796208 | 2090 days ago | 1 wei | ||||
7796164 | 2090 days ago | 0.13066666 ETH | ||||
7796132 | 2090 days ago | 0.07071428 ETH | ||||
7796066 | 2090 days ago | 0.072 ETH | ||||
7795779 | 2090 days ago | 1 wei | ||||
7795254 | 2090 days ago | 0.11360655 ETH | ||||
7795232 | 2090 days ago | 0.1386 ETH | ||||
7795175 | 2090 days ago | 1 wei | ||||
7795156 | 2090 days ago | 0.12728571 ETH | ||||
7795086 | 2090 days ago | 1 wei |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
FairHouse
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-10-18 */ pragma solidity ^0.4.24; // * fairhouse.io - Fair and transparent entertainment games. Version 1. // // * Ethereum smart contract. // // * Uses hybrid commit-reveal + block hash random number generation that is immune // to tampering by players, house and miners. Apart from being fully transparent, // this also allows arbitrarily high bets. // contract FairHouse { using SafeMath for uint256; using NameFilter for string; /// *** Constants section // Each bet is deducted 1% in favour of the house, but no less than some minimum. // The lower bound is dictated by gas costs of the settleBet transaction, providing // headroom for up to 10 Gwei prices. uint constant HOUSE_EDGE_PERCENT = 1; uint constant HOUSE_EDGE_MINIMUM_AMOUNT = 0.0003 ether; // If there is a recommendation, // each bet is deducted from the house 50% to the recommender, // but the house no less than HOUSE_EDGE_MINIMUM_AMOUNT. uint constant RECOMMENDER_PERCENT = 50; // Bets lower than this amount do not participate in jackpot rolls (and are // not deducted JACKPOT_FEE). uint constant MIN_JACKPOT_BET = 0.1 ether; // Chance to win jackpot (currently 0.1%) and fee deducted into jackpot fund. uint constant JACKPOT_MODULO = 1000; uint constant JACKPOT_FEE = 0.001 ether; // There is minimum and maximum bets. uint constant MIN_BET = 0.01 ether; uint constant MAX_AMOUNT = 300000 ether; // Modulo is a number of equiprobable outcomes in a game: // - 2 for coin flip // - 6 for dice // - 6*6 = 36 for double dice // - 100 for etheroll // - 37 for roulette // etc. // It's called so because 256-bit entropy is treated like a huge integer and // the remainder of its division by modulo is considered bet outcome. uint constant MAX_MODULO = 100; // For modulos below this threshold rolls are checked against a bit mask, // thus allowing betting on any combination of outcomes. For example, given // modulo 6 for dice, 101000 mask (base-2, big endian) means betting on // 4 and 6; for games with modulos higher than threshold (Etheroll), a simple // limit is used, allowing betting on any outcome in [0, N) range. // // The specific value is dictated by the fact that 256-bit intermediate // multiplication result allows implementing population count efficiently // for numbers that are up to 42 bits, and 40 is the highest multiple of // eight below 42. uint constant MAX_MASK_MODULO = 40; // This is a check on bet mask overflow. uint constant MAX_BET_MASK = 2 ** MAX_MASK_MODULO; // EVM BLOCKHASH opcode can query no further than 256 blocks into the // past. Given that settleBet uses block hash of placeBet as one of // complementary entropy sources, we cannot process bets older than this // threshold. On rare occasions fairhouse.io croupier may fail to invoke // settleBet in this timespan due to technical issues or extreme Ethereum // congestion; such bets can be refunded via invoking refundBet. uint constant BET_EXPIRATION_BLOCKS = 250; // Some deliberately invalid address to initialize the secret signer with. // Forces maintainers to invoke setSecretSigner before processing any bets. address constant DUMMY_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; // Standard contract ownership transfer. address public owner; address private nextOwner; // Adjustable max bet profit. Used to cap bets against dynamic odds. uint public maxProfit; // The address corresponding to a private key used to sign placeBet commits. address public secretSigner; // Accumulated jackpot fund. uint public jackpotSize; // Funds that are locked in potentially winning bets. Prevents contract from // committing to bets it cannot pay out. uint public lockedInBets; // A structure representing a single bet. struct Bet { // Wager amount in wei. uint amount; // Modulo of a game. uint8 modulo; // Number of winning outcomes, used to compute winning payment (* modulo/rollUnder), // and used instead of mask for games with modulo > MAX_MASK_MODULO. uint8 rollUnder; // Block number of placeBet tx. uint placeBlockNumber; // Bit mask representing winning bet outcomes (see MAX_MASK_MODULO comment). uint40 mask; // Address of a gambler, used to pay out winning bets. address gambler; } // Mapping from commits to all currently active & processed bets. mapping (uint => Bet) bets; // Croupier account. address public croupier; // Price to register a name uint constant REGISTRATION_FEE = 0.05 ether; // Total number of players uint playerId = 0; struct Player { address addr; bytes32 name; uint recPid; } mapping (address => uint256) pidXaddr; mapping (bytes32 => uint256) pidXname; mapping (uint256 => Player) playerXpid; // Events that are issued to make statistic recovery easier. event FailedPayment(address indexed beneficiary, uint amount); event Payment(address indexed beneficiary, uint amount); event RecommendPayment(address indexed beneficiary, uint amount); event JackpotPayment(address indexed beneficiary, uint amount); event OnRegisterName(uint indexed pid, bytes32 indexed pname, address indexed paddr, uint recPid, bytes32 recPname, address recPaddr, uint amountPaid, bool isNewPlayer, uint timeStamp); // This event is emitted in placeBet to record commit in the logs. event Commit(uint commit); // Constructor. Deliberately does not take any parameters. constructor () public { owner = msg.sender; secretSigner = DUMMY_ADDRESS; croupier = DUMMY_ADDRESS; } // Standard modifier on methods invokable only by contract owner. modifier onlyOwner { require (msg.sender == owner, "OnlyOwner methods called by non-owner."); _; } // Standard modifier on methods invokable only by contract owner. modifier onlyCroupier { require (msg.sender == croupier, "OnlyCroupier methods called by non-croupier."); _; } // Standard contract ownership transfer implementation, function approveNextOwner(address _nextOwner) external onlyOwner { require (_nextOwner != owner, "Cannot approve current owner."); nextOwner = _nextOwner; } function acceptNextOwner() external { require (msg.sender == nextOwner, "Can only accept preapproved new owner."); owner = nextOwner; } // Fallback function deliberately left empty. It's primary use case // is to top up the bank roll. function () public payable { } // See comment for "secretSigner" variable. function setSecretSigner(address newSecretSigner) external onlyOwner { secretSigner = newSecretSigner; } // Change the croupier address. function setCroupier(address newCroupier) external onlyOwner { croupier = newCroupier; } // Change max bet reward. Setting this to zero effectively disables betting. function setMaxProfit(uint _maxProfit) public onlyOwner { require (_maxProfit < MAX_AMOUNT, "maxProfit should be a sane number."); maxProfit = _maxProfit; } // This function is used to bump up the jackpot fund. Cannot be used to lower it. function increaseJackpot(uint increaseAmount) external onlyOwner { require (increaseAmount <= address(this).balance, "Increase amount larger than balance."); require (jackpotSize.add(lockedInBets).add(increaseAmount) <= address(this).balance, "Not enough funds."); jackpotSize = jackpotSize.add(increaseAmount); } // Funds withdrawal to cover costs of fairhouse.io operation. function withdrawFunds(address beneficiary, uint withdrawAmount) external onlyOwner { require (withdrawAmount <= address(this).balance, "Increase amount larger than balance."); require (jackpotSize.add(lockedInBets).add(withdrawAmount) <= address(this).balance, "Not enough funds."); sendFunds(beneficiary, withdrawAmount, withdrawAmount); } // Contract may be destroyed only when there are no ongoing bets, // either settled or refunded. All funds are transferred to contract owner. function kill() external onlyOwner { require (lockedInBets == 0, "All bets should be processed (settled or refunded) before self-destruct."); selfdestruct(owner); } /// *** Betting logic // Bet states: // amount == 0 && gambler == 0 - 'clean' (can place a bet) // amount != 0 && gambler != 0 - 'active' (can be settled or refunded) // amount == 0 && gambler != 0 - 'processed' (can clean storage) // // NOTE: Storage cleaning is not implemented in this contract version; it will be added // with the next upgrade to prevent polluting Ethereum state with expired bets. // Bet placing transaction - issued by the player. // betMask - bet outcomes bit mask for modulo <= MAX_MASK_MODULO, // [0, betMask) for larger modulos. // modulo - game modulo. // commitLastBlock - number of the maximum block where "commit" is still considered valid. // commit - Keccak256 hash of some secret "reveal" random number, to be supplied // by the fairhouse.io croupier bot in the settleBet transaction. Supplying // "commit" ensures that "reveal" cannot be changed behind the scenes // after placeBet have been mined. // recCode - recommendation code. Record only the first recommendation relationship. // r, s - components of ECDSA signature of (commitLastBlock, commit). v is // guaranteed to always equal 27. // // Commit, being essentially random 256-bit number, is used as a unique bet identifier in // the 'bets' mapping. // // Commits are signed with a block limit to ensure that they are used at most once - otherwise // it would be possible for a miner to place a bet with a known commit/reveal pair and tamper // with the blockhash. Croupier guarantees that commitLastBlock will always be not greater than // placeBet block number plus BET_EXPIRATION_BLOCKS. See whitepaper for details. function placeBet(uint betMask, uint modulo, uint commitLastBlock, uint commit, bytes32 recCode, bytes32 r, bytes32 s) external payable { // Check that the bet is in 'clean' state. Bet storage bet = bets[commit]; require (bet.gambler == address(0), "Bet should be in a 'clean' state."); // Validate input data ranges. require (modulo > 1 && modulo <= MAX_MODULO, "Modulo should be within range."); require (msg.value >= MIN_BET && msg.value <= MAX_AMOUNT, "Amount should be within range."); require (betMask > 0 && betMask < MAX_BET_MASK, "Mask should be within range."); // Check that commit is valid - it has not expired and its signature is valid. require (block.number <= commitLastBlock && commitLastBlock <= block.number.add(BET_EXPIRATION_BLOCKS), "Commit has expired."); // bytes32 signatureHash = keccak256(abi.encodePacked(uint40(commitLastBlock), commit)); // require (secretSigner == ecrecover(signatureHash, 27, r, s), "ECDSA signature is not valid."); require (secretSigner == ecrecover(keccak256(abi.encodePacked(uint40(commitLastBlock), commit)), 27, r, s), "ECDSA signature is not valid."); uint rollUnder; //uint mask; if (modulo <= MAX_MASK_MODULO) { // Small modulo games specify bet outcomes via bit mask. // rollUnder is a number of 1 bits in this mask (population count). // This magic looking formula is an efficient way to compute population // count on EVM for numbers below 2**40. rollUnder = ((betMask.mul(POPCNT_MULT)) & POPCNT_MASK).mod(POPCNT_MODULO); //mask = betMask; bet.mask = uint40(betMask); } else { // Larger modulos specify the right edge of half-open interval of // winning bet outcomes. require (betMask > 0 && betMask <= modulo, "High modulo range, betMask larger than modulo."); rollUnder = betMask; } // Winning amount and jackpot increase. uint possibleWinAmount; uint jackpotFee; (possibleWinAmount, jackpotFee) = getDiceWinAmount(msg.value, modulo, rollUnder); // Enforce max profit limit. require (possibleWinAmount <= msg.value.add(maxProfit), "maxProfit limit violation."); // Lock funds. lockedInBets = lockedInBets.add(possibleWinAmount); jackpotSize = jackpotSize.add(jackpotFee); // Check whether contract has enough funds to process this bet. require (jackpotSize.add(lockedInBets) <= address(this).balance, "Cannot afford to lose this bet."); // Record commit in logs. emit Commit(commit); // Store bet parameters on blockchain. bet.amount = msg.value; bet.modulo = uint8(modulo); bet.rollUnder = uint8(rollUnder); bet.placeBlockNumber = block.number; //bet.mask = uint40(mask); bet.gambler = msg.sender; // Binding recommendation relationship placeBetBindCore(msg.sender, recCode); } // This is the method used to settle 99% of bets. To process a bet with a specific // "commit", settleBet should supply a "reveal" number that would Keccak256-hash to // "commit". "blockHash" is the block hash of placeBet block as seen by croupier; it // is additionally asserted to prevent changing the bet outcomes on Ethereum reorgs. function settleBet(uint reveal, bytes32 blockHash) external onlyCroupier { uint commit = uint(keccak256(abi.encodePacked(reveal))); Bet storage bet = bets[commit]; // Check that bet has not expired yet (see comment to BET_EXPIRATION_BLOCKS). require (block.number > bet.placeBlockNumber, "settleBet in the same block as placeBet, or before."); require (block.number <= bet.placeBlockNumber.add(BET_EXPIRATION_BLOCKS), "Blockhash can't be queried by EVM."); require (blockhash(bet.placeBlockNumber) == blockHash); // Settle bet using reveal and blockHash as entropy sources. settleBetCommon(bet, reveal, blockHash); } // This method is used to settle a bet that was mined into an uncle block. At this // point the player was shown some bet outcome, but the blockhash at placeBet height // is different because of Ethereum chain reorg. We supply a full merkle proof of the // placeBet transaction receipt to provide untamperable evidence that uncle block hash // indeed was present on-chain at some point. function settleBetUncleMerkleProof(uint reveal, uint canonicalBlockNumber) external onlyCroupier { // "commit" for bet settlement can only be obtained by hashing a "reveal". uint commit = uint(keccak256(abi.encodePacked(reveal))); Bet storage bet = bets[commit]; // Check that canonical block hash can still be verified. require (block.number <= canonicalBlockNumber.add(BET_EXPIRATION_BLOCKS), "Blockhash can't be queried by EVM."); // Verify placeBet receipt. requireCorrectReceipt(4 + 32 + 32 + 4); // Reconstruct canonical & uncle block hashes from a receipt merkle proof, verify them. bytes32 canonicalHash; bytes32 uncleHash; (canonicalHash, uncleHash) = verifyMerkleProof(commit, 4 + 32 + 32); require (blockhash(canonicalBlockNumber) == canonicalHash); // Settle bet using reveal and uncleHash as entropy sources. settleBetCommon(bet, reveal, uncleHash); } // Common settlement code for settleBet & settleBetUncleMerkleProof. function settleBetCommon(Bet storage bet, uint reveal, bytes32 entropyBlockHash) private { // Fetch bet parameters into local variables (to save gas). uint amount = bet.amount; uint modulo = bet.modulo; uint rollUnder = bet.rollUnder; address gambler = bet.gambler; // Check that bet is in 'active' state. require (amount != 0, "Bet should be in an 'active' state"); // Move bet into 'processed' state already. bet.amount = 0; // The RNG - combine "reveal" and blockhash of placeBet using Keccak256. Miners // are not aware of "reveal" and cannot deduce it from "commit" (as Keccak256 // preimage is intractable), and house is unable to alter the "reveal" after // placeBet have been mined (as Keccak256 collision finding is also intractable). bytes32 entropy = keccak256(abi.encodePacked(reveal, entropyBlockHash)); // Do a roll by taking a modulo of entropy. Compute winning amount. uint dice = uint(entropy).mod(modulo); uint diceWinAmount; uint _jackpotFee; (diceWinAmount, _jackpotFee) = getDiceWinAmount(amount, modulo, rollUnder); uint diceWin = 0; uint jackpotWin = 0; // Determine dice outcome. if (modulo <= MAX_MASK_MODULO) { // For small modulo games, check the outcome against a bit mask. if ((2 ** dice) & bet.mask != 0) { diceWin = diceWinAmount; } } else { // For larger modulos, check inclusion into half-open interval. if (dice < rollUnder) { diceWin = diceWinAmount; } } // Unlock the bet amount, regardless of the outcome. lockedInBets = lockedInBets.sub(diceWinAmount); // Roll for a jackpot (if eligible). if (amount >= MIN_JACKPOT_BET) { // The second modulo, statistically independent from the "main" dice roll. // Effectively you are playing two games at once! uint jackpotRng = (uint(entropy).div(modulo)).mod(JACKPOT_MODULO); // Bingo! if (jackpotRng == 0) { jackpotWin = jackpotSize; jackpotSize = 0; } } // Log jackpot win. if (jackpotWin > 0) { emit JackpotPayment(gambler, jackpotWin); } // Settle to recommender settleToRecommender(gambler, amount); // Send the funds to gambler. sendFunds(gambler, diceWin.add(jackpotWin) == 0 ? 1 wei : diceWin.add(jackpotWin), diceWin); } // Refund transaction - return the bet amount of a roll that was not processed in a // due timeframe. Processing such blocks is not possible due to EVM limitations (see // BET_EXPIRATION_BLOCKS comment above for details). In case you ever find yourself // in a situation like this, just contact the fairhouse.io support, however nothing // precludes you from invoking this method yourself. function refundBet(uint commit) external { // Check that bet is in 'active' state. Bet storage bet = bets[commit]; uint amount = bet.amount; require (amount != 0, "Bet should be in an 'active' state"); // Check that bet has already expired. require (block.number > bet.placeBlockNumber.add(BET_EXPIRATION_BLOCKS), "Blockhash can't be queried by EVM."); // Move bet into 'processed' state, release funds. bet.amount = 0; uint diceWinAmount; uint jackpotFee; (diceWinAmount, jackpotFee) = getDiceWinAmount(amount, bet.modulo, bet.rollUnder); lockedInBets = lockedInBets.sub(diceWinAmount); jackpotSize = jackpotSize.sub(jackpotFee); // Send the refund. sendFunds(bet.gambler, amount, amount); } // Settle to recommender function settleToRecommender(address gambler, uint amount) private { // fetch player id uint pid = pidXaddr[gambler]; Player storage _gambler = playerXpid[pid]; if (_gambler.recPid > 0) { Player storage _recommender = playerXpid[_gambler.recPid]; // uint houseEdge = amount.mul(HOUSE_EDGE_PERCENT).div(100); // If it is too small, it will not be distributed if (houseEdge > HOUSE_EDGE_MINIMUM_AMOUNT) { uint recFee = houseEdge.mul(RECOMMENDER_PERCENT).div(100); // Send the funds to recommender. sendRecommendFunds(_recommender.addr, recFee); } } } // Register a name, get recommended code function registerName(string nameStr, bytes32 recCode) external payable returns(bool, uint256) { // Make sure name fees paid require (msg.value >= REGISTRATION_FEE, "You have to pay the name fee"); // Filter name + condition checks bytes32 name = NameFilter.nameFilter(nameStr); require(pidXname[name] == 0, "Sorry that name already taken"); // Set up address address addr = msg.sender; // Set up our tx event data and determine if player is new or not bool isNewPlayer = determinePid(addr); // Fetch player id uint pid = pidXaddr[addr]; pidXname[name] = pid; playerXpid[pid].name = name; uint recPid; // Must be a new player if (isNewPlayer && recCode != "" && recCode != name) { // Get recommender ID from recommend code recPid = pidXname[recCode]; bindRecommender(pid, recPid); } Player storage recPlayer = playerXpid[recPid]; emit OnRegisterName(pid, name, addr, recPid, recPlayer.name, recPlayer.addr, msg.value, isNewPlayer, now); return(isNewPlayer, recPid); } function getRegisterName(address addr) external view returns(bytes32) { return (playerXpid[pidXaddr[addr]].name); } function placeBetBindCore(address addr, bytes32 recCode) private { bool isNewPlayer = determinePid(addr); // Must be a new player if (isNewPlayer && recCode != "") { // Fetch player id uint pid = pidXaddr[addr]; // recCode is not self if (recCode != playerXpid[pid].name) { // Manage affiliate residuals uint recPid = pidXname[recCode]; // Get recommender ID from recommend code bindRecommender(pid, recPid); } } } // Get the expected win amount after house edge is subtracted. function getDiceWinAmount(uint amount, uint modulo, uint rollUnder) private pure returns (uint winAmount, uint jackpotFee) { require (0 < rollUnder && rollUnder <= modulo, "Win probability out of range."); jackpotFee = amount >= MIN_JACKPOT_BET ? JACKPOT_FEE : 0; uint houseEdge = amount.mul(HOUSE_EDGE_PERCENT).div(100); if (houseEdge < HOUSE_EDGE_MINIMUM_AMOUNT) { houseEdge = HOUSE_EDGE_MINIMUM_AMOUNT; } require (houseEdge.add(jackpotFee) <= amount, "Bet doesn't even cover house edge."); winAmount = amount.sub(houseEdge).sub(jackpotFee).mul(modulo).div(rollUnder); } // Helper routine to process the payment. function sendFunds(address beneficiary, uint amount, uint successLogAmount) private { if (beneficiary.send(amount)) { emit Payment(beneficiary, successLogAmount); } else { emit FailedPayment(beneficiary, amount); } } function sendRecommendFunds(address beneficiary, uint amount) private { if (beneficiary.send(amount)) { emit RecommendPayment(beneficiary, amount); } else { emit FailedPayment(beneficiary, amount); } } function determinePid(address addr) private returns (bool) { if (pidXaddr[addr] == 0) { playerId++; pidXaddr[addr] = playerId; playerXpid[playerId].addr = addr; // set the new player bool to true return (true); } else { return (false); } } function bindRecommender(uint256 pid, uint256 recPid) private { // bind only once if (recPid != 0 && playerXpid[pid].recPid == 0 && playerXpid[pid].recPid != recPid) { playerXpid[pid].recPid = recPid; } } // This are some constants making O(1) population count in placeBet possible. // See whitepaper for intuition and proofs behind it. uint constant POPCNT_MULT = 0x0000000000002000000000100000000008000000000400000000020000000001; uint constant POPCNT_MASK = 0x0001041041041041041041041041041041041041041041041041041041041041; uint constant POPCNT_MODULO = 0x3F; // *** Merkle proofs. // This helpers are used to verify cryptographic proofs of placeBet inclusion into // uncle blocks. They are used to prevent bet outcome changing on Ethereum reorgs without // compromising the security of the smart contract. Proof data is appended to the input data // in a simple prefix length format and does not adhere to the ABI. // Invariants checked: // - receipt trie entry contains a (1) successful transaction (2) directed at this smart // contract (3) containing commit as a payload. // - receipt trie entry is a part of a valid merkle proof of a block header // - the block header is a part of uncle list of some block on canonical chain // The implementation is optimized for gas cost and relies on the specifics of Ethereum internal data structures. // Read the whitepaper for details. // Helper to verify a full merkle proof starting from some seedHash (usually commit). "offset" is the location of the proof // beginning in the calldata. function verifyMerkleProof(uint seedHash, uint offset) pure private returns (bytes32 blockHash, bytes32 uncleHash) { // (Safe) assumption - nobody will write into RAM during this method invocation. uint scratchBuf1; assembly { scratchBuf1 := mload(0x40) } uint uncleHeaderLength; uint blobLength; uint shift; uint hashSlot; // Verify merkle proofs up to uncle block header. Calldata layout is: // - 2 byte big-endian slice length // - 2 byte big-endian offset to the beginning of previous slice hash within the current slice (should be zeroed) // - followed by the current slice verbatim for (;; offset += blobLength) { assembly { blobLength := and(calldataload(sub(offset, 30)), 0xffff) } if (blobLength == 0) { // Zero slice length marks the end of uncle proof. break; } assembly { shift := and(calldataload(sub(offset, 28)), 0xffff) } require (shift + 32 <= blobLength, "Shift bounds check."); offset += 4; assembly { hashSlot := calldataload(add(offset, shift)) } require (hashSlot == 0, "Non-empty hash slot."); assembly { calldatacopy(scratchBuf1, offset, blobLength) mstore(add(scratchBuf1, shift), seedHash) seedHash := sha3(scratchBuf1, blobLength) uncleHeaderLength := blobLength } } // At this moment the uncle hash is known. uncleHash = bytes32(seedHash); // Construct the uncle list of a canonical block. uint scratchBuf2 = scratchBuf1 + uncleHeaderLength; uint unclesLength; assembly { unclesLength := and(calldataload(sub(offset, 28)), 0xffff) } uint unclesShift; assembly { unclesShift := and(calldataload(sub(offset, 26)), 0xffff) } require (unclesShift + uncleHeaderLength <= unclesLength, "Shift bounds check."); offset += 6; assembly { calldatacopy(scratchBuf2, offset, unclesLength) } memcpy(scratchBuf2 + unclesShift, scratchBuf1, uncleHeaderLength); assembly { seedHash := sha3(scratchBuf2, unclesLength) } offset += unclesLength; // Verify the canonical block header using the computed sha3Uncles. assembly { blobLength := and(calldataload(sub(offset, 30)), 0xffff) shift := and(calldataload(sub(offset, 28)), 0xffff) } require (shift + 32 <= blobLength, "Shift bounds check."); offset += 4; assembly { hashSlot := calldataload(add(offset, shift)) } require (hashSlot == 0, "Non-empty hash slot."); assembly { calldatacopy(scratchBuf1, offset, blobLength) mstore(add(scratchBuf1, shift), seedHash) // At this moment the canonical block hash is known. blockHash := sha3(scratchBuf1, blobLength) } } // Helper to check the placeBet receipt. "offset" is the location of the proof beginning in the calldata. // RLP layout: [triePath, str([status, cumGasUsed, bloomFilter, [[address, [topics], data]])] function requireCorrectReceipt(uint offset) view private { uint leafHeaderByte; assembly { leafHeaderByte := byte(0, calldataload(offset)) } require (leafHeaderByte >= 0xf7, "Receipt leaf longer than 55 bytes."); offset += leafHeaderByte - 0xf6; uint pathHeaderByte; assembly { pathHeaderByte := byte(0, calldataload(offset)) } if (pathHeaderByte <= 0x7f) { offset += 1; } else { require (pathHeaderByte >= 0x80 && pathHeaderByte <= 0xb7, "Path is an RLP string."); offset += pathHeaderByte - 0x7f; } uint receiptStringHeaderByte; assembly { receiptStringHeaderByte := byte(0, calldataload(offset)) } require (receiptStringHeaderByte == 0xb9, "Receipt string is always at least 256 bytes long, but less than 64k."); offset += 3; uint receiptHeaderByte; assembly { receiptHeaderByte := byte(0, calldataload(offset)) } require (receiptHeaderByte == 0xf9, "Receipt is always at least 256 bytes long, but less than 64k."); offset += 3; uint statusByte; assembly { statusByte := byte(0, calldataload(offset)) } require (statusByte == 0x1, "Status should be success."); offset += 1; uint cumGasHeaderByte; assembly { cumGasHeaderByte := byte(0, calldataload(offset)) } if (cumGasHeaderByte <= 0x7f) { offset += 1; } else { require (cumGasHeaderByte >= 0x80 && cumGasHeaderByte <= 0xb7, "Cumulative gas is an RLP string."); offset += cumGasHeaderByte - 0x7f; } uint bloomHeaderByte; assembly { bloomHeaderByte := byte(0, calldataload(offset)) } require (bloomHeaderByte == 0xb9, "Bloom filter is always 256 bytes long."); offset += 256 + 3; uint logsListHeaderByte; assembly { logsListHeaderByte := byte(0, calldataload(offset)) } require (logsListHeaderByte == 0xf8, "Logs list is less than 256 bytes long."); offset += 2; uint logEntryHeaderByte; assembly { logEntryHeaderByte := byte(0, calldataload(offset)) } require (logEntryHeaderByte == 0xf8, "Log entry is less than 256 bytes long."); offset += 2; uint addressHeaderByte; assembly { addressHeaderByte := byte(0, calldataload(offset)) } require (addressHeaderByte == 0x94, "Address is 20 bytes long."); uint logAddress; assembly { logAddress := and(calldataload(sub(offset, 11)), 0xffffffffffffffffffffffffffffffffffffffff) } require (logAddress == uint(address(this))); } // Memory copy. function memcpy(uint dest, uint src, uint len) pure private { // Full 32 byte words for(; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) } dest += 32; src += 32; } // Remaining bytes uint mask = 256 ** (32 - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) let destpart := and(mload(dest), mask) mstore(dest, or(destpart, srcpart)) } } } /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } library NameFilter { /** * filters name strings * -converts uppercase to lower case. * -makes sure it does not start/end with a space * -cannot be only numbers * -cannot start with 0x * -restricts characters to A-Z, a-z, 0-9. * @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 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); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"secretSigner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"jackpotSize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"betMask","type":"uint256"},{"name":"modulo","type":"uint256"},{"name":"commitLastBlock","type":"uint256"},{"name":"commit","type":"uint256"},{"name":"recCode","type":"bytes32"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"placeBet","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"croupier","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"nameStr","type":"string"},{"name":"recCode","type":"bytes32"}],"name":"registerName","outputs":[{"name":"","type":"bool"},{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxProfit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"},{"name":"withdrawAmount","type":"uint256"}],"name":"withdrawFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"reveal","type":"uint256"},{"name":"blockHash","type":"bytes32"}],"name":"settleBet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"acceptNextOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nextOwner","type":"address"}],"name":"approveNextOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"increaseAmount","type":"uint256"}],"name":"increaseJackpot","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newSecretSigner","type":"address"}],"name":"setSecretSigner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lockedInBets","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"commit","type":"uint256"}],"name":"refundBet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getRegisterName","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"reveal","type":"uint256"},{"name":"canonicalBlockNumber","type":"uint256"}],"name":"settleBetUncleMerkleProof","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newCroupier","type":"address"}],"name":"setCroupier","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_maxProfit","type":"uint256"}],"name":"setMaxProfit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"FailedPayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Payment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"RecommendPayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"JackpotPayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"pid","type":"uint256"},{"indexed":true,"name":"pname","type":"bytes32"},{"indexed":true,"name":"paddr","type":"address"},{"indexed":false,"name":"recPid","type":"uint256"},{"indexed":false,"name":"recPname","type":"bytes32"},{"indexed":false,"name":"recPaddr","type":"address"},{"indexed":false,"name":"amountPaid","type":"uint256"},{"indexed":false,"name":"isNewPlayer","type":"bool"},{"indexed":false,"name":"timeStamp","type":"uint256"}],"name":"OnRegisterName","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"commit","type":"uint256"}],"name":"Commit","type":"event"}]
Contract Creation Code
6080604052600060085534801561001557600080fd5b5060008054600160a060020a0319908116331790915560038054821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee908117909155600780549092161790556132ae806100656000396000f3006080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166341c0e1b581146101135780634d61537f1461012857806357246d231461015957806358733494146101805780636b5c5f391461019d5780638225af80146101b25780638da5cb5b146101e4578063b539cd55146101f9578063c10753291461020e578063ca722cdc14610232578063d06c54fb1461024d578063d579fd4414610262578063d6d30a5114610283578063d702087f1461029b578063df88126f146102bc578063e1fdb4b4146102d1578063e2c8416d146102e9578063f025a7301461030a578063f8bb201c14610325578063fbd668a914610346575b005b34801561011f57600080fd5b5061011161035e565b34801561013457600080fd5b5061013d610472565b60408051600160a060020a039092168252519081900360200190f35b34801561016557600080fd5b5061016e610481565b60408051918252519081900360200190f35b61011160043560243560443560643560843560a43560c435610487565b3480156101a957600080fd5b5061013d610b30565b6101c9602460048035828101929101359035610b3f565b60408051921515835260208301919091528051918290030190f35b3480156101f057600080fd5b5061013d610d5a565b34801561020557600080fd5b5061016e610d69565b34801561021a57600080fd5b50610111600160a060020a0360043516602435610d6f565b34801561023e57600080fd5b50610111600435602435610ee6565b34801561025957600080fd5b50610111611137565b34801561026e57600080fd5b50610111600160a060020a03600435166111dc565b34801561028f57600080fd5b506101116004356112d3565b3480156102a757600080fd5b50610111600160a060020a0360043516611448565b3480156102c857600080fd5b5061016e6114d9565b3480156102dd57600080fd5b506101116004356114df565b3480156102f557600080fd5b5061016e600160a060020a036004351661167b565b34801561031657600080fd5b506101116004356024356116aa565b34801561033157600080fd5b50610111600160a060020a036004351661188d565b34801561035257600080fd5b5061011160043561191e565b600054600160a060020a031633146103c0576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b60055415610464576040805160e560020a62461bcd02815260206004820152604860248201527f416c6c20626574732073686f756c642062652070726f6365737365642028736560448201527f74746c6564206f7220726566756e64656429206265666f72652073656c662d6460648201527f657374727563742e000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600054600160a060020a0316ff5b600354600160a060020a031681565b60045481565b6000848152600660205260408120600381015490919081908190650100000000009004600160a060020a03161561052e576040805160e560020a62461bcd02815260206004820152602160248201527f4265742073686f756c6420626520696e20612027636c65616e2720737461746560448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60018a11801561053f575060648a11155b1515610595576040805160e560020a62461bcd02815260206004820152601e60248201527f4d6f64756c6f2073686f756c642062652077697468696e2072616e67652e0000604482015290519081900360640190fd5b662386f26fc1000034101580156105b65750693f870857a3e0e38000003411155b151561060c576040805160e560020a62461bcd02815260206004820152601e60248201527f416d6f756e742073686f756c642062652077697468696e2072616e67652e0000604482015290519081900360640190fd5b60008b1180156106215750650100000000008b105b1515610677576040805160e560020a62461bcd02815260206004820152601c60248201527f4d61736b2073686f756c642062652077697468696e2072616e67652e00000000604482015290519081900360640190fd5b88431115801561069757506106934360fa63ffffffff611a0c16565b8911155b15156106ed576040805160e560020a62461bcd02815260206004820152601360248201527f436f6d6d69742068617320657870697265642e00000000000000000000000000604482015290519081900360640190fd5b60018989604051602001808364ffffffffff1664ffffffffff167b01000000000000000000000000000000000000000000000000000000028152600501828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106107725780518252601f199092019160209182019101610753565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600080845283830180875291909152601b83860152606083018e9052608083018d9052935160a08084019750919550601f1981019492819003909101925090865af11580156107ec573d6000803e3d6000fd5b5050604051601f190151600354600160a060020a03908116911614905061085d576040805160e560020a62461bcd02815260206004820152601d60248201527f4543445341207369676e6174757265206973206e6f742076616c69642e000000604482015290519081900360640190fd5b60288a116108e1576108c1603f7e010410410410410410410410410410410410410410410410410410410410416108b48e79200000000010000000000800000000040000000002000000000163ffffffff611a2916565b169063ffffffff611a5716565b60038501805464ffffffffff191664ffffffffff8e161790559250610971565b60008b1180156108f15750898b11155b151561096d576040805160e560020a62461bcd02815260206004820152602e60248201527f48696768206d6f64756c6f2072616e67652c206265744d61736b206c6172676560448201527f72207468616e206d6f64756c6f2e000000000000000000000000000000000000606482015290519081900360840190fd5b8a92505b61097c348b85611a78565b600254919350915061099590349063ffffffff611a0c16565b8211156109ec576040805160e560020a62461bcd02815260206004820152601a60248201527f6d617850726f666974206c696d69742076696f6c6174696f6e2e000000000000604482015290519081900360640190fd5b6005546109ff908363ffffffff611a0c16565b600555600454610a15908263ffffffff611a0c16565b6004819055600554303191610a2f9163ffffffff611a0c16565b1115610a85576040805160e560020a62461bcd02815260206004820152601f60248201527f43616e6e6f74206166666f726420746f206c6f73652074686973206265742e00604482015290519081900360640190fd5b6040805189815290517f5bdd2fc99022530157777690475b670d3872f32262eb1d47d9ba8000dad58f879181900360200190a134845560018401805460ff191660ff8c81169190911761ff0019166101009186169190910217905543600285015560038401805478ffffffffffffffffffffffffffffffffffffffff000000000019163365010000000000810291909117909155610b239088611c0e565b5050505050505050505050565b600754600160a060020a031681565b60008080808080808066b1a2bc2ec50000341015610ba7576040805160e560020a62461bcd02815260206004820152601c60248201527f596f75206861766520746f2070617920746865206e616d652066656500000000604482015290519081900360640190fd5b610be08b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843750611c7d945050505050565b6000818152600a602052604090205490965015610c47576040805160e560020a62461bcd02815260206004820152601d60248201527f536f7272792074686174206e616d6520616c72656164792074616b656e000000604482015290519081900360640190fd5b339450610c5385612456565b600160a060020a0386166000908152600960209081526040808320548a8452600a8352818420819055808452600b9092529091206001018890559094509250838015610c9e57508815155b8015610caa5750888614155b15610cca576000898152600a60205260409020549150610cca83836124d8565b506000818152600b602090815260409182902060018101548154845186815293840191909152600160a060020a039081168385015234606084015286151560808401524260a084015292519092871691889186917f39e403a5b1c4ac83a1df23c19dc0e8d4375044852471ce8f8db01677ab206a1c919081900360c00190a4509199919850909650505050505050565b600054600160a060020a031681565b60025481565b600054600160a060020a03163314610dd1576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b3031811115610e4f576040805160e560020a62461bcd028152602060048201526024808201527f496e63726561736520616d6f756e74206c6172676572207468616e2062616c6160448201527f6e63652e00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b30600160a060020a031631610e8182610e75600554600454611a0c90919063ffffffff16565b9063ffffffff611a0c16565b1115610ed7576040805160e560020a62461bcd02815260206004820152601160248201527f4e6f7420656e6f7567682066756e64732e000000000000000000000000000000604482015290519081900360640190fd5b610ee282828361252d565b5050565b6007546000908190600160a060020a03163314610f73576040805160e560020a62461bcd02815260206004820152602c60248201527f4f6e6c7943726f7570696572206d6574686f64732063616c6c6564206279206e60448201527f6f6e2d63726f75706965722e0000000000000000000000000000000000000000606482015290519081900360840190fd5b83604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310610fc25780518252601f199092019160209182019101610fa3565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600081815260069092529290206002810154929650945050431191506110829050576040805160e560020a62461bcd02815260206004820152603360248201527f736574746c6542657420696e207468652073616d6520626c6f636b206173207060448201527f6c6163654265742c206f72206265666f72652e00000000000000000000000000606482015290519081900360840190fd5b60028101546110989060fa63ffffffff611a0c16565b431115611115576040805160e560020a62461bcd02815260206004820152602260248201527f426c6f636b686173682063616e2774206265207175657269656420627920455660448201527f4d2e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600281015440831461112657600080fd5b6111318185856125e0565b50505050565b600154600160a060020a031633146111ab576040805160e560020a62461bcd02815260206004820152602660248201527f43616e206f6e6c792061636365707420707265617070726f766564206e657720604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b6001546000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b600054600160a060020a0316331461123e576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b600054600160a060020a03828116911614156112a4576040805160e560020a62461bcd02815260206004820152601d60248201527f43616e6e6f7420617070726f76652063757272656e74206f776e65722e000000604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611335576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b30318111156113b3576040805160e560020a62461bcd028152602060048201526024808201527f496e63726561736520616d6f756e74206c6172676572207468616e2062616c6160448201527f6e63652e00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b30600160a060020a0316316113d982610e75600554600454611a0c90919063ffffffff16565b111561142f576040805160e560020a62461bcd02815260206004820152601160248201527f4e6f7420656e6f7567682066756e64732e000000000000000000000000000000604482015290519081900360640190fd5b600454611442908263ffffffff611a0c16565b60045550565b600054600160a060020a031633146114aa576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60055481565b6000818152600660205260408120805490918082151561156f576040805160e560020a62461bcd02815260206004820152602260248201527f4265742073686f756c6420626520696e20616e2027616374697665272073746160448201527f7465000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60028401546115859060fa63ffffffff611a0c16565b4311611601576040805160e560020a62461bcd02815260206004820152602260248201527f426c6f636b686173682063616e2774206265207175657269656420627920455660448201527f4d2e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008455600184015461162190849060ff80821691610100900416611a78565b6005549193509150611639908363ffffffff61287716565b60055560045461164f908263ffffffff61287716565b600455600384015461167490650100000000009004600160a060020a0316848061252d565b5050505050565b600160a060020a0381166000908152600960209081526040808320548352600b9091529020600101545b919050565b600754600090819081908190600160a060020a0316331461173b576040805160e560020a62461bcd02815260206004820152602c60248201527f4f6e6c7943726f7570696572206d6574686f64732063616c6c6564206279206e60448201527f6f6e2d63726f75706965722e0000000000000000000000000000000000000000606482015290519081900360840190fd5b85604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061178a5780518252601f19909201916020918201910161176b565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600081815260069092529290209197509095506117d6925087915060fa9050611a0c565b431115611853576040805160e560020a62461bcd02815260206004820152602260248201527f426c6f636b686173682063616e2774206265207175657269656420627920455660448201527f4d2e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61185d604861288e565b611868846044612e0f565b90925090508440821461187a57600080fd5b6118858387836125e0565b505050505050565b600054600160a060020a031633146118ef576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611980576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b693f870857a3e0e38000008110611a07576040805160e560020a62461bcd02815260206004820152602260248201527f6d617850726f6669742073686f756c6420626520612073616e65206e756d626560448201527f722e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600255565b600082820183811015611a1e57600080fd5b8091505b5092915050565b600080831515611a3c5760009150611a22565b50828202828482811515611a4c57fe5b0414611a1e57600080fd5b6000811515611a6557600080fd5b8183811515611a7057fe5b069392505050565b6000806000836000108015611a8d5750848411155b1515611ae3576040805160e560020a62461bcd02815260206004820152601d60248201527f57696e2070726f626162696c697479206f7574206f662072616e67652e000000604482015290519081900360640190fd5b67016345785d8a0000861015611afa576000611b03565b66038d7ea4c680005b9150611b276064611b1b88600163ffffffff611a2916565b9063ffffffff61309d16565b9050660110d9316ec000811015611b425750660110d9316ec0005b85611b53828463ffffffff611a0c16565b1115611bcf576040805160e560020a62461bcd02815260206004820152602260248201527f42657420646f65736e2774206576656e20636f76657220686f7573652065646760448201527f652e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b611c0384611b1b87611bf786611beb8c8863ffffffff61287716565b9063ffffffff61287716565b9063ffffffff611a2916565b925050935093915050565b6000806000611c1c85612456565b9250828015611c2a57508315155b1561167457600160a060020a038516600090815260096020908152604080832054808452600b90925290912060010154909250841461167457506000838152600a602052604090205461167482826124d8565b8051600090829082808060208411801590611c985750600084115b1515611d14576040805160e560020a62461bcd02815260206004820152602a60248201527f737472696e67206d757374206265206265747765656e203120616e642033322060448201527f6368617261637465727300000000000000000000000000000000000000000000606482015290519081900360840190fd5b846000815181101515611d2357fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214158015611d8a57508460018503815181101515611d6257fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214155b1515611e06576040805160e560020a62461bcd02815260206004820152602560248201527f737472696e672063616e6e6f74207374617274206f7220656e6420776974682060448201527f7370616365000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b846000815181101515611e1557fe5b90602001015160f860020a900460f860020a02600160f860020a031916603060f860020a021415611f5857846001815181101515611e4f57fe5b90602001015160f860020a900460f860020a02600160f860020a031916607860f860020a0214151515611ecc576040805160e560020a62461bcd02815260206004820152601b60248201527f737472696e672063616e6e6f7420737461727420776974682030780000000000604482015290519081900360640190fd5b846001815181101515611edb57fe5b90602001015160f860020a900460f860020a02600160f860020a031916605860f860020a0214151515611f58576040805160e560020a62461bcd02815260206004820152601b60248201527f737472696e672063616e6e6f7420737461727420776974682030580000000000604482015290519081900360640190fd5b600091505b838210156123ee5784517f400000000000000000000000000000000000000000000000000000000000000090869084908110611f9557fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015612009575084517f5b0000000000000000000000000000000000000000000000000000000000000090869084908110611fea57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b1561207657848281518110151561201c57fe5b90602001015160f860020a900460f860020a0260f860020a900460200160f860020a02858381518110151561204d57fe5b906020010190600160f860020a031916908160001a90535082151561207157600192505b6123e3565b84517f6000000000000000000000000000000000000000000000000000000000000000908690849081106120a657fe5b90602001015160f860020a900460f860020a02600160f860020a03191611801561211a575084517f7b00000000000000000000000000000000000000000000000000000000000000908690849081106120fb57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b806121c4575084517f2f000000000000000000000000000000000000000000000000000000000000009086908490811061215057fe5b90602001015160f860020a900460f860020a02600160f860020a0319161180156121c4575084517f3a00000000000000000000000000000000000000000000000000000000000000908690849081106121a557fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b1515612240576040805160e560020a62461bcd02815260206004820152602260248201527f737472696e6720636f6e7461696e7320696e76616c696420636861726163746560448201527f7273000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b848281518110151561224e57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a02141561232d57848260010181518110151561228a57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a021415151561232d576040805160e560020a62461bcd02815260206004820152602860248201527f737472696e672063616e6e6f7420636f6e7461696e20636f6e7365637574697660448201527f6520737061636573000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b821580156123d9575084517f30000000000000000000000000000000000000000000000000000000000000009086908490811061236657fe5b90602001015160f860020a900460f860020a02600160f860020a03191610806123d9575084517f3900000000000000000000000000000000000000000000000000000000000000908690849081106123ba57fe5b90602001015160f860020a900460f860020a02600160f860020a031916115b156123e357600192505b600190910190611f5d565b600183151514612448576040805160e560020a62461bcd02815260206004820152601d60248201527f737472696e672063616e6e6f74206265206f6e6c79206e756d62657273000000604482015290519081900360640190fd5b505050506020015192915050565b600160a060020a03811660009081526009602052604081205415156124d0575060088054600190810191829055600160a060020a0383166000818152600960209081526040808320869055948252600b905292909220805473ffffffffffffffffffffffffffffffffffffffff19169092179091556116a5565b5060006116a5565b80158015906124f657506000828152600b6020526040902060020154155b801561251357506000828152600b60205260409020600201548114155b15610ee2576000918252600b602052604090912060020155565b604051600160a060020a0384169083156108fc029084906000818181858888f193505050501561259b57604080518281529051600160a060020a038516917fd4f43975feb89f48dd30cabbb32011045be187d1e11c8ea9faa43efc35282519919081900360200190a26125db565b604080518381529051600160a060020a038516917fac464fe4d3a86b9121261ac0a01dd981bfe0777c7c9d9c8f4473d31a9c0f9d2d919081900360200190a25b505050565b82546001840154600385015460ff8083169261010090041690650100000000009004600160a060020a031660008080808080808a1515612690576040805160e560020a62461bcd02815260206004820152602260248201527f4265742073686f756c6420626520696e20616e2027616374697665272073746160448201527f7465000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008e600001819055508c8c604051602001808381526020018260001916600019168152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106126f95780518252601f1990920191602091820191016126da565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120995061273492508991508c9050611a57565b95506127418b8b8b611a78565b90955093506000925082915060288a116127755760038e0154600287900a1664ffffffffff1615612770578492505b612781565b88861015612781578492505b600554612794908663ffffffff61287716565b60055567016345785d8a00008b106127dd576127c86103e86127bc898d63ffffffff61309d16565b9063ffffffff611a5716565b90508015156127dd5760048054600090915591505b600082111561282657604080518381529051600160a060020a038a16917fc388db0e8aa560a59633c094a0d0aa21322cd6234836fd5bac00fc5ae63b5783919081900360200190a25b612830888c6130c0565b61286788612844858563ffffffff611a0c16565b1561285e57612859858563ffffffff611a0c16565b612861565b60015b8561252d565b5050505050505050505050505050565b6000808383111561288757600080fd5b5050900390565b8035600090811a9080808080808080808060f78b101561291e576040805160e560020a62461bcd02815260206004820152602260248201527f52656365697074206c656166206c6f6e676572207468616e203535206279746560448201527f732e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9a8a0160f519019a8b3560001a9950607f8a116129405760018c019b506129b1565b60808a10158015612952575060b78a11155b15156129a8576040805160e560020a62461bcd02815260206004820152601660248201527f5061746820697320616e20524c5020737472696e672e00000000000000000000604482015290519081900360640190fd5b9a8901607e19019a5b8b3560001a985060b98914612a5d576040805160e560020a62461bcd028152602060048201526044602482018190527f5265636569707420737472696e6720697320616c77617973206174206c656173908201527f7420323536206279746573206c6f6e672c20627574206c657373207468616e2060648201527f36346b2e00000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b60039b909b019a8b3560001a975060f98814612ae9576040805160e560020a62461bcd02815260206004820152603d60248201527f5265636569707420697320616c77617973206174206c6561737420323536206260448201527f79746573206c6f6e672c20627574206c657373207468616e2036346b2e000000606482015290519081900360840190fd5b60039b909b019a8b3560001a965060018714612b4f576040805160e560020a62461bcd02815260206004820152601960248201527f5374617475732073686f756c6420626520737563636573732e00000000000000604482015290519081900360640190fd5b60019b909b019a8b3560001a9550607f8611612b705760018c019b50612be1565b60808610158015612b82575060b78611155b1515612bd8576040805160e560020a62461bcd02815260206004820181905260248201527f43756d756c61746976652067617320697320616e20524c5020737472696e672e604482015290519081900360640190fd5b9a8501607e19019a5b8b3560001a945060b98514612c66576040805160e560020a62461bcd02815260206004820152602660248201527f426c6f6f6d2066696c74657220697320616c776179732032353620627974657360448201527f206c6f6e672e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6101039b909b019a8b3560001a935060f88414612cf3576040805160e560020a62461bcd02815260206004820152602660248201527f4c6f6773206c697374206973206c657373207468616e2032353620627974657360448201527f206c6f6e672e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60029b909b019a8b3560001a925060f88314612d7f576040805160e560020a62461bcd02815260206004820152602660248201527f4c6f6720656e747279206973206c657373207468616e2032353620627974657360448201527f206c6f6e672e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60029b909b019a8b3560001a915060948214612de5576040805160e560020a62461bcd02815260206004820152601960248201527f41646472657373206973203230206279746573206c6f6e672e00000000000000604482015290519081900360640190fd5b50600a198b0135600160a060020a0316308114612e0157600080fd5b505050505050505050505050565b6040516000908190818080808080805b601d198b013561ffff169550851515612e3757612f1b565b601b198b013561ffff16945060208501861015612e9e576040805160e560020a62461bcd02815260206004820152601360248201527f536869667420626f756e647320636865636b2e00000000000000000000000000604482015290519081900360640190fd5b60048b81019b8601013593508315612f00576040805160e560020a62461bcd02815260206004820152601460248201527f4e6f6e2d656d707479206861736820736c6f742e000000000000000000000000604482015290519081900360640190fd5b858b89378b858901528588209b50859650858b019a50612e1f565b508a9750505083850161ffff601b198a01358116906019198b013516808701821015612f91576040805160e560020a62461bcd02815260206004820152601360248201527f536869667420626f756e647320636865636b2e00000000000000000000000000604482015290519081900360640190fd5b60068b019a50818b8437612fa8818401898961316d565b8183209b509981019961ffff601d198c013581169650601b198c013516945060208501861015613022576040805160e560020a62461bcd02815260206004820152601360248201527f536869667420626f756e647320636865636b2e00000000000000000000000000604482015290519081900360640190fd5b60048b81019b8601013593508315613084576040805160e560020a62461bcd02815260206004820152601460248201527f4e6f6e2d656d707479206861736820736c6f742e000000000000000000000000604482015290519081900360640190fd5b858b893750505050830196909652509390932093915050565b6000808083116130ac57600080fd5b82848115156130b757fe5b04949350505050565b600160a060020a038216600090815260096020908152604080832054808452600b9092528220600281015491929091819081908110156131645760028401546000908152600b6020526040902092506131256064611b1b88600163ffffffff611a2916565b9150660110d9316ec0008211156131645761314c6064611b1b84603263ffffffff611a2916565b835490915061316490600160a060020a0316826131b1565b50505050505050565b60005b60208210613192578251845260209384019390920191601f1990910190613170565b50905182516020929092036101000a6000190180199091169116179052565b604051600160a060020a0383169082156108fc029083906000818181858888f193505050501561321f57604080518281529051600160a060020a038416917ff6e71bbe21edb0de8d419139b6370bef16cd7f405537b4520512edcc45928d76919081900360200190a2610ee2565b604080518281529051600160a060020a038416917fac464fe4d3a86b9121261ac0a01dd981bfe0777c7c9d9c8f4473d31a9c0f9d2d919081900360200190a2505056004f6e6c794f776e6572206d6574686f64732063616c6c6564206279206e6f6e2da165627a7a7230582017a99310fc452ec62cdcb874a3dc430cb15f092d03954c0fed682633432217480029
Deployed Bytecode
0x6080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166341c0e1b581146101135780634d61537f1461012857806357246d231461015957806358733494146101805780636b5c5f391461019d5780638225af80146101b25780638da5cb5b146101e4578063b539cd55146101f9578063c10753291461020e578063ca722cdc14610232578063d06c54fb1461024d578063d579fd4414610262578063d6d30a5114610283578063d702087f1461029b578063df88126f146102bc578063e1fdb4b4146102d1578063e2c8416d146102e9578063f025a7301461030a578063f8bb201c14610325578063fbd668a914610346575b005b34801561011f57600080fd5b5061011161035e565b34801561013457600080fd5b5061013d610472565b60408051600160a060020a039092168252519081900360200190f35b34801561016557600080fd5b5061016e610481565b60408051918252519081900360200190f35b61011160043560243560443560643560843560a43560c435610487565b3480156101a957600080fd5b5061013d610b30565b6101c9602460048035828101929101359035610b3f565b60408051921515835260208301919091528051918290030190f35b3480156101f057600080fd5b5061013d610d5a565b34801561020557600080fd5b5061016e610d69565b34801561021a57600080fd5b50610111600160a060020a0360043516602435610d6f565b34801561023e57600080fd5b50610111600435602435610ee6565b34801561025957600080fd5b50610111611137565b34801561026e57600080fd5b50610111600160a060020a03600435166111dc565b34801561028f57600080fd5b506101116004356112d3565b3480156102a757600080fd5b50610111600160a060020a0360043516611448565b3480156102c857600080fd5b5061016e6114d9565b3480156102dd57600080fd5b506101116004356114df565b3480156102f557600080fd5b5061016e600160a060020a036004351661167b565b34801561031657600080fd5b506101116004356024356116aa565b34801561033157600080fd5b50610111600160a060020a036004351661188d565b34801561035257600080fd5b5061011160043561191e565b600054600160a060020a031633146103c0576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b60055415610464576040805160e560020a62461bcd02815260206004820152604860248201527f416c6c20626574732073686f756c642062652070726f6365737365642028736560448201527f74746c6564206f7220726566756e64656429206265666f72652073656c662d6460648201527f657374727563742e000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600054600160a060020a0316ff5b600354600160a060020a031681565b60045481565b6000848152600660205260408120600381015490919081908190650100000000009004600160a060020a03161561052e576040805160e560020a62461bcd02815260206004820152602160248201527f4265742073686f756c6420626520696e20612027636c65616e2720737461746560448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60018a11801561053f575060648a11155b1515610595576040805160e560020a62461bcd02815260206004820152601e60248201527f4d6f64756c6f2073686f756c642062652077697468696e2072616e67652e0000604482015290519081900360640190fd5b662386f26fc1000034101580156105b65750693f870857a3e0e38000003411155b151561060c576040805160e560020a62461bcd02815260206004820152601e60248201527f416d6f756e742073686f756c642062652077697468696e2072616e67652e0000604482015290519081900360640190fd5b60008b1180156106215750650100000000008b105b1515610677576040805160e560020a62461bcd02815260206004820152601c60248201527f4d61736b2073686f756c642062652077697468696e2072616e67652e00000000604482015290519081900360640190fd5b88431115801561069757506106934360fa63ffffffff611a0c16565b8911155b15156106ed576040805160e560020a62461bcd02815260206004820152601360248201527f436f6d6d69742068617320657870697265642e00000000000000000000000000604482015290519081900360640190fd5b60018989604051602001808364ffffffffff1664ffffffffff167b01000000000000000000000000000000000000000000000000000000028152600501828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106107725780518252601f199092019160209182019101610753565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600080845283830180875291909152601b83860152606083018e9052608083018d9052935160a08084019750919550601f1981019492819003909101925090865af11580156107ec573d6000803e3d6000fd5b5050604051601f190151600354600160a060020a03908116911614905061085d576040805160e560020a62461bcd02815260206004820152601d60248201527f4543445341207369676e6174757265206973206e6f742076616c69642e000000604482015290519081900360640190fd5b60288a116108e1576108c1603f7e010410410410410410410410410410410410410410410410410410410410416108b48e79200000000010000000000800000000040000000002000000000163ffffffff611a2916565b169063ffffffff611a5716565b60038501805464ffffffffff191664ffffffffff8e161790559250610971565b60008b1180156108f15750898b11155b151561096d576040805160e560020a62461bcd02815260206004820152602e60248201527f48696768206d6f64756c6f2072616e67652c206265744d61736b206c6172676560448201527f72207468616e206d6f64756c6f2e000000000000000000000000000000000000606482015290519081900360840190fd5b8a92505b61097c348b85611a78565b600254919350915061099590349063ffffffff611a0c16565b8211156109ec576040805160e560020a62461bcd02815260206004820152601a60248201527f6d617850726f666974206c696d69742076696f6c6174696f6e2e000000000000604482015290519081900360640190fd5b6005546109ff908363ffffffff611a0c16565b600555600454610a15908263ffffffff611a0c16565b6004819055600554303191610a2f9163ffffffff611a0c16565b1115610a85576040805160e560020a62461bcd02815260206004820152601f60248201527f43616e6e6f74206166666f726420746f206c6f73652074686973206265742e00604482015290519081900360640190fd5b6040805189815290517f5bdd2fc99022530157777690475b670d3872f32262eb1d47d9ba8000dad58f879181900360200190a134845560018401805460ff191660ff8c81169190911761ff0019166101009186169190910217905543600285015560038401805478ffffffffffffffffffffffffffffffffffffffff000000000019163365010000000000810291909117909155610b239088611c0e565b5050505050505050505050565b600754600160a060020a031681565b60008080808080808066b1a2bc2ec50000341015610ba7576040805160e560020a62461bcd02815260206004820152601c60248201527f596f75206861766520746f2070617920746865206e616d652066656500000000604482015290519081900360640190fd5b610be08b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843750611c7d945050505050565b6000818152600a602052604090205490965015610c47576040805160e560020a62461bcd02815260206004820152601d60248201527f536f7272792074686174206e616d6520616c72656164792074616b656e000000604482015290519081900360640190fd5b339450610c5385612456565b600160a060020a0386166000908152600960209081526040808320548a8452600a8352818420819055808452600b9092529091206001018890559094509250838015610c9e57508815155b8015610caa5750888614155b15610cca576000898152600a60205260409020549150610cca83836124d8565b506000818152600b602090815260409182902060018101548154845186815293840191909152600160a060020a039081168385015234606084015286151560808401524260a084015292519092871691889186917f39e403a5b1c4ac83a1df23c19dc0e8d4375044852471ce8f8db01677ab206a1c919081900360c00190a4509199919850909650505050505050565b600054600160a060020a031681565b60025481565b600054600160a060020a03163314610dd1576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b3031811115610e4f576040805160e560020a62461bcd028152602060048201526024808201527f496e63726561736520616d6f756e74206c6172676572207468616e2062616c6160448201527f6e63652e00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b30600160a060020a031631610e8182610e75600554600454611a0c90919063ffffffff16565b9063ffffffff611a0c16565b1115610ed7576040805160e560020a62461bcd02815260206004820152601160248201527f4e6f7420656e6f7567682066756e64732e000000000000000000000000000000604482015290519081900360640190fd5b610ee282828361252d565b5050565b6007546000908190600160a060020a03163314610f73576040805160e560020a62461bcd02815260206004820152602c60248201527f4f6e6c7943726f7570696572206d6574686f64732063616c6c6564206279206e60448201527f6f6e2d63726f75706965722e0000000000000000000000000000000000000000606482015290519081900360840190fd5b83604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310610fc25780518252601f199092019160209182019101610fa3565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600081815260069092529290206002810154929650945050431191506110829050576040805160e560020a62461bcd02815260206004820152603360248201527f736574746c6542657420696e207468652073616d6520626c6f636b206173207060448201527f6c6163654265742c206f72206265666f72652e00000000000000000000000000606482015290519081900360840190fd5b60028101546110989060fa63ffffffff611a0c16565b431115611115576040805160e560020a62461bcd02815260206004820152602260248201527f426c6f636b686173682063616e2774206265207175657269656420627920455660448201527f4d2e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600281015440831461112657600080fd5b6111318185856125e0565b50505050565b600154600160a060020a031633146111ab576040805160e560020a62461bcd02815260206004820152602660248201527f43616e206f6e6c792061636365707420707265617070726f766564206e657720604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b6001546000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b600054600160a060020a0316331461123e576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b600054600160a060020a03828116911614156112a4576040805160e560020a62461bcd02815260206004820152601d60248201527f43616e6e6f7420617070726f76652063757272656e74206f776e65722e000000604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611335576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b30318111156113b3576040805160e560020a62461bcd028152602060048201526024808201527f496e63726561736520616d6f756e74206c6172676572207468616e2062616c6160448201527f6e63652e00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b30600160a060020a0316316113d982610e75600554600454611a0c90919063ffffffff16565b111561142f576040805160e560020a62461bcd02815260206004820152601160248201527f4e6f7420656e6f7567682066756e64732e000000000000000000000000000000604482015290519081900360640190fd5b600454611442908263ffffffff611a0c16565b60045550565b600054600160a060020a031633146114aa576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60055481565b6000818152600660205260408120805490918082151561156f576040805160e560020a62461bcd02815260206004820152602260248201527f4265742073686f756c6420626520696e20616e2027616374697665272073746160448201527f7465000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60028401546115859060fa63ffffffff611a0c16565b4311611601576040805160e560020a62461bcd02815260206004820152602260248201527f426c6f636b686173682063616e2774206265207175657269656420627920455660448201527f4d2e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008455600184015461162190849060ff80821691610100900416611a78565b6005549193509150611639908363ffffffff61287716565b60055560045461164f908263ffffffff61287716565b600455600384015461167490650100000000009004600160a060020a0316848061252d565b5050505050565b600160a060020a0381166000908152600960209081526040808320548352600b9091529020600101545b919050565b600754600090819081908190600160a060020a0316331461173b576040805160e560020a62461bcd02815260206004820152602c60248201527f4f6e6c7943726f7570696572206d6574686f64732063616c6c6564206279206e60448201527f6f6e2d63726f75706965722e0000000000000000000000000000000000000000606482015290519081900360840190fd5b85604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061178a5780518252601f19909201916020918201910161176b565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600081815260069092529290209197509095506117d6925087915060fa9050611a0c565b431115611853576040805160e560020a62461bcd02815260206004820152602260248201527f426c6f636b686173682063616e2774206265207175657269656420627920455660448201527f4d2e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61185d604861288e565b611868846044612e0f565b90925090508440821461187a57600080fd5b6118858387836125e0565b505050505050565b600054600160a060020a031633146118ef576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611980576040805160e560020a62461bcd0281526020600482015260266024820152600080516020613263833981519152604482015260d160020a6537bbb732b91702606482015290519081900360840190fd5b693f870857a3e0e38000008110611a07576040805160e560020a62461bcd02815260206004820152602260248201527f6d617850726f6669742073686f756c6420626520612073616e65206e756d626560448201527f722e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600255565b600082820183811015611a1e57600080fd5b8091505b5092915050565b600080831515611a3c5760009150611a22565b50828202828482811515611a4c57fe5b0414611a1e57600080fd5b6000811515611a6557600080fd5b8183811515611a7057fe5b069392505050565b6000806000836000108015611a8d5750848411155b1515611ae3576040805160e560020a62461bcd02815260206004820152601d60248201527f57696e2070726f626162696c697479206f7574206f662072616e67652e000000604482015290519081900360640190fd5b67016345785d8a0000861015611afa576000611b03565b66038d7ea4c680005b9150611b276064611b1b88600163ffffffff611a2916565b9063ffffffff61309d16565b9050660110d9316ec000811015611b425750660110d9316ec0005b85611b53828463ffffffff611a0c16565b1115611bcf576040805160e560020a62461bcd02815260206004820152602260248201527f42657420646f65736e2774206576656e20636f76657220686f7573652065646760448201527f652e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b611c0384611b1b87611bf786611beb8c8863ffffffff61287716565b9063ffffffff61287716565b9063ffffffff611a2916565b925050935093915050565b6000806000611c1c85612456565b9250828015611c2a57508315155b1561167457600160a060020a038516600090815260096020908152604080832054808452600b90925290912060010154909250841461167457506000838152600a602052604090205461167482826124d8565b8051600090829082808060208411801590611c985750600084115b1515611d14576040805160e560020a62461bcd02815260206004820152602a60248201527f737472696e67206d757374206265206265747765656e203120616e642033322060448201527f6368617261637465727300000000000000000000000000000000000000000000606482015290519081900360840190fd5b846000815181101515611d2357fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214158015611d8a57508460018503815181101515611d6257fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214155b1515611e06576040805160e560020a62461bcd02815260206004820152602560248201527f737472696e672063616e6e6f74207374617274206f7220656e6420776974682060448201527f7370616365000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b846000815181101515611e1557fe5b90602001015160f860020a900460f860020a02600160f860020a031916603060f860020a021415611f5857846001815181101515611e4f57fe5b90602001015160f860020a900460f860020a02600160f860020a031916607860f860020a0214151515611ecc576040805160e560020a62461bcd02815260206004820152601b60248201527f737472696e672063616e6e6f7420737461727420776974682030780000000000604482015290519081900360640190fd5b846001815181101515611edb57fe5b90602001015160f860020a900460f860020a02600160f860020a031916605860f860020a0214151515611f58576040805160e560020a62461bcd02815260206004820152601b60248201527f737472696e672063616e6e6f7420737461727420776974682030580000000000604482015290519081900360640190fd5b600091505b838210156123ee5784517f400000000000000000000000000000000000000000000000000000000000000090869084908110611f9557fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015612009575084517f5b0000000000000000000000000000000000000000000000000000000000000090869084908110611fea57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b1561207657848281518110151561201c57fe5b90602001015160f860020a900460f860020a0260f860020a900460200160f860020a02858381518110151561204d57fe5b906020010190600160f860020a031916908160001a90535082151561207157600192505b6123e3565b84517f6000000000000000000000000000000000000000000000000000000000000000908690849081106120a657fe5b90602001015160f860020a900460f860020a02600160f860020a03191611801561211a575084517f7b00000000000000000000000000000000000000000000000000000000000000908690849081106120fb57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b806121c4575084517f2f000000000000000000000000000000000000000000000000000000000000009086908490811061215057fe5b90602001015160f860020a900460f860020a02600160f860020a0319161180156121c4575084517f3a00000000000000000000000000000000000000000000000000000000000000908690849081106121a557fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b1515612240576040805160e560020a62461bcd02815260206004820152602260248201527f737472696e6720636f6e7461696e7320696e76616c696420636861726163746560448201527f7273000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b848281518110151561224e57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a02141561232d57848260010181518110151561228a57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a021415151561232d576040805160e560020a62461bcd02815260206004820152602860248201527f737472696e672063616e6e6f7420636f6e7461696e20636f6e7365637574697660448201527f6520737061636573000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b821580156123d9575084517f30000000000000000000000000000000000000000000000000000000000000009086908490811061236657fe5b90602001015160f860020a900460f860020a02600160f860020a03191610806123d9575084517f3900000000000000000000000000000000000000000000000000000000000000908690849081106123ba57fe5b90602001015160f860020a900460f860020a02600160f860020a031916115b156123e357600192505b600190910190611f5d565b600183151514612448576040805160e560020a62461bcd02815260206004820152601d60248201527f737472696e672063616e6e6f74206265206f6e6c79206e756d62657273000000604482015290519081900360640190fd5b505050506020015192915050565b600160a060020a03811660009081526009602052604081205415156124d0575060088054600190810191829055600160a060020a0383166000818152600960209081526040808320869055948252600b905292909220805473ffffffffffffffffffffffffffffffffffffffff19169092179091556116a5565b5060006116a5565b80158015906124f657506000828152600b6020526040902060020154155b801561251357506000828152600b60205260409020600201548114155b15610ee2576000918252600b602052604090912060020155565b604051600160a060020a0384169083156108fc029084906000818181858888f193505050501561259b57604080518281529051600160a060020a038516917fd4f43975feb89f48dd30cabbb32011045be187d1e11c8ea9faa43efc35282519919081900360200190a26125db565b604080518381529051600160a060020a038516917fac464fe4d3a86b9121261ac0a01dd981bfe0777c7c9d9c8f4473d31a9c0f9d2d919081900360200190a25b505050565b82546001840154600385015460ff8083169261010090041690650100000000009004600160a060020a031660008080808080808a1515612690576040805160e560020a62461bcd02815260206004820152602260248201527f4265742073686f756c6420626520696e20616e2027616374697665272073746160448201527f7465000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008e600001819055508c8c604051602001808381526020018260001916600019168152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106126f95780518252601f1990920191602091820191016126da565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120995061273492508991508c9050611a57565b95506127418b8b8b611a78565b90955093506000925082915060288a116127755760038e0154600287900a1664ffffffffff1615612770578492505b612781565b88861015612781578492505b600554612794908663ffffffff61287716565b60055567016345785d8a00008b106127dd576127c86103e86127bc898d63ffffffff61309d16565b9063ffffffff611a5716565b90508015156127dd5760048054600090915591505b600082111561282657604080518381529051600160a060020a038a16917fc388db0e8aa560a59633c094a0d0aa21322cd6234836fd5bac00fc5ae63b5783919081900360200190a25b612830888c6130c0565b61286788612844858563ffffffff611a0c16565b1561285e57612859858563ffffffff611a0c16565b612861565b60015b8561252d565b5050505050505050505050505050565b6000808383111561288757600080fd5b5050900390565b8035600090811a9080808080808080808060f78b101561291e576040805160e560020a62461bcd02815260206004820152602260248201527f52656365697074206c656166206c6f6e676572207468616e203535206279746560448201527f732e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b9a8a0160f519019a8b3560001a9950607f8a116129405760018c019b506129b1565b60808a10158015612952575060b78a11155b15156129a8576040805160e560020a62461bcd02815260206004820152601660248201527f5061746820697320616e20524c5020737472696e672e00000000000000000000604482015290519081900360640190fd5b9a8901607e19019a5b8b3560001a985060b98914612a5d576040805160e560020a62461bcd028152602060048201526044602482018190527f5265636569707420737472696e6720697320616c77617973206174206c656173908201527f7420323536206279746573206c6f6e672c20627574206c657373207468616e2060648201527f36346b2e00000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b60039b909b019a8b3560001a975060f98814612ae9576040805160e560020a62461bcd02815260206004820152603d60248201527f5265636569707420697320616c77617973206174206c6561737420323536206260448201527f79746573206c6f6e672c20627574206c657373207468616e2036346b2e000000606482015290519081900360840190fd5b60039b909b019a8b3560001a965060018714612b4f576040805160e560020a62461bcd02815260206004820152601960248201527f5374617475732073686f756c6420626520737563636573732e00000000000000604482015290519081900360640190fd5b60019b909b019a8b3560001a9550607f8611612b705760018c019b50612be1565b60808610158015612b82575060b78611155b1515612bd8576040805160e560020a62461bcd02815260206004820181905260248201527f43756d756c61746976652067617320697320616e20524c5020737472696e672e604482015290519081900360640190fd5b9a8501607e19019a5b8b3560001a945060b98514612c66576040805160e560020a62461bcd02815260206004820152602660248201527f426c6f6f6d2066696c74657220697320616c776179732032353620627974657360448201527f206c6f6e672e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6101039b909b019a8b3560001a935060f88414612cf3576040805160e560020a62461bcd02815260206004820152602660248201527f4c6f6773206c697374206973206c657373207468616e2032353620627974657360448201527f206c6f6e672e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60029b909b019a8b3560001a925060f88314612d7f576040805160e560020a62461bcd02815260206004820152602660248201527f4c6f6720656e747279206973206c657373207468616e2032353620627974657360448201527f206c6f6e672e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60029b909b019a8b3560001a915060948214612de5576040805160e560020a62461bcd02815260206004820152601960248201527f41646472657373206973203230206279746573206c6f6e672e00000000000000604482015290519081900360640190fd5b50600a198b0135600160a060020a0316308114612e0157600080fd5b505050505050505050505050565b6040516000908190818080808080805b601d198b013561ffff169550851515612e3757612f1b565b601b198b013561ffff16945060208501861015612e9e576040805160e560020a62461bcd02815260206004820152601360248201527f536869667420626f756e647320636865636b2e00000000000000000000000000604482015290519081900360640190fd5b60048b81019b8601013593508315612f00576040805160e560020a62461bcd02815260206004820152601460248201527f4e6f6e2d656d707479206861736820736c6f742e000000000000000000000000604482015290519081900360640190fd5b858b89378b858901528588209b50859650858b019a50612e1f565b508a9750505083850161ffff601b198a01358116906019198b013516808701821015612f91576040805160e560020a62461bcd02815260206004820152601360248201527f536869667420626f756e647320636865636b2e00000000000000000000000000604482015290519081900360640190fd5b60068b019a50818b8437612fa8818401898961316d565b8183209b509981019961ffff601d198c013581169650601b198c013516945060208501861015613022576040805160e560020a62461bcd02815260206004820152601360248201527f536869667420626f756e647320636865636b2e00000000000000000000000000604482015290519081900360640190fd5b60048b81019b8601013593508315613084576040805160e560020a62461bcd02815260206004820152601460248201527f4e6f6e2d656d707479206861736820736c6f742e000000000000000000000000604482015290519081900360640190fd5b858b893750505050830196909652509390932093915050565b6000808083116130ac57600080fd5b82848115156130b757fe5b04949350505050565b600160a060020a038216600090815260096020908152604080832054808452600b9092528220600281015491929091819081908110156131645760028401546000908152600b6020526040902092506131256064611b1b88600163ffffffff611a2916565b9150660110d9316ec0008211156131645761314c6064611b1b84603263ffffffff611a2916565b835490915061316490600160a060020a0316826131b1565b50505050505050565b60005b60208210613192578251845260209384019390920191601f1990910190613170565b50905182516020929092036101000a6000190180199091169116179052565b604051600160a060020a0383169082156108fc029083906000818181858888f193505050501561321f57604080518281529051600160a060020a038416917ff6e71bbe21edb0de8d419139b6370bef16cd7f405537b4520512edcc45928d76919081900360200190a2610ee2565b604080518281529051600160a060020a038416917fac464fe4d3a86b9121261ac0a01dd981bfe0777c7c9d9c8f4473d31a9c0f9d2d919081900360200190a2505056004f6e6c794f776e6572206d6574686f64732063616c6c6564206279206e6f6e2da165627a7a7230582017a99310fc452ec62cdcb874a3dc430cb15f092d03954c0fed682633432217480029
Swarm Source
bzzr://17a99310fc452ec62cdcb874a3dc430cb15f092d03954c0fed68263343221748
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $2,600.39 | 1.442 | $3,749.77 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.