POL Price: $0.218314 (-0.00%)
Gas: 30 GWei
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Upload Races341587692022-10-10 7:04:22926 days ago1665385462IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Upload Races341587672022-10-10 7:04:18926 days ago1665385458IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Upload Races341587652022-10-10 7:04:14926 days ago1665385454IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Upload Races341587632022-10-10 7:04:10926 days ago1665385450IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Upload Races341587612022-10-10 7:04:06926 days ago1665385446IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Upload Races341587592022-10-10 7:04:02926 days ago1665385442IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Upload Races341587572022-10-10 7:03:58926 days ago1665385438IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Upload Races341587552022-10-10 7:03:54926 days ago1665385434IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Upload Races341587532022-10-10 7:03:50926 days ago1665385430IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Upload Races341587502022-10-10 7:03:44926 days ago1665385424IN
0x42eCD7C4...4a98a4f67
0 POL0.0079241933.00000002
Perform Upkeep339189032022-10-04 11:49:46931 days ago1664884186IN
0x42eCD7C4...4a98a4f67
0 POL0.0007834830.00000001
Join Race337220052022-09-29 17:53:49936 days ago1664474029IN
0x42eCD7C4...4a98a4f67
0 POL0.0068849241.00000002
Join Race337172982022-09-29 15:04:20936 days ago1664463860IN
0x42eCD7C4...4a98a4f67
0 POL0.011678569.55091089
Join Race337158172022-09-29 14:11:17936 days ago1664460677IN
0x42eCD7C4...4a98a4f67
0 POL0.0082516149.13868508
Join Race337153432022-09-29 13:51:47936 days ago1664459507IN
0x42eCD7C4...4a98a4f67
0 POL0.0050383430.00355088
Join Race337153152022-09-29 13:50:47936 days ago1664459447IN
0x42eCD7C4...4a98a4f67
0 POL0.0042830147.00156172
Join Race337152972022-09-29 13:50:11936 days ago1664459411IN
0x42eCD7C4...4a98a4f67
0 POL0.0050702630.19360268
Join Race337152592022-09-29 13:48:51936 days ago1664459331IN
0x42eCD7C4...4a98a4f67
0 POL0.0077246646.00066359
Join Race337152382022-09-29 13:48:09936 days ago1664459289IN
0x42eCD7C4...4a98a4f67
0 POL0.0068849641.00026259
Join Race337151142022-09-29 13:43:53936 days ago1664459033IN
0x42eCD7C4...4a98a4f67
0 POL0.007388744.0000087
Join Race337151092022-09-29 13:43:43936 days ago1664459023IN
0x42eCD7C4...4a98a4f67
0 POL0.0099075759.00000547
Join Race337150592022-09-29 13:41:59936 days ago1664458919IN
0x42eCD7C4...4a98a4f67
0 POL0.01343480.00000142
Add Race337150042022-09-29 13:40:05936 days ago1664458805IN
0x42eCD7C4...4a98a4f67
0 POL0.0059769550.00000016
Add Race337150042022-09-29 13:40:05936 days ago1664458805IN
0x42eCD7C4...4a98a4f67
0 POL0.0059769550.00000016
Add Race337150042022-09-29 13:40:05936 days ago1664458805IN
0x42eCD7C4...4a98a4f67
0 POL0.0059769550.00000016
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WofRacingContract

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : racingContract.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

// Chainlink VRF
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@chainlink/contracts/src/v0.8/KeeperCompatible.sol";

interface IWofToken {
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external;

    function transfer(address to, uint256 amount) external;

    function allowance(address owner, address spender)
        external
        returns (uint256);
}

