Contract 0x721a46E7e05d3236A9F8bc411CfFd974a1E28C8F

Contract Overview

Balance:
7.628 Ether
Txn Hash
Method
Block
From
To
Value
0x1f0806317ea146eb72edbe6229eb0088cdfc781afb3dc0065882c843a5f36dcdMia Finished Wor...91650852020-11-29 17:42:12628 days 6 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000089322.7009897
0xe69d71512fdf2964512204a4a2b697b6790fa1facfab6e0052bc74e0851fc17fMia Finished Wor...91650162020-11-29 17:25:45628 days 7 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000089322.7009897
0xfae8537617b1a31bb01eaef0954c309ef926890dd6d1c62b54f45a4c129b2ca7Mia Finished Wor...91588972020-11-28 18:10:46629 days 6 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.00009042.73353862
0xa90f74466d0f71a99e8f9d3697715b62ff2ae2e8cdc8cd33ab91a9190b026d15Mia Finished Wor...91526112020-11-27 18:16:04630 days 6 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.00008652.61579292
0x2692fbb7c48b6c8b5e6a461d75ca4638a4de16543fb0c5c380fcac75967ddb18Place Bet91414602020-11-25 22:39:14632 days 1 hr ago0x26de50fab46b321991e45e484b923ca861bd9b4e IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0.241 Ether0.000162612.00026431
0xc6e1bbd66df46d484459f062fb6a35ca0a17ac515d3f49525d4b0f12c429be1fPlace Bet91412062020-11-25 21:34:29632 days 3 hrs ago0x4e85c7f3897559b4c5085ddc00db0261833b8324 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0.158 Ether0.000192612.00026431
0x0ba0c0aadd247330b31f806a9aefc6fbfae302f2de6871f6591f19b67ad3d249Place Bet91412062020-11-25 21:34:29632 days 3 hrs ago0x4e85c7f3897559b4c5085ddc00db0261833b8324 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0.1 Ether0.000192612.00026431
0x23d58012711c49647255a5300544946d3cf22e6d5f0a96e7e49c64c869297c3aPlace Bet91410562020-11-25 20:59:47632 days 3 hrs ago0x26de50fab46b321991e45e484b923ca861bd9b4e IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0.129 Ether0.000192612.0002643
0xa729fde9ea878e5a76014c4bc67994d1f2f1fbf02fc3b794254159437688e827Seed Pots91406202020-11-25 19:41:00632 days 4 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f7 Ether0.000379332.7001165
0x59829c0a9b7886dc60f021c0c5242d04de739af668cb23c7563352f85b577a57Payout Winners91406182020-11-25 19:40:39632 days 4 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000123972.7001165
0xcc5f1ca0cb2844d6cf44c8e2cc7ab43f81457323c23efbcf23c0624968172fa6Set Winning Marb...91406162020-11-25 19:40:23632 days 4 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000102632.7001165
0xedeba167292ed91276a5c8efb7ca46968ccf3d3eb0c9a16b6a8d043673e91f6cMia Finished Wor...91405932020-11-25 19:37:10632 days 4 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.0007911220.20087163
0x1c0157fac8477a8d392ed75d4859d5a6de5c29cc590507a8c090c91a5fae2105Mia Finished Wor...91405832020-11-25 19:33:42632 days 5 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000205056.20026753
0x0d93c6510557f65441b50dd5db8f30437a8f52c11bf606841bf987141caf4b04Mia Finished Wor...91405592020-11-25 19:28:37632 days 5 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.00013894.20018122
0xab1f0be308fe340f4fd1a03b8c74cf0cf3cb69fdae10879669782cce2d72cee7Mia Finished Wor...91405472020-11-25 19:25:01632 days 5 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.00013894.20018122
0x40e8ed6c675ea3792f41578db40f739809e597ae287cabe9bc096f8a4e612589Mia Finished Wor...91405232020-11-25 19:20:11632 days 5 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000112443.40014671
0x4e8cd57d6c5cec6da59f06da2feb4c59da9b2adbcb601daf0749c5887e0d8291Mia Finished Wor...91405062020-11-25 19:16:20632 days 5 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000112443.40014672
0xb3292f72e9f1c6d2d704ff45ca31b972cff3d194966ef03c6d02cfea2d267e9dMia Finished Wor...91404942020-11-25 19:13:10632 days 5 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000089292.70011651
0x4dc977fd0e23dbcfac3f51d3601300b7fc0a1b6c3c5e727fff84780f1996b3b3Mia Finished Wor...91404492020-11-25 19:04:36632 days 5 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000089292.7001174
0x1f4eb4f4a21a2bdfd5ae794d5a75d84535214fc5cb465197b305621ddb68ff8cMia Finished Wor...91404202020-11-25 18:58:37632 days 5 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000089292.70011741
0x352e8339366a09a5449883e9bdc59b4dadc2b3d7bb3198c5b6f04f708b7830faMia Finished Wor...91402382020-11-25 18:20:43632 days 6 hrs ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000064491.95
0xaa66625fd12f590cf6d96f89cb7ed4afa897f23e06bf10062d5a2e11b75d102bMia Finished Wor...91286222020-11-23 22:38:31634 days 1 hr ago0xe07676f48d566b3227a430c19ab848c599f91733 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0 Ether0.000145264.39228831
0x6fd487db5c26109fd0dcd2c073cb3d39566a963ab8b48a2e52a604dfee4061a4Place Bet91234102020-11-23 3:25:18634 days 21 hrs ago0x26de50fab46b321991e45e484b923ca861bd9b4e IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0.4 Ether0.000359713.73544494
0x9fa86f2ac7949c7bb95804e2b6ed4aadf250f7d54b3da9a59adda331fce8f95fPlace Bet91228772020-11-23 1:27:36634 days 23 hrs ago0x26de50fab46b321991e45e484b923ca861bd9b4e IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0.31 Ether0.000359713.73544494
0xebba898905e634a3df987306d56a42d50c0751ae13a3517d9de3f35dfe23f21bPlace Bet91226012020-11-23 0:25:15635 days 11 mins ago0xaf6761c2a3478550ce7a2cfdd230c728a8815a84 IN  0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0.119 Ether0.000359713.73544494
[ Download CSV Export 
Latest 22 internal transactions
Parent Txn Hash Block From To Value
0x59829c0a9b7886dc60f021c0c5242d04de739af668cb23c7563352f85b577a5791406182020-11-25 19:40:39632 days 4 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917336.65588571 Ether
0x59829c0a9b7886dc60f021c0c5242d04de739af668cb23c7563352f85b577a5791406182020-11-25 19:40:39632 days 4 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0x26de50fab46b321991e45e484b923ca861bd9b4e1.97211428 Ether
0xbba592331df42d5c3ae976b17215677261288feb41b4e3b9bf4924bf0a97819891221552020-11-22 22:41:00635 days 1 hr ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917336.90358024 Ether
0xbba592331df42d5c3ae976b17215677261288feb41b4e3b9bf4924bf0a97819891221552020-11-22 22:41:00635 days 1 hr ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0x4e85c7f3897559b4c5085ddc00db0261833b83243.04641975 Ether
0xe52f00d5f106cc00f93b00e8d3f95f8a8b7c6a479764c8f65eb248805547065591060422020-11-19 18:14:03638 days 6 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917337.682 Ether
0x85ae433d85ebd859ab28623e16c6826762f9fbe8b2f39cc5674ccd5e9ebcbd2690769792020-11-15 21:35:34642 days 3 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917338 Ether
0xf665c6bca508320989d5d2c5aa430acf52e58fdf2971d56866d440cce9a7f8ab90769432020-11-15 21:23:33642 days 3 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0x26de50fab46b321991e45e484b923ca861bd9b4e0.346 Ether
0xdb3ad5c5222a3d15c8451df6b2ec88f8df71eef9dbc9c6be341b11c00b264dee90511172020-11-11 19:23:30646 days 5 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917337 Ether
0xb0ac4f3e5af799e7521898459b6d5c4aee7e4a011ff8c3559c60ee75ce668e3190374712020-11-09 17:24:40648 days 7 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917336.99445864 Ether
0xb0ac4f3e5af799e7521898459b6d5c4aee7e4a011ff8c3559c60ee75ce668e3190374712020-11-09 17:24:40648 days 7 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0x26de50fab46b321991e45e484b923ca861bd9b4e1.06054135 Ether
0xb0bf8afd258450d1721c60dd94704b988ecb676541413769375042af79f0bb0e90244132020-11-07 18:21:20650 days 6 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917337 Ether
0x7d7e295a1103fb06e8fbff00cc78db985fad88b89222752d410066bb9dff944990091582020-11-04 20:41:26653 days 3 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917336.0066 Ether
0x7d7e295a1103fb06e8fbff00cc78db985fad88b89222752d410066bb9dff944990091582020-11-04 20:41:26653 days 3 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0x48c21da5aab992bdc292325f84d56a33ee04e2374.0044 Ether
0x2ec8c7e85c294c52a24d5f0f365ecee1dd077239008ddbe9f7af3635c96ee42d89883012020-11-01 21:42:01656 days 2 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917337 Ether
0x2919447f3fb51340a73a1398a9d04971fc73d783bc9730836df50cf12473b3a089882762020-11-01 21:38:07656 days 2 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917337 Ether
0x63832a0d83c65be72dd8ba78b60ed0b0358965d30c315b893e2cb8ff6a86468589881962020-11-01 21:21:52656 days 3 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917337.935 Ether
0x48cb43de698136c3155edb9cfb3bec92ad776a071b4cb954027310c4704b480c89881212020-11-01 21:05:36656 days 3 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917336.50971428 Ether
0x48cb43de698136c3155edb9cfb3bec92ad776a071b4cb954027310c4704b480c89881212020-11-01 21:05:36656 days 3 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0x26de50fab46b321991e45e484b923ca861bd9b4e0.61028571 Ether
0x0e285e3d052031272a7dc84dc5f82cc45921abbdbbc618b2bf950cdf7d4f7ac889874572020-11-01 18:36:44656 days 5 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917336.952 Ether
0x0e285e3d052031272a7dc84dc5f82cc45921abbdbbc618b2bf950cdf7d4f7ac889874572020-11-01 18:36:44656 days 5 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xbc2a432a01a64b5bdc9360c22b6603c60e96c8672.528 Ether
0x46d806913f194bca96af89008a21834363931f3481c332cb710a8d234b32c07c89169552020-10-20 21:31:39668 days 3 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917337 Ether
0xc0710b0e059d54ade78aa537d9a8b08981081be8749cea28e85aedbe6cc92ca089043162020-10-18 21:57:33670 days 2 hrs ago 0x721a46e7e05d3236a9f8bc411cffd974a1e28c8f0xe07676f48d566b3227a430c19ab848c599f917337.82 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MultiPot

Compiler Version
v0.7.3+commit.9bfce1f6

Optimization Enabled:
No with 200 runs

Other Settings:
petersburg EvmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2020-10-18
*/

// SPDX-License-Identifier: NONE
// © mia.bet
pragma solidity 0.7.3;

contract owned {
    address payable public owner;
    constructor() {
        owner = msg.sender;
    }

    modifier onlyOwner {
        require(msg.sender == owner, "Only owner can call this function.");
        _;
    }
}

/**
 * @author The Mia.bet team
 * @title Bet processing contract for mia.bet
 */
contract MultiPot is owned {
    enum Color {red, green, blue, yellow, white, orange, black}
    enum State {seeding, accepting_bets, race_in_progress, paying_out, refunding}
    Color public lastWinningColor;
    State public current_state;
    uint8 constant public numPots = 7;
    uint16 public workoutTresholdMeters = 2000;
    uint32 public workoutDeziMeters = 0;
    uint32 public round = 0;
    uint64 public roundStartTime = 0;
    uint public minimumBetAmount = 1000000 gwei; // 0.001 ether

    struct Pot {
        uint amount;
        address payable[] uniqueGamblers;
        mapping (address => uint) stakes;
    }

    mapping (uint => Pot) pots;


    /**
     * state: seeding
     */

    function setMinimumBetAmount(uint amount) external onlyOwner {
        require(current_state == State.seeding, "Not possible in current state");
        minimumBetAmount = amount;
    }

    function setWorkoutThresholdMeters(uint16 meters) external onlyOwner {
        require(current_state == State.seeding, "Not possible in current state");
        workoutTresholdMeters = meters;
    }

    function kill() external onlyOwner {
        require(current_state == State.seeding, "Not possible in current state");
        selfdestruct(owner);
    }

    function startNewRound(uint seedAmount) internal {
        roundStartTime = uint64(block.timestamp); // security/no-block-members: see remark at the bottom
        round += 1;
        workoutDeziMeters = 0;
        emit RoundStarted(round, seedAmount);
    }

    function seedPots() external payable onlyOwner {
        require(current_state == State.seeding, "Not possible in current state");
        require(msg.value >= numPots * 1 wei, "Pots must not have amount 0");
        uint offset = numPots * round;
        delete pots[offset + uint8(Color.red)];
        delete pots[offset + uint8(Color.green)];
        delete pots[offset + uint8(Color.blue)];
        delete pots[offset + uint8(Color.yellow)];
        delete pots[offset + uint8(Color.white)];
        delete pots[offset + uint8(Color.orange)];
        delete pots[offset + uint8(Color.black)];
        startNewRound(msg.value);
        offset = offset + numPots;
        uint seedAmount = msg.value / numPots;
        for(uint8 j = 0; j < numPots; j++) {
           pots[offset + j].amount = seedAmount;
        }
        transitionTo(State.accepting_bets);
    }


    /**
     * state: accepting_bets
     */

    function placeBet(Color potColor, uint32 bet_round) external payable {
        require(current_state == State.accepting_bets, "Game has not started yet or a race is already in progress.");
        require(round == bet_round, "Bets can only be placed for the current round.");
        require(msg.value >= minimumBetAmount, "Your bet must be greater than or equal to the minimum bet amount.");
        address payable gambler = msg.sender;
        Pot storage pot = pots[uint8(potColor) + numPots * round];
        if (pot.stakes[gambler] == 0) {
            pot.uniqueGamblers.push(gambler);
        }
        pot.stakes[gambler] += msg.value;
        pot.amount += msg.value;
        emit BetPlaced(potColor, msg.value);
    }

    function miaFinishedWorkout(uint32 dezi_meters) external onlyOwner {
        require(current_state == State.accepting_bets, "Not possible in current state");
        emit HamsterRan(dezi_meters);
        workoutDeziMeters += dezi_meters;

        if (workoutDeziMeters / 10 >= workoutTresholdMeters) {
            transitionTo(State.race_in_progress);
            emit RaceStarted(round);
        }
    }


    /**
     * state: race_in_progress
     */

    function setWinningMarble(Color color, uint64 video_id, string calldata photo_id) external onlyOwner {
        require(current_state == State.race_in_progress, "Not possible in current state");
        lastWinningColor = color;
        emit WinnerChosen(round, color, video_id, photo_id);
        transitionTo(State.paying_out);
    }


    /**
     * state: paying_out
     */

    function payoutWinners() external returns (uint pendingPayouts) {
        require(current_state == State.paying_out, "Not possible in current state.");
        Pot storage winningPot = pots[uint8(lastWinningColor) + numPots * round];
        uint totalPayoutAmount = 0;
        for(uint8 j = 0; j < numPots; j++) {
            // sum up original payout amount (self.balance changes during payouts)
            totalPayoutAmount += pots[j + numPots * round].amount;
        }
        totalPayoutAmount = totalPayoutAmount * 80 / 100; // 20% house fee
        uint winningPotAmount = winningPot.amount;
        for(uint i = winningPot.uniqueGamblers.length; i >= 1; i--) {
            address payable gambler = winningPot.uniqueGamblers[i - 1];
            winningPot.uniqueGamblers.pop();
            uint stake = winningPot.stakes[gambler];
            /* profit = totalPayoutAmount * (stake / winningPotAmount)
               but do the multiplication before the division: */
            uint profit = totalPayoutAmount * stake / winningPotAmount;
            profit = profit >= stake ? profit : stake; // ensure no loss for player (reduces house profit)
            winningPot.stakes[gambler] = 0; // checks-effects-interactions pattern
            if (gambler.send(profit)) { // security/no-send: see remark at the bottom
                emit PayoutSuccessful(gambler, profit, round);
            } else {
                emit PayoutFailed(gambler, profit, round);
            }
            if(!(gasleft() > 26000)) {
                pendingPayouts = i - 1;
                break;
            }
        }

        assert(current_state == State.paying_out);
        if(gasleft() > 400000) { // 400_000 gas for 7 pots
            // payout house fee
            owner.transfer(address(this).balance);
            emit WinnersPaid(round, totalPayoutAmount, lastWinningColor, winningPotAmount);
            // transition to next state
            transitionTo(State.seeding);
        }
        return pendingPayouts;
    }


    /**
     * state: refunding
     */

    function claimRefund() external {
        require(block.timestamp > roundStartTime + 1 days, "Only possible 1 day after round started."); // security/no-block-members: see remark at the bottom
        require(current_state == State.accepting_bets || current_state == State.race_in_progress, "Not possible in current state.");
        transitionTo(State.refunding);
    }

    function refundAll() external returns (uint pendingRefunds) {
        require(current_state == State.refunding, "Only possible after a successful claimRefund()");
        for(uint8 i = 0; i < numPots; i++) {
           pendingRefunds = refundPot(pots[i + numPots * round]);
           if (pendingRefunds != 0) break;
        }
        assert(current_state == State.refunding); // assure no state changes in re-entrancy attacks
        if (pendingRefunds == 0) {
            transitionTo(State.seeding);
        }
        return pendingRefunds;
    }

    function refundPot(Pot storage pot) internal returns (uint pendingRefunds) {
        for(uint i = pot.uniqueGamblers.length; i >= 1; i--) {
            address payable gambler = pot.uniqueGamblers[i - 1];
            pot.uniqueGamblers.pop();
            uint amount = pot.stakes[gambler];
            pot.stakes[gambler] = 0;
            if (gambler.send(amount)) { // security/no-send: see remark at the bottom
                emit RefundSuccessful(gambler, amount);
            } else {
                emit RefundFailed(gambler, amount);
            }
            if(gasleft() < 26000) {
                // stop execution here to let state be saved
                // call function again to continue
                break;
            }
        }
        return pot.uniqueGamblers.length;
    }

    /**
     * state transition method
     */
    function transitionTo(State newState) internal {
      emit StateChanged(current_state, newState);
      current_state = newState;
    }

    /**
     * stateless functions
     */

    function getPotAmounts() external view returns (uint[numPots] memory amounts) {
        for(uint8 j = 0; j < numPots; j++) {
            amounts[j] = pots[j + numPots * round].amount;
        }
        return amounts;
    }


    /* events */
    event StateChanged(State from, State to);
    event WinnerChosen(uint32 indexed round, Color color, uint64 video_id, string photo_id);
    event WinnersPaid(uint32 indexed round, uint total_amount, Color color, uint winningPotAmount);
    event PayoutSuccessful(address winner, uint amount, uint32 round);
    event PayoutFailed(address winner, uint amount, uint32 round);
    event RefundSuccessful(address gambler, uint amount);
    event RefundFailed(address gambler, uint amount);
    event RoundStarted(uint32 indexed round, uint total_seed_amount);
    event RaceStarted(uint32 indexed round);
    event BetPlaced(Color pot, uint amount);
    event HamsterRan(uint32 dezi_meters);
}

/** Further Remarks
 * ----------------
 *
 * Warnings
 * - "security/no-send: Consider using 'transfer' in place of 'send'." => We use send, transfer could throw/revert and thus be used in a DOS attack.
 * - "security/no-block-members: Avoid using 'block.timestamp'." => Using block.timestamp is safe for time periods greather than 900s [1]. We use 1 day.
 *
 * Sources
 * [1] Is block.timestamp safe for longer time periods? https://ethereum.stackexchange.com/a/9752/44462
 */

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum MultiPot.Color","name":"pot","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetPlaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"dezi_meters","type":"uint32"}],"name":"HamsterRan","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"round","type":"uint32"}],"name":"PayoutFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"round","type":"uint32"}],"name":"PayoutSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"round","type":"uint32"}],"name":"RaceStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"gambler","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RefundFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"gambler","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RefundSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"round","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"total_seed_amount","type":"uint256"}],"name":"RoundStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum MultiPot.State","name":"from","type":"uint8"},{"indexed":false,"internalType":"enum MultiPot.State","name":"to","type":"uint8"}],"name":"StateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"round","type":"uint32"},{"indexed":false,"internalType":"enum MultiPot.Color","name":"color","type":"uint8"},{"indexed":false,"internalType":"uint64","name":"video_id","type":"uint64"},{"indexed":false,"internalType":"string","name":"photo_id","type":"string"}],"name":"WinnerChosen","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"round","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"total_amount","type":"uint256"},{"indexed":false,"internalType":"enum MultiPot.Color","name":"color","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"winningPotAmount","type":"uint256"}],"name":"WinnersPaid","type":"event"},{"inputs":[],"name":"claimRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"current_state","outputs":[{"internalType":"enum MultiPot.State","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPotAmounts","outputs":[{"internalType":"uint256[7]","name":"amounts","type":"uint256[7]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastWinningColor","outputs":[{"internalType":"enum MultiPot.Color","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"dezi_meters","type":"uint32"}],"name":"miaFinishedWorkout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minimumBetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numPots","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payoutWinners","outputs":[{"internalType":"uint256","name":"pendingPayouts","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum MultiPot.Color","name":"potColor","type":"uint8"},{"internalType":"uint32","name":"bet_round","type":"uint32"}],"name":"placeBet","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"refundAll","outputs":[{"internalType":"uint256","name":"pendingRefunds","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"round","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundStartTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seedPots","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMinimumBetAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum MultiPot.Color","name":"color","type":"uint8"},{"internalType":"uint64","name":"video_id","type":"uint64"},{"internalType":"string","name":"photo_id","type":"string"}],"name":"setWinningMarble","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"meters","type":"uint16"}],"name":"setWorkoutThresholdMeters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"workoutDeziMeters","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"workoutTresholdMeters","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"}]

60806040526107d0600060166101000a81548161ffff021916908361ffff16021790555060008060186101000a81548163ffffffff021916908363ffffffff160217905550600080601c6101000a81548163ffffffff021916908363ffffffff1602179055506000600160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555066038d7ea4c680006002553480156100a657600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612337806100f66000396000f3fe60806040526004361061011e5760003560e01c80638da5cb5b116100a0578063cbf8216111610064578063cbf821611461044c578063dd4f8f741461047d578063f7612c4d146104b2578063f91a664c146104f3578063fcfd638e146105325761011e565b80638da5cb5b146103645780639579719d146103a55780639f7c94aa146103d4578063b5545a3c146103ff578063ca9c9869146104165761011e565b80633e25e31e116100e75780633e25e31e146102b457806341c0e1b5146102e25780635b04cbb5146102f957806378e9f1ba1461032f578063848af25a1461035a5761011e565b80620287cc146101235780630aa44a2b14610176578063146ca5311461021d5780632be2438b1461024e57806338e771ab14610289575b600080fd5b34801561012f57600080fd5b50610138610573565b6040518082600760200280838360005b83811015610163578082015181840152602081019050610148565b5050505090500191505060405180910390f35b34801561018257600080fd5b5061021b6004803603606081101561019957600080fd5b81019080803560ff169060200190929190803567ffffffffffffffff169060200190929190803590602001906401000000008111156101d757600080fd5b8201836020820111156101e957600080fd5b8035906020019184600183028401116401000000008311171561020b57600080fd5b90919293919293905050506105ef565b005b34801561022957600080fd5b50610232610802565b604051808263ffffffff16815260200191505060405180910390f35b34801561025a57600080fd5b506102876004803603602081101561027157600080fd5b8101908080359060200190929190505050610818565b005b34801561029557600080fd5b5061029e610961565b6040518082815260200191505060405180910390f35b3480156102c057600080fd5b506102c9610a91565b604051808260ff16815260200191505060405180910390f35b3480156102ee57600080fd5b506102f7610a96565b005b34801561030557600080fd5b5061030e610c0e565b6040518082600481111561031e57fe5b815260200191505060405180910390f35b34801561033b57600080fd5b50610344610c21565b6040518082815260200191505060405180910390f35b610362610c27565b005b34801561037057600080fd5b5061037961102e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103b157600080fd5b506103ba611052565b604051808261ffff16815260200191505060405180910390f35b3480156103e057600080fd5b506103e9611066565b6040518082815260200191505060405180910390f35b34801561040b57600080fd5b506104146115aa565b005b34801561042257600080fd5b5061042b6116fe565b6040518082600681111561043b57fe5b815260200191505060405180910390f35b34801561045857600080fd5b50610461611711565b604051808263ffffffff16815260200191505060405180910390f35b34801561048957600080fd5b50610492611727565b604051808267ffffffffffffffff16815260200191505060405180910390f35b3480156104be57600080fd5b506104f1600480360360208110156104d557600080fd5b81019080803563ffffffff169060200190929190505050611741565b005b3480156104ff57600080fd5b506105306004803603602081101561051657600080fd5b81019080803561ffff169060200190929190505050611989565b005b6105716004803603604081101561054857600080fd5b81019080803560ff169060200190929190803563ffffffff169060200190929190505050611ae8565b005b61057b612180565b60005b600760ff168160ff1610156105eb576003600080601c9054906101000a900463ffffffff16600760ff16028360ff160163ffffffff16815260200190815260200160002060000154828260ff16600781106105d557fe5b602002018181525050808060010191505061057e565b5090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610693576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806121e16022913960400191505060405180910390fd5b600260048111156106a057fe5b600060159054906101000a900460ff1660048111156106bb57fe5b1461072e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420706f737369626c6520696e2063757272656e7420737461746500000081525060200191505060405180910390fd5b83600060146101000a81548160ff0219169083600681111561074c57fe5b02179055506000601c9054906101000a900463ffffffff1663ffffffff167fe7de74fd1ad718b483308a5273001cf8684c179eae963b126418f105a320374c858585856040518085600681111561079f57fe5b81526020018467ffffffffffffffff168152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060405180910390a26107fc6003611de1565b50505050565b6000601c9054906101000a900463ffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806121e16022913960400191505060405180910390fd5b600060048111156108c957fe5b600060159054906101000a900460ff1660048111156108e457fe5b14610957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420706f737369626c6520696e2063757272656e7420737461746500000081525060200191505060405180910390fd5b8060028190555050565b600060048081111561096f57fe5b600060159054906101000a900460ff16600481111561098a57fe5b146109e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612259602e913960400191505060405180910390fd5b60005b600760ff168160ff161015610a4b57610a2f6003600080601c9054906101000a900463ffffffff16600760ff16028460ff160163ffffffff168152602001908152602001600020611e6b565b915060008214610a3e57610a4b565b80806001019150506109e3565b50600480811115610a5857fe5b600060159054906101000a900460ff166004811115610a7357fe5b14610a7a57fe5b6000811415610a8e57610a8d6000611de1565b5b90565b600781565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b3a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806121e16022913960400191505060405180910390fd5b60006004811115610b4757fe5b600060159054906101000a900460ff166004811115610b6257fe5b14610bd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420706f737369626c6520696e2063757272656e7420737461746500000081525060200191505060405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b600060159054906101000a900460ff1681565b60025481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806121e16022913960400191505060405180910390fd5b60006004811115610cd857fe5b600060159054906101000a900460ff166004811115610cf357fe5b14610d66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420706f737369626c6520696e2063757272656e7420737461746500000081525060200191505060405180910390fd5b600160070260ff16341015610de3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f506f7473206d757374206e6f74206861766520616d6f756e742030000000000081525060200191505060405180910390fd5b600080601c9054906101000a900463ffffffff16600760ff160263ffffffff16905060036000806006811115610e1557fe5b60ff1683018152602001908152602001600020600080820160009055600182016000610e4191906121a2565b50506003600060016006811115610e5457fe5b60ff1683018152602001908152602001600020600080820160009055600182016000610e8091906121a2565b50506003600060026006811115610e9357fe5b60ff1683018152602001908152602001600020600080820160009055600182016000610ebf91906121a2565b50506003600060036006811115610ed257fe5b60ff1683018152602001908152602001600020600080820160009055600182016000610efe91906121a2565b50506003600060046006811115610f1157fe5b60ff1683018152602001908152602001600020600080820160009055600182016000610f3d91906121a2565b50506003600060056006811115610f5057fe5b60ff1683018152602001908152602001600020600080820160009055600182016000610f7c91906121a2565b505060036000600680811115610f8e57fe5b60ff1683018152602001908152602001600020600080820160009055600182016000610fba91906121a2565b5050610fc5346120ac565b600760ff16810190506000600760ff163481610fdd57fe5b04905060005b600760ff168160ff16101561101f5781600360008360ff1686018152602001908152602001600020600001819055508080600101915050610fe3565b5061102a6001611de1565b5050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060169054906101000a900461ffff1681565b60006003600481111561107557fe5b600060159054906101000a900460ff16600481111561109057fe5b14611103576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4e6f7420706f737369626c6520696e2063757272656e742073746174652e000081525060200191505060405180910390fd5b60006003600080601c9054906101000a900463ffffffff16600760ff1602600060149054906101000a900460ff16600681111561113c57fe5b60ff160163ffffffff16815260200190815260200160002090506000805b600760ff168160ff1610156111b3576003600080601c9054906101000a900463ffffffff16600760ff16028360ff160163ffffffff1681526020019081526020016000206000015482019150808060010191505061115a565b50606460508202816111c157fe5b0490506000826000015490506000836001018054905090505b600181106114665760008460010160018303815481106111f657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508460010180548061123057fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055905560008560020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600084828702816112b857fe5b049050818110156112c957816112cb565b805b905060008760020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050156113c8577f6f8cbafd534fcc6114efb4e292ff6d62cca37b9c8fcffa0ee7471a592605a47783826000601c9054906101000a900463ffffffff16604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018263ffffffff168152602001935050505060405180910390a161143e565b7f53b2839775c1c117e8b4751cdc00b39e06bd3a47b5a35e0560cd1f2bd351e7bb83826000601c9054906101000a900463ffffffff16604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018263ffffffff168152602001935050505060405180910390a15b6165905a1161145557600184039750505050611466565b5050508080600190039150506111da565b506003600481111561147457fe5b600060159054906101000a900460ff16600481111561148f57fe5b1461149657fe5b62061a805a11156115a45760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015801561151e573d6000803e3d6000fd5b506000601c9054906101000a900463ffffffff1663ffffffff167faef917873019f18d2088fdf004da61871276452f82cc3deeee9b318e1d50ca7883600060149054906101000a900460ff16846040518084815260200183600681111561158157fe5b8152602001828152602001935050505060405180910390a26115a36000611de1565b5b50505090565b62015180600160009054906101000a900467ffffffffffffffff160167ffffffffffffffff164211611627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806122036028913960400191505060405180910390fd5b6001600481111561163457fe5b600060159054906101000a900460ff16600481111561164f57fe5b148061168057506002600481111561166357fe5b600060159054906101000a900460ff16600481111561167e57fe5b145b6116f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4e6f7420706f737369626c6520696e2063757272656e742073746174652e000081525060200191505060405180910390fd5b6116fc6004611de1565b565b600060149054906101000a900460ff1681565b600060189054906101000a900463ffffffff1681565b600160009054906101000a900467ffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146117e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806121e16022913960400191505060405180910390fd5b600160048111156117f257fe5b600060159054906101000a900460ff16600481111561180d57fe5b14611880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420706f737369626c6520696e2063757272656e7420737461746500000081525060200191505060405180910390fd5b7fe59ca512a06d1c6d96ff3d7055aef5fb2b5e3d3f7db117abd4378752824a661481604051808263ffffffff16815260200191505060405180910390a180600060188282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff160217905550600060169054906101000a900461ffff1661ffff16600a600060189054906101000a900463ffffffff1663ffffffff168161192a57fe5b0463ffffffff1610611986576119406002611de1565b6000601c9054906101000a900463ffffffff1663ffffffff167fcf6e0eb1e98aa9420ae4720d6cc12f6c61b9f70a2adb81788a8d44fee0eaa65c60405160405180910390a25b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806121e16022913960400191505060405180910390fd5b60006004811115611a3a57fe5b600060159054906101000a900460ff166004811115611a5557fe5b14611ac8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420706f737369626c6520696e2063757272656e7420737461746500000081525060200191505060405180910390fd5b80600060166101000a81548161ffff021916908361ffff16021790555050565b60016004811115611af557fe5b600060159054906101000a900460ff166004811115611b1057fe5b14611b66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180612287603a913960400191505060405180910390fd5b8063ffffffff166000601c9054906101000a900463ffffffff1663ffffffff1614611bdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061222b602e913960400191505060405180910390fd5b600254341015611c37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260418152602001806122c16041913960600191505060405180910390fd5b600033905060006003600080601c9054906101000a900463ffffffff16600760ff1602866006811115611c6657fe5b60ff160163ffffffff168152602001908152602001600020905060008160020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611d305780600101829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b348160020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503481600001600082825401925050819055507f584931d8ec98aead950a2f66c75114204c8f60478caaaefc6c381c28cbb8f43f843460405180836006811115611dc457fe5b81526020018281526020019250505060405180910390a150505050565b7fe8a97ea87e4388fa22d496b95a8ed5ced6717f49790318de2b928aaf37a021d8600060159054906101000a900460ff168260405180836004811115611e2357fe5b8152602001826004811115611e3457fe5b81526020019250505060405180910390a180600060156101000a81548160ff02191690836004811115611e6357fe5b021790555050565b600080826001018054905090505b6001811061209c576000836001016001830381548110611e9557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083600101805480611ecf57fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055905560008460020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008560020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015612025577fc77b936abfe9f7a0b660115162ddb07bb0484e4f2bb1aa9229d9d0bd13636afe8282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a161207b565b7faf73b0b217208b61be286bbc37095bce7eb8b9ccf617244c2f0f154e8e04e3ff8282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b6165905a101561208c57505061209c565b5050808060019003915050611e79565b5081600101805490509050919050565b42600160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060016000601c8282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555060008060186101000a81548163ffffffff021916908363ffffffff1602179055506000601c9054906101000a900463ffffffff1663ffffffff167fe73e5d0aab93e65086bb711b2abdb3b3e3cd084561e41faae356cc6f947f0ce2826040518082815260200191505060405180910390a250565b6040518060e00160405280600790602082028036833780820191505090505090565b50805460008255906000526020600020908101906121c091906121c3565b50565b5b808211156121dc5760008160009055506001016121c4565b509056fe4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f6e2e4f6e6c7920706f737369626c6520312064617920616674657220726f756e6420737461727465642e426574732063616e206f6e6c7920626520706c6163656420666f72207468652063757272656e7420726f756e642e4f6e6c7920706f737369626c652061667465722061207375636365737366756c20636c61696d526566756e64282947616d6520686173206e6f74207374617274656420796574206f722061207261636520697320616c726561647920696e2070726f67726573732e596f757220626574206d7573742062652067726561746572207468616e206f7220657175616c20746f20746865206d696e696d756d2062657420616d6f756e742ea26469706673582212207d08c2ca221a9a708c74249c0da2c81ca983a019b601ddd83ba34c5020430ccc64736f6c63430007030033

Deployed ByteCode Sourcemap

400:9223:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8668:228;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4139:339;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;782:23;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1133:188;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7031:560;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;651:33;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1538:156;;;;;;;;;;;;;:::i;:::-;;618:26;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;851:43;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1973:884;;;:::i;:::-;;97:28;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;691:42;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;4534:2060;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6649:374;;;;;;;;;;;;;:::i;:::-;;582:29;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;740:35;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;812:32;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3664:413;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1329:201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2917:739;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;8668:228;8716:28;;:::i;:::-;8761:7;8757:107;683:1;8774:11;;:1;:11;;;8757:107;;;8820:4;:25;8839:5;;;;;;;;;;;683:1;8829:15;;;8825:1;:19;;;8820:25;;;;;;;;;;;;;:32;;;8807:7;8815:1;8807:10;;;;;;;;;;;;:45;;;;;8787:3;;;;;;;8757:107;;;;8668:228;:::o;4139:339::-;243:5;;;;;;;;;;229:19;;:10;:19;;;221:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4276:22:::1;4259:39;;;;;;;;:13;;;;;;;;;;;:39;;;;;;;;;4251:81;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;4362:5;4343:16;;:24;;;;;;;;;;;;;;;;;;;;;;;;4396:5;;;;;;;;;;;4383:46;;;4403:5;4410:8;4420;;4383:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4440:30;4453:16;4440:12;:30::i;:::-;4139:339:::0;;;;:::o;782:23::-;;;;;;;;;;;;;:::o;1133:188::-;243:5;;;;;;;;;;229:19;;:10;:19;;;221:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1230:13:::1;1213:30;;;;;;;;:13;;;;;;;;;;;:30;;;;;;;;;1205:72;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;1307:6;1288:16;:25;;;;1133:188:::0;:::o;7031:560::-;7070:19;7127:15;7110:32;;;;;;;;:13;;;;;;;;;;;:32;;;;;;;;;7102:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7208:7;7204:158;683:1;7221:11;;:1;:11;;;7204:158;;;7270:36;7280:4;:25;7299:5;;;;;;;;;;;683:1;7289:15;;;7285:1;:19;;;7280:25;;;;;;;;;;;;;7270:9;:36::i;:::-;7253:53;;7342:1;7324:14;:19;7320:30;;7345:5;;7320:30;7234:3;;;;;;;7204:158;;;;7396:15;7379:32;;;;;;;;:13;;;;;;;;;;;:32;;;;;;;;;7372:40;;;;7495:1;7477:14;:19;7473:79;;;7513:27;7526:13;7513:12;:27::i;:::-;7473:79;7031:560;:::o;651:33::-;683:1;651:33;:::o;1538:156::-;243:5;;;;;;;;;;229:19;;:10;:19;;;221:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1609:13:::1;1592:30;;;;;;;;:13;;;;;;;;;;;:30;;;;;;;;;1584:72;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;1680:5;::::0;::::1;;;;;;;;1667:19;;;618:26:::0;;;;;;;;;;;;;:::o;851:43::-;;;;:::o;1973:884::-;243:5;;;;;;;;;;229:19;;:10;:19;;;221:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:13:::1;2039:30;;;;;;;;:13;;;;;;;;;;;:30;;;;;;;;;2031:72;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;2145:5;683:1;2135:15;2122:28;;:9;:28;;2114:68;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;2193:11;2217:5:::0;::::1;;;;;;;;;;683:1;2207:15;;;2193:29;;;;2240:4;:31;2260:9:::0;2254:16:::1;;;;;;;;2245:25;;:6;:25;2240:31;;;;;;;;;;;;2233:38:::0;::::1;;;;;;;;;;;;;:::i;:::-;;;2289:4;:33;2309:11;2303:18;;;;;;;;2294:27;;:6;:27;2289:33;;;;;;;;;;;;2282:40:::0;::::1;;;;;;;;;;;;;:::i;:::-;;;2340:4;:32;2360:10;2354:17;;;;;;;;2345:26;;:6;:26;2340:32;;;;;;;;;;;;2333:39:::0;::::1;;;;;;;;;;;;;:::i;:::-;;;2390:4;:34;2410:12;2404:19;;;;;;;;2395:28;;:6;:28;2390:34;;;;;;;;;;;;2383:41:::0;::::1;;;;;;;;;;;;;:::i;:::-;;;2442:4;:33;2462:11;2456:18;;;;;;;;2447:27;;:6;:27;2442:33;;;;;;;;;;;;2435:40:::0;::::1;;;;;;;;;;;;;:::i;:::-;;;2493:4;:34;2513:12;2507:19;;;;;;;;2498:28;;:6;:28;2493:34;;;;;;;;;;;;2486:41:::0;::::1;;;;;;;;;;;;;:::i;:::-;;;2545:4;:33;2565:11;2559:18:::0;::::1;;;;;;;2550:27;;:6;:27;2545:33;;;;;;;;;;;;2538:40:::0;::::1;;;;;;;;;;;;;:::i;:::-;;;2589:24;2603:9;2589:13;:24::i;:::-;683:1;2633:16;;:6;:16;2624:25;;2660:15;683:1;2678:19;;:9;:19;;;;;;2660:37;;2712:7;2708:97;683:1;2725:11;;:1;:11;;;2708:97;;;2783:10;2757:4;:16;2771:1;2762:10;;:6;:10;2757:16;;;;;;;;;;;:23;;:36;;;;2738:3;;;;;;;2708:97;;;;2815:34;2828:20;2815:12;:34::i;:::-;298:1;;1973:884::o:0;97:28::-;;;;;;;;;;;;:::o;691:42::-;;;;;;;;;;;;;:::o;4534:2060::-;4577:19;4634:16;4617:33;;;;;;;;:13;;;;;;;;;;;:33;;;;;;;;;4609:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4696:22;4721:4;:47;4762:5;;;;;;;;;;;683:1;4752:15;;;4732:16;;;;;;;;;;;4726:23;;;;;;;;:41;;;4721:47;;;;;;;;;;;;;4696:72;;4779:22;4820:7;4816:199;683:1;4833:11;;:1;:11;;;4816:199;;;4971:4;:25;4990:5;;;;;;;;;;;683:1;4980:15;;;4976:1;:19;;;4971:25;;;;;;;;;;;;;:32;;;4950:53;;;;4846:3;;;;;;;4816:199;;;;5070:3;5065:2;5045:17;:22;:28;;;;;;5025:48;;5101:21;5125:10;:17;;;5101:41;;5157:6;5166:10;:25;;:32;;;;5157:41;;5153:1016;5205:1;5200;:6;5153:1016;;5228:23;5254:10;:25;;5284:1;5280;:5;5254:32;;;;;;;;;;;;;;;;;;;;;;;;;5228:58;;5301:10;:25;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5347:10;5360;:17;;:26;5378:7;5360:26;;;;;;;;;;;;;;;;5347:39;;5539:11;5581:16;5573:5;5553:17;:25;:44;;;;;;5539:58;;5631:5;5621:6;:15;;:32;;5648:5;5621:32;;;5639:6;5621:32;5612:41;;5749:1;5720:10;:17;;:26;5738:7;5720:26;;;;;;;;;;;;;;;:30;;;;5808:7;:12;;:20;5821:6;5808:20;;;;;;;;;;;;;;;;;;;;;;;5804:234;;;5900:40;5917:7;5926:6;5934:5;;;;;;;;;;;5900:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5804:234;;;5986:36;5999:7;6008:6;6016:5;;;;;;;;;;;5986:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5804:234;6069:5;6057:9;:17;6052:106;;6117:1;6113;:5;6096:22;;6137:5;;;;;6052:106;5153:1016;;;5208:3;;;;;;;;5153:1016;;;;6205:16;6188:33;;;;;;;;:13;;;;;;;;;;;:33;;;;;;;;;6181:41;;;;6248:6;6236:9;:18;6233:322;;;6330:5;;;;;;;;;;:14;;:37;6353:4;6345:21;;;6330:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6399:5;;;;;;;;;;;6387:73;;;6406:17;6425:16;;;;;;;;;;;6443;6387:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6516:27;6529:13;6516:12;:27::i;:::-;6233:322;6565:21;;;4534:2060;:::o;6649:374::-;6735:6;6718:14;;;;;;;;;;;:23;6700:41;;:15;:41;6692:94;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6877:20;6860:37;;;;;;;;:13;;;;;;;;;;;:37;;;;;;;;;:80;;;;6918:22;6901:39;;;;;;;;:13;;;;;;;;;;;:39;;;;;;;;;6860:80;6852:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6986:29;6999:15;6986:12;:29::i;:::-;6649:374::o;582:29::-;;;;;;;;;;;;;:::o;740:35::-;;;;;;;;;;;;;:::o;812:32::-;;;;;;;;;;;;;:::o;3664:413::-;243:5;;;;;;;;;;229:19;;:10;:19;;;221:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3767:20:::1;3750:37;;;;;;;;:13;;;;;;;;;;;:37;;;;;;;;;3742:79;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;3837:23;3848:11;3837:23;;;;;;;;;;;;;;;;;;;;3892:11;3871:17;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3946:21;;;;;;;;;;;3920:47;;3940:2;3920:17;;;;;;;;;;;:22;;;;;;;;:47;;;3916:154;;3984:36;3997:22;3984:12;:36::i;:::-;4052:5;;;;;;;;;;;4040:18;;;;;;;;;;;;3916:154;3664:413:::0;:::o;1329:201::-;243:5;;;;;;;;;;229:19;;:10;:19;;;221:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1434:13:::1;1417:30;;;;;;;;:13;;;;;;;;;;;:30;;;;;;;;;1409:72;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;1516:6;1492:21;;:30;;;;;;;;;;;;;;;;;;1329:201:::0;:::o;2917:739::-;3022:20;3005:37;;;;;;;;:13;;;;;;;;;;;:37;;;;;;;;;2997:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3133:9;3124:18;;:5;;;;;;;;;;;:18;;;3116:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3225:16;;3212:9;:29;;3204:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3322:23;3348:10;3322:36;;3369:15;3387:4;:39;3420:5;;;;;;;;;;;683:1;3410:15;;;3398:8;3392:15;;;;;;;;:33;;;3387:39;;;;;;;;;;;;;3369:57;;3464:1;3441:3;:10;;:19;3452:7;3441:19;;;;;;;;;;;;;;;;:24;3437:89;;;3482:3;:18;;3506:7;3482:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3437:89;3559:9;3536:3;:10;;:19;3547:7;3536:19;;;;;;;;;;;;;;;;:32;;;;;;;;;;;3593:9;3579:3;:10;;;:23;;;;;;;;;;;3618:30;3628:8;3638:9;3618:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2917:739;;;;:::o;8473:139::-;8534:37;8547:13;;;;;;;;;;;8562:8;8534:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8596:8;8580:13;;:24;;;;;;;;;;;;;;;;;;;;;;;;8473:139;:::o;7599:816::-;7653:19;7689:6;7698:3;:18;;:25;;;;7689:34;;7685:680;7730:1;7725;:6;7685:680;;7753:23;7779:3;:18;;7802:1;7798;:5;7779:25;;;;;;;;;;;;;;;;;;;;;;;;;7753:51;;7819:3;:18;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7858:11;7872:3;:10;;:19;7883:7;7872:19;;;;;;;;;;;;;;;;7858:33;;7928:1;7906:3;:10;;:19;7917:7;7906:19;;;;;;;;;;;;;;;:23;;;;7948:7;:12;;:20;7961:6;7948:20;;;;;;;;;;;;;;;;;;;;;;;7944:220;;;8040:33;8057:7;8066:6;8040:33;;;;;;;;;;;;;;;;;;;;;;;;;;7944:220;;;8119:29;8132:7;8141:6;8119:29;;;;;;;;;;;;;;;;;;;;;;;;;;7944:220;8193:5;8181:9;:17;8178:176;;;8333:5;;;;8178:176;7685:680;;7733:3;;;;;;;;7685:680;;;;8382:3;:18;;:25;;;;8375:32;;7599:816;;;:::o;1702:263::-;1786:15;1762:14;;:40;;;;;;;;;;;;;;;;;;1877:1;1868:5;;:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1909:1;1889:17;;:21;;;;;;;;;;;;;;;;;;1939:5;;;;;;;;;;;1926:31;;;1946:10;1926:31;;;;;;;;;;;;;;;;;;1702:263;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

ipfs://7d08c2ca221a9a708c74249c0da2c81ca983a019b601ddd83ba34c5020430ccc
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

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.