contract WofRacingContract is VRFConsumerBaseV2, KeeperCompatibleInterface {
    //CHAINLINK VRF
    VRFCoordinatorV2Interface COORDINATOR;
    address vrfCoordinator = 0xAE975071Be8F8eE67addBC1A82488F1C24858067;
    //MAINNET - 0xAE975071Be8F8eE67addBC1A82488F1C24858067

    bytes32 keyHash =
        0xcc294a196eeeb44da2888d17c0625cc88d70d9760a69d58d853ba6581a9ab0cd;
    //MAINNET - 0xcc294a196eeeb44da2888d17c0625cc88d70d9760a69d58d853ba6581a9ab0cd

    uint64 s_subscriptionId;
    uint256[] public s_randomWords;
    uint256 public s_requestId;
    uint16 requestConfirmations = 3;
    uint32 callbackGasLimit = 1000000;

    //CHAINLINK KEEPERS
    uint256 public interval;
    uint256 public lastTimeStamp;

    //CONTRACT VARIABLES
    address public owner;
    address public garageContract;
    uint256 public MAX_PARTICIPANTS = 12;

    //INTERFACES
    IWofToken public wofToken;

    //EVENTS
    event JoinRace(
        uint256 raceID,
        address racer,
        uint256 token_id,
        uint256 seed,
        uint256 punkID
    );
    event LeaveRace(
        uint256 raceID,
        address racer,
        uint256 token_id,
        uint256 punkID
    );

    event SeedsGenerated(uint256 raceID);

    event PayOut(address racer, uint256 amount);

    constructor(
        uint64 subscriptionId,
        uint256 updateInterval,
        address _wofTokenAddress,
        address _garageContract
    ) VRFConsumerBaseV2(vrfCoordinator) {
        COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);
        owner = msg.sender;
        s_subscriptionId = subscriptionId;
        interval = updateInterval;
        lastTimeStamp = block.timestamp;
        wofToken = IWofToken(_wofTokenAddress);
        garageContract = _garageContract;
    }

    //DATA STRUCTURES
    /* ----- VRF MAP ----- */
    mapping(uint256 => uint256) public vrf_requests;

    /* ----- RACE STRUCT ----- */
    mapping(uint256 => Race) public races;
    struct Race {
        uint256 prizePool;
        uint256 entranceFee;
        mapping(uint256 => Participant) participants;
        bool finished;
        uint256 participant_count;
        uint256[] seeds;
    }
    struct Participant {
        address user;
        uint256 punkID;
        uint256 entranceFee;
        uint256 seed;
        uint256 place;
    }

    /* ----- FREE RACE CLAIMS ----- */
    address[] public unclaimedAddresses;
    mapping(address => uint256) public claimableRewards;

    /* ----- TOKEN STATS ----- */
    struct TokenStats {
        uint256 racesJoined;
        uint256 firstPlaces;
        uint256 secondPlaces;
        uint256 thirdPlaces;
        uint256 tokensWon;
    }
    mapping(uint256 => TokenStats) public tokenStats;
    mapping(uint256 => bool) public tokenInrace;

    /* ----- FREIGHT PUNK STATS STATS ----- */
    mapping(uint256 => TokenStats) public freightPunkStats;
    mapping(uint256 => bool) public punkInRace;

    /* ----- CONTESTANT STRUCT ----- */
    struct Contestants {
        address racer;
        uint256 tokenID;
        uint256 punkID;
        uint256 place;
    }

    /* ----- KEEPERS AND VRF FNC ----- */
    function checkUpkeep(bytes calldata)
        external
        view
        override
        returns (bool upkeepNeeded, bytes memory)
    {
        upkeepNeeded = (block.timestamp - lastTimeStamp) > interval;
    }

    //PAY OUT THE REWARDS
    function performUpkeep(bytes calldata) external override {
        if ((block.timestamp - lastTimeStamp) > interval) {
            lastTimeStamp = block.timestamp;
            payOut();
        }
    }

    function requestRandomWords(uint32 numWords, uint256 raceID) internal {
        uint256 requestId = COORDINATOR.requestRandomWords(
            keyHash,
            s_subscriptionId,
            requestConfirmations,
            callbackGasLimit,
            numWords
        );
        vrf_requests[requestId] = raceID;
    }

    function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords)
        internal
        override
    {
        uint256 raceID = vrf_requests[requestId];
        races[raceID].seeds = randomWords;
        emit SeedsGenerated(raceID);
    }

    /* ----- RACE FNC ----- */
    function addRace(
        uint256 _raceID,
        uint256 _entranceFee,
        uint256 _prizePool
    ) public {
        races[_raceID].entranceFee = _entranceFee;
        races[_raceID].finished = false;
        if (_entranceFee == 0) {
            races[_raceID].prizePool = _prizePool;
        }
        requestRandomWords(12, _raceID);
    }

    function unJoinRace(
        uint256 _raceID,
        address _user,
        uint256 _tokenID,
        uint256 _punkID
    ) public {
        require(
            races[_raceID].participants[_tokenID].user == msg.sender,
            "Can not unjoin other people"
        );

        tokenInrace[_tokenID] == false;

        //DECREMENT THE RACE
        delete races[_raceID].participants[_tokenID];
        //TRANSFER TOKENS BACK TO USER
        uint256 entranceFee = races[_raceID].entranceFee;
        wofToken.transfer(_user, entranceFee);
        //DECREMENT RACERS COUNT
        races[_raceID].participant_count = races[_raceID].participant_count - 1;
        //DECREMENT PRIZE POOL
        races[_raceID].prizePool = races[_raceID].prizePool - entranceFee;
        emit LeaveRace(_raceID, _user, _tokenID, _punkID);
    }

    function joinRace(
        uint256 _raceID,
        address _user,
        uint256 _tokenID,
        uint256 _entranceFee,
        uint256 _punkID
    ) public {
        uint256 raceParticipants = races[_raceID].participant_count;
        require(_user == msg.sender, "Can only join with your address");
        require(tokenInrace[_tokenID] != true, "Token already racing");
        require(
            wofToken.allowance(_user, address(this)) > _entranceFee,
            "Entrance Fee exceeds allowance"
        );
        require(
            _entranceFee >= races[_raceID].entranceFee,
            "Entrance fee higher than sent"
        );

        require(
            raceParticipants <= MAX_PARTICIPANTS,
            "Max number of racers already registered"
        );
        require(races[_raceID].seeds.length > 0, "Seeds not yet generated");
        //GET SEED
        uint256 seed = races[_raceID].seeds[raceParticipants];
        //APPEND TOKEN STATS
        tokenInrace[_tokenID] == true;

        //JOIN THE RACE
        races[_raceID].participants[_tokenID] = Participant({
            user: _user,
            punkID: _punkID,
            entranceFee: _entranceFee,
            seed: seed,
            place: 0
        });
        //TRANSFER TOKENS TO CONTRACT
        wofToken.transferFrom(_user, address(this), _entranceFee);

        //APPEND RACERS COUNT
        races[_raceID].participant_count = raceParticipants + 1;
        //APPEND PRIZE POOL
        races[_raceID].prizePool = races[_raceID].prizePool + _entranceFee;
        emit JoinRace(_raceID, _user, _tokenID, seed, _punkID);
    }

    function uploadRaces(uint256 _raceID, Contestants[] memory _results)
        public
    {
        uint256 prizePool = races[_raceID].prizePool;
        uint256 entranceFee = races[_raceID].entranceFee;

        for (uint256 i = 0; i < _results.length; i++) {
            uint256 reward = 0;
            if (
                entranceFee == 0 ||
                isTokenInRace(_raceID, _results[i].tokenID) == true
            ) {
                //UNJOIN TOKEN FROM THE RACE
                tokenInrace[_results[i].tokenID] = false;
                if (_results[i].punkID > 0) {
                    punkInRace[_results[i].punkID] = false;
                }

                tokenStats[_results[i].tokenID].racesJoined =
                    tokenStats[_results[i].tokenID].racesJoined +
                    1;

                //APPEND PUNK STATS
                if (_results[i].punkID > 0) {
                    punkInRace[_results[i].punkID] == true;
                    freightPunkStats[_results[i].punkID].racesJoined =
                        freightPunkStats[_results[i].punkID].racesJoined +
                        1;
                }

                //ASSIGN PLACES
                if (_results[i].place == 1) {
                    //APPEND STATS
                    tokenStats[_results[i].tokenID].firstPlaces =
                        tokenStats[_results[i].tokenID].firstPlaces +
                        1;

                    if (_results[i].punkID != 0) {
                        freightPunkStats[_results[i].punkID].firstPlaces =
                            freightPunkStats[_results[i].punkID].firstPlaces +
                            1;
                    }

                    reward = getRewardAmount(prizePool, _results[i].place);
                }
                if (_results[i].place == 2) {
                    //APPEND STATS

                    tokenStats[_results[i].tokenID].secondPlaces =
                        tokenStats[_results[i].tokenID].secondPlaces +
                        1;

                    if (_results[i].punkID != 0) {
                        freightPunkStats[_results[i].punkID].secondPlaces =
                            freightPunkStats[_results[i].punkID].secondPlaces +
                            1;
                    }

                    reward = getRewardAmount(prizePool, _results[i].place);
                }
                if (_results[i].place == 3) {
                    //APPEND STATS

                    tokenStats[_results[i].tokenID].thirdPlaces =
                        tokenStats[_results[i].tokenID].thirdPlaces +
                        1;

                    if (_results[i].punkID != 0) {
                        freightPunkStats[_results[i].punkID].thirdPlaces =
                            freightPunkStats[_results[i].punkID].thirdPlaces +
                            1;
                    }
                    reward = getRewardAmount(prizePool, _results[i].place);
                }
            }
            if (reward > 0) {
                // PAY OUT RACES WHERE ENTRANCE FEE IS NOT 0
                if (races[_raceID].entranceFee != 0) {
                    wofToken.transfer(_results[i].racer, reward);
                } else {
                    if (claimableRewards[_results[i].racer] == 0) {
                        unclaimedAddresses.push(_results[i].racer);
                    }
                    claimableRewards[_results[i].racer] =
                        claimableRewards[_results[i].racer] +
                        reward;
                }
            }
        }
    }

    /* ----- HELPER FNC ----- */

    function setSubscriptionID(uint64 _id) public {
        require(msg.sender == owner, "Not the owner");
        s_subscriptionId = _id;
    }

    function isTokenInRace(uint256 raceID, uint256 tokenID)
        public
        view
        returns (bool)
    {
        address racerAddress = races[raceID].participants[tokenID].user;
        if (racerAddress == address(0)) {
            return false;
        }
        return true;
    }

    function getParticipant(uint256 _raceID, uint256 tokenID)
        public
        view
        returns (Participant memory)
    {
        return races[_raceID].participants[tokenID];
    }

    function getRewardAmount(uint256 prizePool, uint256 place)
        internal
        pure
        returns (uint256)
    {
        if (place == 1) {
            return (prizePool * 60) / 100;
        }
        if (place == 2) {
            return (prizePool * 25) / 100;
        }
        if (place == 3) {
            return (prizePool * 15) / 100;
        }
        return 0;
    }

    function payOut() internal {
        if (unclaimedAddresses.length > 0) {
            for (uint256 i = 0; i < unclaimedAddresses.length; i++) {
                address userAddress = unclaimedAddresses[i];
                uint256 payout = claimableRewards[userAddress];
                if (payout > 0) {
                    claimableRewards[userAddress] = 0;
                    wofToken.transferFrom(garageContract, userAddress, payout);
                    emit PayOut(userAddress, payout);
                }
            }
            delete unclaimedAddresses;
        }
    }

    /* ----- MANAGEMENT FNC ----- */
    function setOwner(address _address) public {
        require(msg.sender == owner, "Not the owner");
        owner = _address;
    }

    function setTokenContract(address _address) public {
        require(msg.sender == owner, "Not the owner");
        wofToken = IWofToken(_address);
    }

    function setGarageContract(address _address) public {
        require(msg.sender == owner, "Not the owner");
        garageContract = _address;
    }

    //WIDTHRAW WOF TOKENS
    function withdraw(address _to, uint256 _amount) public {
        require(msg.sender == owner, "Not the owner");
        wofToken.transfer(_to, _amount);
    }

    //SET MAX PARTICIPANTS
    function setMaxParticipants(uint256 _amount) public {
        require(msg.sender == owner, "Not the owner");
        MAX_PARTICIPANTS = _amount;
    }

    //CHANGE KEEPERS INTERVAL
    function setInterval(uint256 updateInterval) public {
        require(msg.sender == owner, "Not the owner");
        interval = updateInterval;
    }

    // ADD INITIAL DATA
    struct TkStats {
        uint256 id;
        uint256 firstPlaces;
        uint256 secondPlaces;
        uint256 thirdPlaces;
        uint256 racesJoined;
    }

    bool public canUplaod = true;

    function disableUploadStats() public {
        require(msg.sender == owner, "Not the owner");
        canUplaod = false;
    }

    function uploadInitialStats(TkStats[] memory _arr) public {
        require(msg.sender == owner, "Not the owner");
        require(canUplaod, "Uploading is disabled");
        for (uint256 i = 0; i < _arr.length; i++) {
            tokenStats[_arr[i].id].racesJoined = _arr[i].racesJoined;
            tokenStats[_arr[i].id].firstPlaces = _arr[i].firstPlaces;
            tokenStats[_arr[i].id].secondPlaces = _arr[i].secondPlaces;
            tokenStats[_arr[i].id].thirdPlaces = _arr[i].thirdPlaces;
        }
    }

    function uploadPunkStats(TkStats[] memory _arr) public {
        require(msg.sender == owner, "Not the owner");
        require(canUplaod, "Uploading is disabled");
        for (uint256 i = 0; i < _arr.length; i++) {
            freightPunkStats[_arr[i].id].racesJoined = _arr[i].racesJoined;
            freightPunkStats[_arr[i].id].firstPlaces = _arr[i].firstPlaces;
            freightPunkStats[_arr[i].id].secondPlaces = _arr[i].secondPlaces;
            freightPunkStats[_arr[i].id].thirdPlaces = _arr[i].thirdPlaces;
        }
    }
}

File 2 of 7 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 3 of 7 : VRFCoordinatorV2Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;
}

File 4 of 7 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

File 5 of 7 : KeeperCompatible.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./KeeperBase.sol";
import "./interfaces/KeeperCompatibleInterface.sol";

abstract contract KeeperCompatible is KeeperBase, KeeperCompatibleInterface {}

File 6 of 7 : KeeperBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract KeeperBase {
  error OnlySimulatedBackend();

  /**
   * @notice method that allows it to be simulated via eth_call by checking that
   * the sender is the zero address.
   */
  function preventExecution() internal view {
    if (tx.origin != address(0)) {
      revert OnlySimulatedBackend();
    }
  }

  /**
   * @notice modifier that allows it to be simulated via eth_call by checking
   * that the sender is the zero address.
   */
  modifier cannotExecute() {
    preventExecution();
    _;
  }
}

File 7 of 7 : KeeperCompatibleInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface KeeperCompatibleInterface {
  /**
   * @notice method that is simulated by the keepers to see if any work actually
   * needs to be performed. This method does does not actually need to be
   * executable, and since it is only ever simulated it can consume lots of gas.
   * @dev To ensure that it is never called, you may want to add the
   * cannotExecute modifier from KeeperBase to your implementation of this
   * method.
   * @param checkData specified in the upkeep registration so it is always the
   * same for a registered upkeep. This can easily be broken down into specific
   * arguments using `abi.decode`, so multiple upkeeps can be registered on the
   * same contract and easily differentiated by the contract.
   * @return upkeepNeeded boolean to indicate whether the keeper should call
   * performUpkeep or not.
   * @return performData bytes that the keeper should call performUpkeep with, if
   * upkeep is needed. If you would like to encode data to decode later, try
   * `abi.encode`.
   */
  function checkUpkeep(bytes calldata checkData) external returns (bool upkeepNeeded, bytes memory performData);

  /**
   * @notice method that is actually executed by the keepers, via the registry.
   * The data returned by the checkUpkeep simulation will be passed into
   * this method to actually be executed.
   * @dev The input to this method should not be trusted, and the caller of the
   * method should not even be restricted to any single registry. Anyone should
   * be able call it, and the input should be validated, there is no guarantee
   * that the data passed in is the performData returned from checkUpkeep. This
   * could happen due to malicious keepers, racing keepers, or simply a state
   * change while the performUpkeep transaction is waiting for confirmation.
   * Always validate the data passed in.
   * @param performData is the data which was passed back from the checkData
   * simulation. If it is encoded, it can easily be decoded into other types by
   * calling `abi.decode`. This data should not be trusted, and should be
   * validated against the contract's current state.
   */
  function performUpkeep(bytes calldata performData) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"uint256","name":"updateInterval","type":"uint256"},{"internalType":"address","name":"_wofTokenAddress","type":"address"},{"internalType":"address","name":"_garageContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"raceID","type":"uint256"},{"indexed":false,"internalType":"address","name":"racer","type":"address"},{"indexed":false,"internalType":"uint256","name":"token_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"seed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"punkID","type":"uint256"}],"name":"JoinRace","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"raceID","type":"uint256"},{"indexed":false,"internalType":"address","name":"racer","type":"address"},{"indexed":false,"internalType":"uint256","name":"token_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"punkID","type":"uint256"}],"name":"LeaveRace","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"racer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PayOut","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"raceID","type":"uint256"}],"name":"SeedsGenerated","type":"event"},{"inputs":[],"name":"MAX_PARTICIPANTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raceID","type":"uint256"},{"internalType":"uint256","name":"_entranceFee","type":"uint256"},{"internalType":"uint256","name":"_prizePool","type":"uint256"}],"name":"addRace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"canUplaod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimableRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableUploadStats","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"freightPunkStats","outputs":[{"internalType":"uint256","name":"racesJoined","type":"uint256"},{"internalType":"uint256","name":"firstPlaces","type":"uint256"},{"internalType":"uint256","name":"secondPlaces","type":"uint256"},{"internalType":"uint256","name":"thirdPlaces","type":"uint256"},{"internalType":"uint256","name":"tokensWon","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"garageContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raceID","type":"uint256"},{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"getParticipant","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"punkID","type":"uint256"},{"internalType":"uint256","name":"entranceFee","type":"uint256"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"uint256","name":"place","type":"uint256"}],"internalType":"struct WofRacingContract.Participant","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"interval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"raceID","type":"uint256"},{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"isTokenInRace","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raceID","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"uint256","name":"_entranceFee","type":"uint256"},{"internalType":"uint256","name":"_punkID","type":"uint256"}],"name":"joinRace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTimeStamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"performUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"punkInRace","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"races","outputs":[{"internalType":"uint256","name":"prizePool","type":"uint256"},{"internalType":"uint256","name":"entranceFee","type":"uint256"},{"internalType":"bool","name":"finished","type":"bool"},{"internalType":"uint256","name":"participant_count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"s_randomWords","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_requestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setGarageContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"updateInterval","type":"uint256"}],"name":"setInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxParticipants","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_id","type":"uint64"}],"name":"setSubscriptionID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenInrace","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenStats","outputs":[{"internalType":"uint256","name":"racesJoined","type":"uint256"},{"internalType":"uint256","name":"firstPlaces","type":"uint256"},{"internalType":"uint256","name":"secondPlaces","type":"uint256"},{"internalType":"uint256","name":"thirdPlaces","type":"uint256"},{"internalType":"uint256","name":"tokensWon","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raceID","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"uint256","name":"_punkID","type":"uint256"}],"name":"unJoinRace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"unclaimedAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"firstPlaces","type":"uint256"},{"internalType":"uint256","name":"secondPlaces","type":"uint256"},{"internalType":"uint256","name":"thirdPlaces","type":"uint256"},{"internalType":"uint256","name":"racesJoined","type":"uint256"}],"internalType":"struct WofRacingContract.TkStats[]","name":"_arr","type":"tuple[]"}],"name":"uploadInitialStats","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"firstPlaces","type":"uint256"},{"internalType":"uint256","name":"secondPlaces","type":"uint256"},{"internalType":"uint256","name":"thirdPlaces","type":"uint256"},{"internalType":"uint256","name":"racesJoined","type":"uint256"}],"internalType":"struct WofRacingContract.TkStats[]","name":"_arr","type":"tuple[]"}],"name":"uploadPunkStats","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raceID","type":"uint256"},{"components":[{"internalType":"address","name":"racer","type":"address"},{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"punkID","type":"uint256"},{"internalType":"uint256","name":"place","type":"uint256"}],"internalType":"struct WofRacingContract.Contestants[]","name":"_results","type":"tuple[]"}],"name":"uploadRaces","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vrf_requests","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wofToken","outputs":[{"internalType":"contract IWofToken","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a0604052600180546001600160a01b03191673ae975071be8f8ee67addbc1a82488f1c248580671781557fcc294a196eeeb44da2888d17c0625cc88d70d9760a69d58d853ba6581a9ab0cd60025560068054640f4240000365ffffffffffff19909116179055600c600b556015805460ff191690911790553480156200008557600080fd5b506040516200296638038062002966833981016040819052620000a89162000145565b6001546001600160a01b039081166080819052600080546001600160a01b031990811690921790556009805433908316179055600380546001600160401b0319166001600160401b03979097169690961790955560079390935542600855600c8054851692841692909217909155600a80549093169116179055620001a7565b80516001600160a01b03811681146200014057600080fd5b919050565b600080600080608085870312156200015c57600080fd5b84516001600160401b03811681146200017457600080fd5b602086015190945092506200018c6040860162000128565b91506200019c6060860162000128565b905092959194509250565b60805161279c620001ca600039600081816112240152611266015261279c6000f3fe608060405234801561001057600080fd5b506004361061021b5760003560e01c80636ea3d9be11610125578063b859f825116100ad578063e89e106a1161007c578063e89e106a146105b3578063e926ca95146105bc578063f3baf070146105f9578063f3fef3a314610602578063f6eaffc81461061557600080fd5b8063b859f82514610560578063bbcd5bbe14610573578063dc01f60d14610586578063e4341cea146105a657600080fd5b806382689a01116100f457806382689a0114610516578063833a71d7146105295780638da5cb5b14610531578063947a36fb14610544578063987f70ff1461054d57600080fd5b80636ea3d9be1461047c5780637592b77f1461048f5780637673399a146104a25780637bbc469e146104b557600080fd5b80631fe543e3116101a85780632bf7299b116101775780632bf7299b146104095780633f3b3b271461041c5780634585e33b1461042557806352e320a0146104385780636e04ff0d1461045b57600080fd5b80631fe543e31461036b578063212b33f01461037e57806322a90082146103e35780632ac426aa146103f657600080fd5b80630c2e6f18116101ef5780630c2e6f18146102a6578063129927d3146102b957806313af4035146102ec5780631aed59f0146102ff5780631edebf0b1461035857600080fd5b8062f88a661461022057806305bc8c6214610235578063081e8924146102685780630c24348414610293575b600080fd5b61023361022e3660046121ef565b610628565b005b6102556102433660046122d1565b600d6020526000908152604090205481565b6040519081526020015b60405180910390f35b61027b6102763660046122d1565b610e83565b6040516001600160a01b03909116815260200161025f565b6102336102a13660046122ea565b610ead565b6102336102b436600461230c565b610f02565b6102dc6102c73660046122d1565b60146020526000908152604090205460ff1681565b604051901515815260200161025f565b6102336102fa3660046122ea565b6110df565b61031261030d366004612347565b61112b565b60405161025f919081516001600160a01b031681526020808301519082015260408083015190820152606080830151908201526080918201519181019190915260a00190565b610233610366366004612369565b6111cb565b610233610379366004612393565b611219565b6103bb61038c3660046122d1565b601360205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a00161025f565b6102336103f13660046122d1565b6112a1565b610233610404366004612430565b6112d0565b6102336104173660046122d1565b6117c1565b61025560085481565b610233610433366004612476565b6117f0565b6102dc6104463660046122d1565b60126020526000908152604090205460ff1681565b61046e610469366004612476565b611812565b60405161025f9291906124e8565b61023361048a366004612547565b611831565b61023361049d366004612573565b611878565b6102336104b0366004612573565b611a5f565b6104f06104c33660046122d1565b600e6020526000908152604090208054600182015460038301546004909301549192909160ff9091169084565b60408051948552602085019390935290151591830191909152606082015260800161025f565b6102dc610524366004612347565b611c46565b610233611c85565b60095461027b906001600160a01b031681565b61025560075481565b600c5461027b906001600160a01b031681565b600a5461027b906001600160a01b031681565b6102336105813660046122ea565b611cbb565b6102556105943660046122ea565b60106020526000908152604090205481565b6015546102dc9060ff1681565b61025560055481565b6103bb6105ca3660046122d1565b601160205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b610255600b5481565b610233610610366004612645565b611d07565b6102556106233660046122d1565b611d9b565b6000828152600e60205260408120805460019091015490915b8351811015610e7c576000821580610681575061067b8686848151811061066a5761066a61266f565b602002602001015160200151611c46565b15156001145b15610c8c5760006012600087858151811061069e5761069e61266f565b602002602001015160200151815260200190815260200160002060006101000a81548160ff02191690831515021790555060008583815181106106e3576106e361266f565b602002602001015160400151111561073f5760006014600087858151811061070d5761070d61266f565b602002602001015160400151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601160008684815181106107555761075561266f565b602002602001015160200151815260200190815260200160002060000154600161077f919061269b565b601160008785815181106107955761079561266f565b60200260200101516020015181526020019081526020016000206000018190555060008583815181106107ca576107ca61266f565b602002602001015160400151111561088257601460008684815181106107f2576107f261266f565b602090810291909101810151604001518252015284516013906000908790859081106108205761082061266f565b602002602001015160400151815260200190815260200160002060000154600161084a919061269b565b601360008785815181106108605761086061266f565b6020026020010151604001518152602001908152602001600020600001819055505b8482815181106108945761089461266f565b602002602001015160600151600114156109e657601160008684815181106108be576108be61266f565b60200260200101516020015181526020019081526020016000206001015460016108e8919061269b565b601160008785815181106108fe576108fe61266f565b6020026020010151602001518152602001908152602001600020600101819055508482815181106109315761093161266f565b6020026020010151604001516000146109bc576013600086848151811061095a5761095a61266f565b6020026020010151604001518152602001908152602001600020600101546001610984919061269b565b6013600087858151811061099a5761099a61266f565b6020026020010151604001518152602001908152602001600020600101819055505b6109e3848684815181106109d2576109d261266f565b602002602001015160600151611dbc565b90505b8482815181106109f8576109f861266f565b60200260200101516060015160021415610b395760116000868481518110610a2257610a2261266f565b6020026020010151602001518152602001908152602001600020600201546001610a4c919061269b565b60116000878581518110610a6257610a6261266f565b602002602001015160200151815260200190815260200160002060020181905550848281518110610a9557610a9561266f565b602002602001015160400151600014610b205760136000868481518110610abe57610abe61266f565b6020026020010151604001518152602001908152602001600020600201546001610ae8919061269b565b60136000878581518110610afe57610afe61266f565b6020026020010151604001518152602001908152602001600020600201819055505b610b36848684815181106109d2576109d261266f565b90505b848281518110610b4b57610b4b61266f565b60200260200101516060015160031415610c8c5760116000868481518110610b7557610b7561266f565b6020026020010151602001518152602001908152602001600020600301546001610b9f919061269b565b60116000878581518110610bb557610bb561266f565b602002602001015160200151815260200190815260200160002060030181905550848281518110610be857610be861266f565b602002602001015160400151600014610c735760136000868481518110610c1157610c1161266f565b6020026020010151604001518152602001908152602001600020600301546001610c3b919061269b565b60136000878581518110610c5157610c5161266f565b6020026020010151604001518152602001908152602001600020600301819055505b610c89848684815181106109d2576109d261266f565b90505b8015610e69576000868152600e602052604090206001015415610d4357600c5485516001600160a01b039091169063a9059cbb90879085908110610cd257610cd261266f565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015610d2657600080fd5b505af1158015610d3a573d6000803e3d6000fd5b50505050610e69565b60106000868481518110610d5957610d5961266f565b6020026020010151600001516001600160a01b03166001600160a01b031681526020019081526020016000205460001415610ddf57600f858381518110610da257610da261266f565b6020908102919091018101515182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b8060106000878581518110610df657610df661266f565b6020026020010151600001516001600160a01b03166001600160a01b0316815260200190815260200160002054610e2d919061269b565b60106000878581518110610e4357610e4361266f565b602090810291909101810151516001600160a01b03168252810191909152604001600020555b5080610e74816126b3565b915050610641565b5050505050565b600f8181548110610e9357600080fd5b6000918252602090912001546001600160a01b0316905081565b6009546001600160a01b03163314610ee05760405162461bcd60e51b8152600401610ed7906126ce565b60405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000848152600e602090815260408083208584526002019091529020546001600160a01b03163314610f765760405162461bcd60e51b815260206004820152601b60248201527f43616e206e6f7420756e6a6f696e206f746865722070656f706c6500000000006044820152606401610ed7565b6000848152600e602081815260408084208685526002808201845282862080546001600160a01b03191681556001808201889055918101879055600381018790556004908101879055958a905293909252910154600c54915163a9059cbb60e01b81526001600160a01b03878116948201949094526024810182905290929091169063a9059cbb90604401600060405180830381600087803b15801561101b57600080fd5b505af115801561102f573d6000803e3d6000fd5b5050506000868152600e602052604090206004015461105191506001906126f5565b6000868152600e602052604090206004810191909155546110739082906126f5565b6000868152600e60209081526040918290209290925580518781526001600160a01b038716928101929092528101849052606081018390527f486610e7950cc18b99f2e96078158edbdb0a971f7520894f5428b07ca8f6d1a69060800160405180910390a15050505050565b6009546001600160a01b031633146111095760405162461bcd60e51b8152600401610ed7906126ce565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6111666040518060a0016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081525090565b506000828152600e602090815260408083208484526002908101835292819020815160a08101835281546001600160a01b0316815260018201549381019390935292830154908201526003820154606082015260049091015460808201525b92915050565b6009546001600160a01b031633146111f55760405162461bcd60e51b8152600401610ed7906126ce565b6003805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112935760405163073e64fd60e21b81523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610ed7565b61129d8282611e1a565b5050565b6009546001600160a01b031633146112cb5760405162461bcd60e51b8152600401610ed7906126ce565b600755565b6000858152600e60205260409020600401546001600160a01b038516331461133a5760405162461bcd60e51b815260206004820152601f60248201527f43616e206f6e6c79206a6f696e207769746820796f75722061646472657373006044820152606401610ed7565b60008481526012602052604090205460ff161515600114156113955760405162461bcd60e51b8152602060048201526014602482015273546f6b656e20616c726561647920726163696e6760601b6044820152606401610ed7565b600c54604051636eb1769f60e11b81526001600160a01b0387811660048301523060248301528592169063dd62ed3e90604401602060405180830381600087803b1580156113e257600080fd5b505af11580156113f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141a919061270c565b116114675760405162461bcd60e51b815260206004820152601e60248201527f456e7472616e636520466565206578636565647320616c6c6f77616e636500006044820152606401610ed7565b6000868152600e60205260409020600101548310156114c85760405162461bcd60e51b815260206004820152601d60248201527f456e7472616e63652066656520686967686572207468616e2073656e740000006044820152606401610ed7565b600b5481111561152a5760405162461bcd60e51b815260206004820152602760248201527f4d6178206e756d626572206f662072616365727320616c7265616479207265676044820152661a5cdd195c995960ca1b6064820152608401610ed7565b6000868152600e60205260409020600501546115885760405162461bcd60e51b815260206004820152601760248201527f5365656473206e6f74207965742067656e6572617465640000000000000000006044820152606401610ed7565b6000868152600e602052604081206005018054839081106115ab576115ab61266f565b906000526020600020015490506012600086815260200190815260200160002060009054906101000a9050506040518060a00160405280876001600160a01b031681526020018481526020018581526020018281526020016000815250600e6000898152602001908152602001600020600201600087815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010155604082015181600201556060820151816003015560808201518160040155905050600c60009054906101000a90046001600160a01b03166001600160a01b03166323b872dd8730876040518463ffffffff1660e01b81526004016116eb939291906001600160a01b039384168152919092166020820152604081019190915260600190565b600060405180830381600087803b15801561170557600080fd5b505af1158015611719573d6000803e3d6000fd5b5050505081600161172a919061269b565b6000888152600e6020526040902060048101919091555461174c90859061269b565b6000888152600e60209081526040918290209290925580518981526001600160a01b03891692810192909252810186905260608101829052608081018490527f1ef856f4f131645a54a362971767b14b39411c3662c4e779eaccb99998432f609060a00160405180910390a150505050505050565b6009546001600160a01b031633146117eb5760405162461bcd60e51b8152600401610ed7906126ce565b600b55565b60075460085461180090426126f5565b111561129d574260085561129d611e82565b600060606007546008544261182791906126f5565b1191509250929050565b6000838152600e6020526040902060018101839055600301805460ff1916905581611868576000838152600e602052604090208190555b611873600c84611fc7565b505050565b6009546001600160a01b031633146118a25760405162461bcd60e51b8152600401610ed7906126ce565b60155460ff166118ec5760405162461bcd60e51b8152602060048201526015602482015274155c1b1bd8591a5b99c81a5cc8191a5cd8589b1959605a1b6044820152606401610ed7565b60005b815181101561129d5781818151811061190a5761190a61266f565b6020026020010151608001516011600084848151811061192c5761192c61266f565b60200260200101516000015181526020019081526020016000206000018190555081818151811061195f5761195f61266f565b602002602001015160200151601160008484815181106119815761198161266f565b6020026020010151600001518152602001908152602001600020600101819055508181815181106119b4576119b461266f565b602002602001015160400151601160008484815181106119d6576119d661266f565b602002602001015160000151815260200190815260200160002060020181905550818181518110611a0957611a0961266f565b60200260200101516060015160116000848481518110611a2b57611a2b61266f565b6020026020010151600001518152602001908152602001600020600301819055508080611a57906126b3565b9150506118ef565b6009546001600160a01b03163314611a895760405162461bcd60e51b8152600401610ed7906126ce565b60155460ff16611ad35760405162461bcd60e51b8152602060048201526015602482015274155c1b1bd8591a5b99c81a5cc8191a5cd8589b1959605a1b6044820152606401610ed7565b60005b815181101561129d57818181518110611af157611af161266f565b60200260200101516080015160136000848481518110611b1357611b1361266f565b602002602001015160000151815260200190815260200160002060000181905550818181518110611b4657611b4661266f565b60200260200101516020015160136000848481518110611b6857611b6861266f565b602002602001015160000151815260200190815260200160002060010181905550818181518110611b9b57611b9b61266f565b60200260200101516040015160136000848481518110611bbd57611bbd61266f565b602002602001015160000151815260200190815260200160002060020181905550818181518110611bf057611bf061266f565b60200260200101516060015160136000848481518110611c1257611c1261266f565b6020026020010151600001518152602001908152602001600020600301819055508080611c3e906126b3565b915050611ad6565b6000828152600e602090815260408083208484526002019091528120546001600160a01b031680611c7b5760009150506111c5565b5060019392505050565b6009546001600160a01b03163314611caf5760405162461bcd60e51b8152600401610ed7906126ce565b6015805460ff19169055565b6009546001600160a01b03163314611ce55760405162461bcd60e51b8152600401610ed7906126ce565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6009546001600160a01b03163314611d315760405162461bcd60e51b8152600401610ed7906126ce565b600c5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401600060405180830381600087803b158015611d7f57600080fd5b505af1158015611d93573d6000803e3d6000fd5b505050505050565b60048181548110611dab57600080fd5b600091825260209091200154905081565b60008160011415611de5576064611dd484603c612725565b611dde9190612744565b90506111c5565b8160021415611dfb576064611dd4846019612725565b8160031415611e11576064611dd484600f612725565b50600092915050565b6000828152600d6020908152604080832054808452600e835292208351611e499260059092019185019061209b565b506040518181527f46d937130e22cbf287447003c079f8f4bd89aa30903898fe55e61bcf7a92526f9060200160405180910390a1505050565b600f5415611fc55760005b600f54811015611fb8576000600f8281548110611eac57611eac61266f565b60009182526020808320909101546001600160a01b031680835260109091526040909120549091508015611fa3576001600160a01b0382811660008181526010602052604080822091909155600c54600a5491516323b872dd60e01b815291841660048301526024820192909252604481018490529116906323b872dd90606401600060405180830381600087803b158015611f4757600080fd5b505af1158015611f5b573d6000803e3d6000fd5b5050604080516001600160a01b0386168152602081018590527f9735b0cb909f3d21d5c16bbcccd272d85fa11446f6d679f6ecb170d2dabfecfc935001905060405180910390a15b50508080611fb0906126b3565b915050611e8d565b50611fc5600f60006120e6565b565b600080546002546003546006546040516305d3b1d360e41b8152600481019390935267ffffffffffffffff909116602483015261ffff8116604483015262010000900463ffffffff9081166064830152851660848201526001600160a01b0390911690635d3b1d309060a401602060405180830381600087803b15801561204d57600080fd5b505af1158015612061573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612085919061270c565b6000908152600d60205260409020919091555050565b8280548282559060005260206000209081019282156120d6579160200282015b828111156120d65782518255916020019190600101906120bb565b506120e2929150612107565b5090565b50805460008255906000526020600020908101906121049190612107565b50565b5b808211156120e25760008155600101612108565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156121555761215561211c565b60405290565b60405160a0810167ffffffffffffffff811182821017156121555761215561211c565b604051601f8201601f1916810167ffffffffffffffff811182821017156121a7576121a761211c565b604052919050565b600067ffffffffffffffff8211156121c9576121c961211c565b5060051b60200190565b80356001600160a01b03811681146121ea57600080fd5b919050565b600080604080848603121561220357600080fd5b8335925060208085013567ffffffffffffffff81111561222257600080fd5b8501601f8101871361223357600080fd5b8035612246612241826121af565b61217e565b81815260079190911b8201830190838101908983111561226557600080fd5b928401925b828410156122c1576080848b0312156122835760008081fd5b61228b612132565b612294856121d3565b8152848601358682015286850135878201526060808601359082015282526080909301929084019061226a565b8096505050505050509250929050565b6000602082840312156122e357600080fd5b5035919050565b6000602082840312156122fc57600080fd5b612305826121d3565b9392505050565b6000806000806080858703121561232257600080fd5b84359350612332602086016121d3565b93969395505050506040820135916060013590565b6000806040838503121561235a57600080fd5b50508035926020909101359150565b60006020828403121561237b57600080fd5b813567ffffffffffffffff8116811461230557600080fd5b600080604083850312156123a657600080fd5b8235915060208084013567ffffffffffffffff8111156123c557600080fd5b8401601f810186136123d657600080fd5b80356123e4612241826121af565b81815260059190911b8201830190838101908883111561240357600080fd5b928401925b8284101561242157833582529284019290840190612408565b80955050505050509250929050565b600080600080600060a0868803121561244857600080fd5b85359450612458602087016121d3565b94979496505050506040830135926060810135926080909101359150565b6000806020838503121561248957600080fd5b823567ffffffffffffffff808211156124a157600080fd5b818501915085601f8301126124b557600080fd5b8135818111156124c457600080fd5b8660208285010111156124d657600080fd5b60209290920196919550909350505050565b821515815260006020604081840152835180604085015260005b8181101561251e57858101830151858201606001528201612502565b81811115612530576000606083870101525b50601f01601f191692909201606001949350505050565b60008060006060848603121561255c57600080fd5b505081359360208301359350604090920135919050565b6000602080838503121561258657600080fd5b823567ffffffffffffffff81111561259d57600080fd5b8301601f810185136125ae57600080fd5b80356125bc612241826121af565b81815260a091820283018401918482019190888411156125db57600080fd5b938501935b838510156126395780858a0312156125f85760008081fd5b61260061215b565b853581528686013587820152604080870135908201526060808701359082015260808087013590820152835293840193918501916125e0565b50979650505050505050565b6000806040838503121561265857600080fd5b612661836121d3565b946020939093013593505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156126ae576126ae612685565b500190565b60006000198214156126c7576126c7612685565b5060010190565b6020808252600d908201526c2737ba103a34329037bbb732b960991b604082015260600190565b60008282101561270757612707612685565b500390565b60006020828403121561271e57600080fd5b5051919050565b600081600019048311821515161561273f5761273f612685565b500290565b60008261276157634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122028b7c71f0fd43f160f07484e64bd653abb8453645b1cbaea306799359bab689a64736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000ae000000000000000000000000000000000000000000000000000000000000a8c00000000000000000000000007f8a13a102aaaa5fc3ab87e5162b1b50e022d1d200000000000000000000000030264a8866a4c83d58d396854fca311fb5d37de0

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061021b5760003560e01c80636ea3d9be11610125578063b859f825116100ad578063e89e106a1161007c578063e89e106a146105b3578063e926ca95146105bc578063f3baf070146105f9578063f3fef3a314610602578063f6eaffc81461061557600080fd5b8063b859f82514610560578063bbcd5bbe14610573578063dc01f60d14610586578063e4341cea146105a657600080fd5b806382689a01116100f457806382689a0114610516578063833a71d7146105295780638da5cb5b14610531578063947a36fb14610544578063987f70ff1461054d57600080fd5b80636ea3d9be1461047c5780637592b77f1461048f5780637673399a146104a25780637bbc469e146104b557600080fd5b80631fe543e3116101a85780632bf7299b116101775780632bf7299b146104095780633f3b3b271461041c5780634585e33b1461042557806352e320a0146104385780636e04ff0d1461045b57600080fd5b80631fe543e31461036b578063212b33f01461037e57806322a90082146103e35780632ac426aa146103f657600080fd5b80630c2e6f18116101ef5780630c2e6f18146102a6578063129927d3146102b957806313af4035146102ec5780631aed59f0146102ff5780631edebf0b1461035857600080fd5b8062f88a661461022057806305bc8c6214610235578063081e8924146102685780630c24348414610293575b600080fd5b61023361022e3660046121ef565b610628565b005b6102556102433660046122d1565b600d6020526000908152604090205481565b6040519081526020015b60405180910390f35b61027b6102763660046122d1565b610e83565b6040516001600160a01b03909116815260200161025f565b6102336102a13660046122ea565b610ead565b6102336102b436600461230c565b610f02565b6102dc6102c73660046122d1565b60146020526000908152604090205460ff1681565b604051901515815260200161025f565b6102336102fa3660046122ea565b6110df565b61031261030d366004612347565b61112b565b60405161025f919081516001600160a01b031681526020808301519082015260408083015190820152606080830151908201526080918201519181019190915260a00190565b610233610366366004612369565b6111cb565b610233610379366004612393565b611219565b6103bb61038c3660046122d1565b601360205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a00161025f565b6102336103f13660046122d1565b6112a1565b610233610404366004612430565b6112d0565b6102336104173660046122d1565b6117c1565b61025560085481565b610233610433366004612476565b6117f0565b6102dc6104463660046122d1565b60126020526000908152604090205460ff1681565b61046e610469366004612476565b611812565b60405161025f9291906124e8565b61023361048a366004612547565b611831565b61023361049d366004612573565b611878565b6102336104b0366004612573565b611a5f565b6104f06104c33660046122d1565b600e6020526000908152604090208054600182015460038301546004909301549192909160ff9091169084565b60408051948552602085019390935290151591830191909152606082015260800161025f565b6102dc610524366004612347565b611c46565b610233611c85565b60095461027b906001600160a01b031681565b61025560075481565b600c5461027b906001600160a01b031681565b600a5461027b906001600160a01b031681565b6102336105813660046122ea565b611cbb565b6102556105943660046122ea565b60106020526000908152604090205481565b6015546102dc9060ff1681565b61025560055481565b6103bb6105ca3660046122d1565b601160205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b610255600b5481565b610233610610366004612645565b611d07565b6102556106233660046122d1565b611d9b565b6000828152600e60205260408120805460019091015490915b8351811015610e7c576000821580610681575061067b8686848151811061066a5761066a61266f565b602002602001015160200151611c46565b15156001145b15610c8c5760006012600087858151811061069e5761069e61266f565b602002602001015160200151815260200190815260200160002060006101000a81548160ff02191690831515021790555060008583815181106106e3576106e361266f565b602002602001015160400151111561073f5760006014600087858151811061070d5761070d61266f565b602002602001015160400151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601160008684815181106107555761075561266f565b602002602001015160200151815260200190815260200160002060000154600161077f919061269b565b601160008785815181106107955761079561266f565b60200260200101516020015181526020019081526020016000206000018190555060008583815181106107ca576107ca61266f565b602002602001015160400151111561088257601460008684815181106107f2576107f261266f565b602090810291909101810151604001518252015284516013906000908790859081106108205761082061266f565b602002602001015160400151815260200190815260200160002060000154600161084a919061269b565b601360008785815181106108605761086061266f565b6020026020010151604001518152602001908152602001600020600001819055505b8482815181106108945761089461266f565b602002602001015160600151600114156109e657601160008684815181106108be576108be61266f565b60200260200101516020015181526020019081526020016000206001015460016108e8919061269b565b601160008785815181106108fe576108fe61266f565b6020026020010151602001518152602001908152602001600020600101819055508482815181106109315761093161266f565b6020026020010151604001516000146109bc576013600086848151811061095a5761095a61266f565b6020026020010151604001518152602001908152602001600020600101546001610984919061269b565b6013600087858151811061099a5761099a61266f565b6020026020010151604001518152602001908152602001600020600101819055505b6109e3848684815181106109d2576109d261266f565b602002602001015160600151611dbc565b90505b8482815181106109f8576109f861266f565b60200260200101516060015160021415610b395760116000868481518110610a2257610a2261266f565b6020026020010151602001518152602001908152602001600020600201546001610a4c919061269b565b60116000878581518110610a6257610a6261266f565b602002602001015160200151815260200190815260200160002060020181905550848281518110610a9557610a9561266f565b602002602001015160400151600014610b205760136000868481518110610abe57610abe61266f565b6020026020010151604001518152602001908152602001600020600201546001610ae8919061269b565b60136000878581518110610afe57610afe61266f565b6020026020010151604001518152602001908152602001600020600201819055505b610b36848684815181106109d2576109d261266f565b90505b848281518110610b4b57610b4b61266f565b60200260200101516060015160031415610c8c5760116000868481518110610b7557610b7561266f565b6020026020010151602001518152602001908152602001600020600301546001610b9f919061269b565b60116000878581518110610bb557610bb561266f565b602002602001015160200151815260200190815260200160002060030181905550848281518110610be857610be861266f565b602002602001015160400151600014610c735760136000868481518110610c1157610c1161266f565b6020026020010151604001518152602001908152602001600020600301546001610c3b919061269b565b60136000878581518110610c5157610c5161266f565b6020026020010151604001518152602001908152602001600020600301819055505b610c89848684815181106109d2576109d261266f565b90505b8015610e69576000868152600e602052604090206001015415610d4357600c5485516001600160a01b039091169063a9059cbb90879085908110610cd257610cd261266f565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015610d2657600080fd5b505af1158015610d3a573d6000803e3d6000fd5b50505050610e69565b60106000868481518110610d5957610d5961266f565b6020026020010151600001516001600160a01b03166001600160a01b031681526020019081526020016000205460001415610ddf57600f858381518110610da257610da261266f565b6020908102919091018101515182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b8060106000878581518110610df657610df661266f565b6020026020010151600001516001600160a01b03166001600160a01b0316815260200190815260200160002054610e2d919061269b565b60106000878581518110610e4357610e4361266f565b602090810291909101810151516001600160a01b03168252810191909152604001600020555b5080610e74816126b3565b915050610641565b5050505050565b600f8181548110610e9357600080fd5b6000918252602090912001546001600160a01b0316905081565b6009546001600160a01b03163314610ee05760405162461bcd60e51b8152600401610ed7906126ce565b60405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000848152600e602090815260408083208584526002019091529020546001600160a01b03163314610f765760405162461bcd60e51b815260206004820152601b60248201527f43616e206e6f7420756e6a6f696e206f746865722070656f706c6500000000006044820152606401610ed7565b6000848152600e602081815260408084208685526002808201845282862080546001600160a01b03191681556001808201889055918101879055600381018790556004908101879055958a905293909252910154600c54915163a9059cbb60e01b81526001600160a01b03878116948201949094526024810182905290929091169063a9059cbb90604401600060405180830381600087803b15801561101b57600080fd5b505af115801561102f573d6000803e3d6000fd5b5050506000868152600e602052604090206004015461105191506001906126f5565b6000868152600e602052604090206004810191909155546110739082906126f5565b6000868152600e60209081526040918290209290925580518781526001600160a01b038716928101929092528101849052606081018390527f486610e7950cc18b99f2e96078158edbdb0a971f7520894f5428b07ca8f6d1a69060800160405180910390a15050505050565b6009546001600160a01b031633146111095760405162461bcd60e51b8152600401610ed7906126ce565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6111666040518060a0016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081525090565b506000828152600e602090815260408083208484526002908101835292819020815160a08101835281546001600160a01b0316815260018201549381019390935292830154908201526003820154606082015260049091015460808201525b92915050565b6009546001600160a01b031633146111f55760405162461bcd60e51b8152600401610ed7906126ce565b6003805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b336001600160a01b037f000000000000000000000000ae975071be8f8ee67addbc1a82488f1c2485806716146112935760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000ae975071be8f8ee67addbc1a82488f1c24858067166024820152604401610ed7565b61129d8282611e1a565b5050565b6009546001600160a01b031633146112cb5760405162461bcd60e51b8152600401610ed7906126ce565b600755565b6000858152600e60205260409020600401546001600160a01b038516331461133a5760405162461bcd60e51b815260206004820152601f60248201527f43616e206f6e6c79206a6f696e207769746820796f75722061646472657373006044820152606401610ed7565b60008481526012602052604090205460ff161515600114156113955760405162461bcd60e51b8152602060048201526014602482015273546f6b656e20616c726561647920726163696e6760601b6044820152606401610ed7565b600c54604051636eb1769f60e11b81526001600160a01b0387811660048301523060248301528592169063dd62ed3e90604401602060405180830381600087803b1580156113e257600080fd5b505af11580156113f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141a919061270c565b116114675760405162461bcd60e51b815260206004820152601e60248201527f456e7472616e636520466565206578636565647320616c6c6f77616e636500006044820152606401610ed7565b6000868152600e60205260409020600101548310156114c85760405162461bcd60e51b815260206004820152601d60248201527f456e7472616e63652066656520686967686572207468616e2073656e740000006044820152606401610ed7565b600b5481111561152a5760405162461bcd60e51b815260206004820152602760248201527f4d6178206e756d626572206f662072616365727320616c7265616479207265676044820152661a5cdd195c995960ca1b6064820152608401610ed7565b6000868152600e60205260409020600501546115885760405162461bcd60e51b815260206004820152601760248201527f5365656473206e6f74207965742067656e6572617465640000000000000000006044820152606401610ed7565b6000868152600e602052604081206005018054839081106115ab576115ab61266f565b906000526020600020015490506012600086815260200190815260200160002060009054906101000a9050506040518060a00160405280876001600160a01b031681526020018481526020018581526020018281526020016000815250600e6000898152602001908152602001600020600201600087815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010155604082015181600201556060820151816003015560808201518160040155905050600c60009054906101000a90046001600160a01b03166001600160a01b03166323b872dd8730876040518463ffffffff1660e01b81526004016116eb939291906001600160a01b039384168152919092166020820152604081019190915260600190565b600060405180830381600087803b15801561170557600080fd5b505af1158015611719573d6000803e3d6000fd5b5050505081600161172a919061269b565b6000888152600e6020526040902060048101919091555461174c90859061269b565b6000888152600e60209081526040918290209290925580518981526001600160a01b03891692810192909252810186905260608101829052608081018490527f1ef856f4f131645a54a362971767b14b39411c3662c4e779eaccb99998432f609060a00160405180910390a150505050505050565b6009546001600160a01b031633146117eb5760405162461bcd60e51b8152600401610ed7906126ce565b600b55565b60075460085461180090426126f5565b111561129d574260085561129d611e82565b600060606007546008544261182791906126f5565b1191509250929050565b6000838152600e6020526040902060018101839055600301805460ff1916905581611868576000838152600e602052604090208190555b611873600c84611fc7565b505050565b6009546001600160a01b031633146118a25760405162461bcd60e51b8152600401610ed7906126ce565b60155460ff166118ec5760405162461bcd60e51b8152602060048201526015602482015274155c1b1bd8591a5b99c81a5cc8191a5cd8589b1959605a1b6044820152606401610ed7565b60005b815181101561129d5781818151811061190a5761190a61266f565b6020026020010151608001516011600084848151811061192c5761192c61266f565b60200260200101516000015181526020019081526020016000206000018190555081818151811061195f5761195f61266f565b602002602001015160200151601160008484815181106119815761198161266f565b6020026020010151600001518152602001908152602001600020600101819055508181815181106119b4576119b461266f565b602002602001015160400151601160008484815181106119d6576119d661266f565b602002602001015160000151815260200190815260200160002060020181905550818181518110611a0957611a0961266f565b60200260200101516060015160116000848481518110611a2b57611a2b61266f565b6020026020010151600001518152602001908152602001600020600301819055508080611a57906126b3565b9150506118ef565b6009546001600160a01b03163314611a895760405162461bcd60e51b8152600401610ed7906126ce565b60155460ff16611ad35760405162461bcd60e51b8152602060048201526015602482015274155c1b1bd8591a5b99c81a5cc8191a5cd8589b1959605a1b6044820152606401610ed7565b60005b815181101561129d57818181518110611af157611af161266f565b60200260200101516080015160136000848481518110611b1357611b1361266f565b602002602001015160000151815260200190815260200160002060000181905550818181518110611b4657611b4661266f565b60200260200101516020015160136000848481518110611b6857611b6861266f565b602002602001015160000151815260200190815260200160002060010181905550818181518110611b9b57611b9b61266f565b60200260200101516040015160136000848481518110611bbd57611bbd61266f565b602002602001015160000151815260200190815260200160002060020181905550818181518110611bf057611bf061266f565b60200260200101516060015160136000848481518110611c1257611c1261266f565b6020026020010151600001518152602001908152602001600020600301819055508080611c3e906126b3565b915050611ad6565b6000828152600e602090815260408083208484526002019091528120546001600160a01b031680611c7b5760009150506111c5565b5060019392505050565b6009546001600160a01b03163314611caf5760405162461bcd60e51b8152600401610ed7906126ce565b6015805460ff19169055565b6009546001600160a01b03163314611ce55760405162461bcd60e51b8152600401610ed7906126ce565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6009546001600160a01b03163314611d315760405162461bcd60e51b8152600401610ed7906126ce565b600c5460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401600060405180830381600087803b158015611d7f57600080fd5b505af1158015611d93573d6000803e3d6000fd5b505050505050565b60048181548110611dab57600080fd5b600091825260209091200154905081565b60008160011415611de5576064611dd484603c612725565b611dde9190612744565b90506111c5565b8160021415611dfb576064611dd4846019612725565b8160031415611e11576064611dd484600f612725565b50600092915050565b6000828152600d6020908152604080832054808452600e835292208351611e499260059092019185019061209b565b506040518181527f46d937130e22cbf287447003c079f8f4bd89aa30903898fe55e61bcf7a92526f9060200160405180910390a1505050565b600f5415611fc55760005b600f54811015611fb8576000600f8281548110611eac57611eac61266f565b60009182526020808320909101546001600160a01b031680835260109091526040909120549091508015611fa3576001600160a01b0382811660008181526010602052604080822091909155600c54600a5491516323b872dd60e01b815291841660048301526024820192909252604481018490529116906323b872dd90606401600060405180830381600087803b158015611f4757600080fd5b505af1158015611f5b573d6000803e3d6000fd5b5050604080516001600160a01b0386168152602081018590527f9735b0cb909f3d21d5c16bbcccd272d85fa11446f6d679f6ecb170d2dabfecfc935001905060405180910390a15b50508080611fb0906126b3565b915050611e8d565b50611fc5600f60006120e6565b565b600080546002546003546006546040516305d3b1d360e41b8152600481019390935267ffffffffffffffff909116602483015261ffff8116604483015262010000900463ffffffff9081166064830152851660848201526001600160a01b0390911690635d3b1d309060a401602060405180830381600087803b15801561204d57600080fd5b505af1158015612061573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612085919061270c565b6000908152600d60205260409020919091555050565b8280548282559060005260206000209081019282156120d6579160200282015b828111156120d65782518255916020019190600101906120bb565b506120e2929150612107565b5090565b50805460008255906000526020600020908101906121049190612107565b50565b5b808211156120e25760008155600101612108565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156121555761215561211c565b60405290565b60405160a0810167ffffffffffffffff811182821017156121555761215561211c565b604051601f8201601f1916810167ffffffffffffffff811182821017156121a7576121a761211c565b604052919050565b600067ffffffffffffffff8211156121c9576121c961211c565b5060051b60200190565b80356001600160a01b03811681146121ea57600080fd5b919050565b600080604080848603121561220357600080fd5b8335925060208085013567ffffffffffffffff81111561222257600080fd5b8501601f8101871361223357600080fd5b8035612246612241826121af565b61217e565b81815260079190911b8201830190838101908983111561226557600080fd5b928401925b828410156122c1576080848b0312156122835760008081fd5b61228b612132565b612294856121d3565b8152848601358682015286850135878201526060808601359082015282526080909301929084019061226a565b8096505050505050509250929050565b6000602082840312156122e357600080fd5b5035919050565b6000602082840312156122fc57600080fd5b612305826121d3565b9392505050565b6000806000806080858703121561232257600080fd5b84359350612332602086016121d3565b93969395505050506040820135916060013590565b6000806040838503121561235a57600080fd5b50508035926020909101359150565b60006020828403121561237b57600080fd5b813567ffffffffffffffff8116811461230557600080fd5b600080604083850312156123a657600080fd5b8235915060208084013567ffffffffffffffff8111156123c557600080fd5b8401601f810186136123d657600080fd5b80356123e4612241826121af565b81815260059190911b8201830190838101908883111561240357600080fd5b928401925b8284101561242157833582529284019290840190612408565b80955050505050509250929050565b600080600080600060a0868803121561244857600080fd5b85359450612458602087016121d3565b94979496505050506040830135926060810135926080909101359150565b6000806020838503121561248957600080fd5b823567ffffffffffffffff808211156124a157600080fd5b818501915085601f8301126124b557600080fd5b8135818111156124c457600080fd5b8660208285010111156124d657600080fd5b60209290920196919550909350505050565b821515815260006020604081840152835180604085015260005b8181101561251e57858101830151858201606001528201612502565b81811115612530576000606083870101525b50601f01601f191692909201606001949350505050565b60008060006060848603121561255c57600080fd5b505081359360208301359350604090920135919050565b6000602080838503121561258657600080fd5b823567ffffffffffffffff81111561259d57600080fd5b8301601f810185136125ae57600080fd5b80356125bc612241826121af565b81815260a091820283018401918482019190888411156125db57600080fd5b938501935b838510156126395780858a0312156125f85760008081fd5b61260061215b565b853581528686013587820152604080870135908201526060808701359082015260808087013590820152835293840193918501916125e0565b50979650505050505050565b6000806040838503121561265857600080fd5b612661836121d3565b946020939093013593505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156126ae576126ae612685565b500190565b60006000198214156126c7576126c7612685565b5060010190565b6020808252600d908201526c2737ba103a34329037bbb732b960991b604082015260600190565b60008282101561270757612707612685565b500390565b60006020828403121561271e57600080fd5b5051919050565b600081600019048311821515161561273f5761273f612685565b500290565b60008261276157634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122028b7c71f0fd43f160f07484e64bd653abb8453645b1cbaea306799359bab689a64736f6c63430008090033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000000000000000000000000000ae000000000000000000000000000000000000000000000000000000000000a8c00000000000000000000000007f8a13a102aaaa5fc3ab87e5162b1b50e022d1d200000000000000000000000030264a8866a4c83d58d396854fca311fb5d37de0

-----Decoded View---------------
Arg [0] : subscriptionId (uint64): 174
Arg [1] : updateInterval (uint256): 43200
Arg [2] : _wofTokenAddress (address): 0x7F8a13a102AaAA5Fc3Ab87E5162B1b50e022D1d2
Arg [3] : _garageContract (address): 0x30264a8866A4c83d58d396854fca311FB5D37dE0

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000ae
Arg [1] : 000000000000000000000000000000000000000000000000000000000000a8c0
Arg [2] : 0000000000000000000000007f8a13a102aaaa5fc3ab87e5162b1b50e022d1d2
Arg [3] : 00000000000000000000000030264a8866a4c83d58d396854fca311fb5d37de0


Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.