Contract 0x01adffc167e91fC195f64BaEE48182911148950D 1

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xb1a19a7f61613aacdc57ce88a3516dc021e5470fb36d1737f043eb448492a791Enter Royale235409492022-01-10 2:33:02130 days 20 hrs ago0xc2c9c8a4c107299374fb36d9be0bb1b4b0bd84ee IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0007198830
0x072efd4be3ee9e00ad56ec6e7c15eb444750c52da57e3c226d71b86f74c09ef4Set Active235409382022-01-10 2:32:40130 days 20 hrs agoMatic Mike: Deployer IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0004306230
0xe3ce277e976b74bb73b1e7a84b76b6e6099537fa6264b0d9e1f384b66e44a901Enter Royale235407702022-01-10 2:24:44130 days 20 hrs ago0xc2c9c8a4c107299374fb36d9be0bb1b4b0bd84ee IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0x07dc55ffd89d17357be5bd31a379375b955b2e3aa90969fe049a77487b6ea014Enter Royale235407702022-01-10 2:24:44130 days 20 hrs ago0xc2c9c8a4c107299374fb36d9be0bb1b4b0bd84ee IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0xb9fa6c3f1bf380fd1a17324817ad08390ac5d3384386e6fa782078173a36dbb2Enter Royale235407692022-01-10 2:24:42130 days 20 hrs ago0xc2c9c8a4c107299374fb36d9be0bb1b4b0bd84ee IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0xef83c704afc179f297976cb1350d47810a1a22f5187c32fa804fc62b412a11fcEnter Royale235407662022-01-10 2:24:36130 days 20 hrs ago0xc2c9c8a4c107299374fb36d9be0bb1b4b0bd84ee IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0x8278bbc93797a63e9266afde0d2559b7a4ea2dddc22ba4be9e53789e2dd2ec42Enter Royale235407512022-01-10 2:24:06130 days 20 hrs ago0xb003008ce0c3e9206f02dbf0784d7a4862b34574 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0xb3ca40a3109ab6da437f7eaffa3e77f2218ef8c7b7bfb321763af0ba717458dfEnter Royale235407482022-01-10 2:24:00130 days 20 hrs ago0xb003008ce0c3e9206f02dbf0784d7a4862b34574 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0xa0db060ced5b8987db0c66ac9fb557d6bcfd1cadfb0bdab36c80471035db6c68Enter Royale235407462022-01-10 2:23:56130 days 20 hrs ago0xb003008ce0c3e9206f02dbf0784d7a4862b34574 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0114427530
0xe06371a3bc513113fe1a23b57c5c5e81367273ad09c8a123b13c8e96c682546eEnter Royale235407382022-01-10 2:23:40130 days 20 hrs agoMatic Mike: Deployer IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0x1f38b6be10d0b2955b09af5398acb4a722b5055cc770910416291a8d96192be0Enter Royale235015602022-01-09 2:07:33131 days 21 hrs agoMatic Mike: Deployer IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0xc8e9b3e56559b79332a7ccf98a7bace7043f65df30f45ee22b25257a9bf353c6Enter Royale234967492022-01-08 23:08:37132 days ago0x602f382559378881364fbc74662fb9359ed09a08 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.206187408536
0xf5f9d2052335f81718a809ec10335d1140f4ea93968631d9a0c98a3b2775f295Enter Royale234926892022-01-08 20:42:40132 days 2 hrs ago0x6e4d602cc4893e1fa9fb1bc702e9a2c37522fcc4 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0xd53599b97150ff8c1a56ef1ad2d60967103f2649d7a541a9d1f0a93957c3d870Enter Royale234926192022-01-08 20:38:32132 days 2 hrs ago0x6e4d602cc4893e1fa9fb1bc702e9a2c37522fcc4 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0x7481bafa28ee24a4fccea7ad53213f9874ebd4bb894f2c4f65dd70c7be387ff3Enter Royale234926172022-01-08 20:38:24132 days 2 hrs ago0x6e4d602cc4893e1fa9fb1bc702e9a2c37522fcc4 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0x118a8fceb0f30ccff98c1ac5e612d89ad684853096feb76c5fa914e7eeca4dffEnter Royale234926152022-01-08 20:38:16132 days 2 hrs ago0x6e4d602cc4893e1fa9fb1bc702e9a2c37522fcc4 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0x5074be340a64a13f5cef33d5a4c0698bcf42f83e437c6215f83fa1451e949510Enter Royale234792232022-01-08 12:22:51132 days 10 hrs ago0x2d801b634331d0b260734b6f1d8064c6101bacc4 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0972936630
0xbd2cd41e627effa1f23d86490acfb0579744a87035e302b7242b43c01499bc63Enter Royale234621872022-01-08 2:07:04132 days 21 hrs ago0xa1bbd8d39ed536dea030a32f3f6c5916c845a800 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0120533430
0x811eac9dc524899666daa1b1ec8e2898e7c414e15710bc4d76eecebec09cff89Enter Royale234621812022-01-08 2:06:52132 days 21 hrs ago0xa1bbd8d39ed536dea030a32f3f6c5916c845a800 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0120533430
0x6b34aa39469ff7375351803edfd594cc3c619e83ca2cc072014cb51dadc8eaafEnter Royale234621752022-01-08 2:06:40132 days 21 hrs ago0xa1bbd8d39ed536dea030a32f3f6c5916c845a800 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0120533430
0x7eb95ac54017df839967f51a6316343f510b020bead11cbd82da88ecdd421c04Enter Royale234621722022-01-08 2:06:34132 days 21 hrs ago0xa1bbd8d39ed536dea030a32f3f6c5916c845a800 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0120533430
0x32498e266621f3c7ea45ca0d2b77991b91f3cb9f598b865cf3ae6d5ec3952291Enter Royale234545722022-01-07 21:19:39133 days 1 hr ago0xeb44f9e1e62e8751bbc867ca1da3a7b0b7b939ba IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0x84a467c6bab4cf81129a250f928416c8a2e8cad9320b7e37d05907dc74513913Enter Royale234545642022-01-07 21:19:23133 days 1 hr ago0xeb44f9e1e62e8751bbc867ca1da3a7b0b7b939ba IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0120533430
0x82aba6cccb27009f243dc3f75ed47c886f71eab8c376dfe5859cc27885f42ef0Enter Royale234545542022-01-07 21:19:03133 days 1 hr ago0x6e4d602cc4893e1fa9fb1bc702e9a2c37522fcc4 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
0x1cc570faa76f2728b5d303405e321e3c11b7f1dad2bd408006c9226f3f5528b8Enter Royale234545492022-01-07 21:18:53133 days 1 hr ago0x6e4d602cc4893e1fa9fb1bc702e9a2c37522fcc4 IN  0x01adffc167e91fc195f64baee48182911148950d0 MATIC0.0115403430
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DanceOff

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : DanceOff.sol
// contracts/DanceOff.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IHgh.sol";
import "./IMaticMike.sol";

contract DanceOff is VRFConsumerBase, Ownable{
    using Counters for Counters.Counter;
    Counters.Counter private _rumbleId;
    Counters.Counter private _pvpId;
    Counters.Counter private _challengeId;

    struct RollInfo{
        uint256 tokenId;
        address holder;
        uint256 roll;
    }

    struct BattleType{
        uint8 battleType;
        uint256 battleId;
        uint256 tokenId;
        uint8 juicedUp;
        uint256 wager;
    }

    struct Winner{
        uint256 tokenId;
        uint8 placement;
        uint256 rumbleId;
        uint256 payout;
        address holder;
    }

    struct Leaderboards{
        uint256[] firstP;
        uint256[] secondP;
        uint256[] thirdP;
    }

    uint256[] firstPlacements;
    uint256[] secondPlacements;
    uint256[] thirdPlacements;
    uint256[] noPlacements;

    // Track participants
    mapping(uint256 => RollInfo[]) rumbleIdToRolls;
    mapping(bytes32 => BattleType) responseIdToBattle;
    
    mapping(uint256 => bool) battleIsComplete;
    mapping(uint256 => Winner[]) battleIdToWinners;
    mapping(uint256 => uint256) royaleTimeTrigger;
    mapping(uint256 => uint8) royaleParticipants;
    mapping(uint256 => uint8) royaleProcessedLink;
    mapping(uint256 => uint256) royalePot;

    mapping(uint256 => mapping(uint256 => bool)) tokenToRumble;
    
    // analytical stuff
    mapping(uint256 => uint256[]) tokenToRumblesEntered;
    mapping(uint256 => Winner[]) tokenToWinner;
    mapping(uint256 => uint256[]) rumbleIdParticipants;

    mapping(address => Winner[]) addressToWinner;
    mapping(address => uint256[]) addressToRumblesEntered;

    // 
    uint256 wagerMulti = 1000000000000000000;
    uint256 currentPrice = 1000000000000000000;
    uint8 rumbleSize = 50;
    uint8 minimumSize = 20;
    uint256 maxTime = 1800; // 30 minute trigger
    uint8 maxJuice = 5;

    address hghAddress;
    address mmAddress;

    bytes32 private keyHash;
    uint256 private fee;

    Leaderboards leaders;

    bool public active = false;

    // Mainnet
    // LINK Token	0xb0897686c545045aFc77CF20eC7A532E3120E0F1
    // VRF Coordinator	0x3d2341ADb2D31f1c5530cDC622016af293177AE0
    // Key Hash	0xf86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da
    // Fee	0.0001 LINK

    // Mumbai
    // LINK Token	0x326C977E6efc84E512bB9C30f76E30c160eD06FB
    // VRF Coordinator	0x8C7382F9D8f56b33781fE506E897a4F1e2d17255
    // Key Hash	0x6e75b569a01ef56d18cab6a8e71e6600d6ce853834d4a5748b720d06f878b3a4
    // Fee	0.0001 LINK

    constructor() 
        VRFConsumerBase(0x3d2341ADb2D31f1c5530cDC622016af293177AE0, 0xb0897686c545045aFc77CF20eC7A532E3120E0F1)
    {
        // Chainlink Info
        keyHash = 0xf86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da;
        fee = 0.0001 * 10 ** 18; // 0.0001 LINK
        royaleTimeTrigger[_rumbleId.current()] = block.timestamp;
    }

    // owner functions set everything
    function setTimeTriggerNow() public onlyOwner{
        royaleTimeTrigger[_rumbleId.current()] = block.timestamp;
    }

    function setActive(bool _active) public onlyOwner{
        active = _active;
    }

    function setAddress(address _hghAddress, address _mmAddress) public onlyOwner{
        hghAddress = _hghAddress;
        mmAddress = _mmAddress;
    }

    function setPrice(uint256 _price) public onlyOwner{
        currentPrice = _price;
    }

    function setRumbleSize(uint8 _size) public onlyOwner{
        rumbleSize = _size;
    }

    function setMinSize(uint8 _size) public onlyOwner{
        minimumSize = _size;
    }

    function setMaxTime(uint256 _time) public onlyOwner{
        maxTime = _time;
    }

    function withdrawHghIfStuck() public onlyOwner{
        uint256 balance = IHgh(hghAddress).balanceOf(address(this));
        IHgh(hghAddress).transfer(msg.sender, balance);
    }

    function forceStart(uint256 rumbleId) public onlyOwner{
        beginDance(rumbleId);
    }

    function setLinkFee(uint256 _fee) public onlyOwner{
        fee = _fee;
    }

    function setMaxJuice(uint8 _maxJuice)public onlyOwner{
        maxJuice = _maxJuice;
    }

    // end owner functions

    // // analytical stuff
    // mapping(uint256 => uint256[]) tokenToRumblesEntered;
    function getMaxJuice() public view returns (uint8){
        return maxJuice;
    }

    function getCurrentRumble() public view returns (uint256){
        return _rumbleId.current();
    }

    function getCurrentPot() public view returns (uint256){
        return royalePot[_rumbleId.current()];
    }

    function getCurrentEntries() public view returns (uint8){
        return royaleParticipants[_rumbleId.current()];
    }
    
    function getTimeTrigger() public view returns (uint256){
        return royaleTimeTrigger[_rumbleId.current()];
    }

    function isComplete(uint256 rumbleId) public view returns (bool){
        return battleIsComplete[rumbleId];
    }

    function getRumblesEntered(uint256 _tokenId) public view returns (uint256[] memory){
        return tokenToRumblesEntered[_tokenId];
    }

    function getPlacementsByToken(uint256 _tokenId) public view returns (Winner[] memory){
        return tokenToWinner[_tokenId];
    }

    function getPlacementsByAddress(address _address) public view returns (Winner[] memory){
        return addressToWinner[_address];
    }

    function getRumblesEnteredByAddress(address _address) public view returns (uint256[] memory){
        return addressToRumblesEntered[_address];
    }

    function getPlacementsByRumble(uint256 rumbleId) public view returns (Winner[] memory){
        return battleIdToWinners[rumbleId];
    }

    function getEntriesByRumble(uint256 rumbleId) public view returns (uint256[] memory){
        return rumbleIdParticipants[rumbleId];
    }

    function getLeaderboards() public view returns (Leaderboards memory){
        return leaders;
    }

    function getFirstPlace() public view returns (uint256[] memory){
        return firstPlacements;
    }

    function getSecondPlace() public view returns (uint256[] memory){
        return secondPlacements;
    }

    function getThirdPlace() public view returns (uint256[] memory){
        return thirdPlacements;
    }

    // enter battle royale
    function enterRoyale(uint256 _tokenId, uint8 _hghJuice) public returns (uint256){
        require(active, "Dance Royale not currently active");
        require((_hghJuice * wagerMulti) % wagerMulti == 0, "HGH Amount cannot be a decimal");
        require(_hghJuice <= maxJuice, "Over the maximum juice amount");
        require(IHgh(hghAddress).balanceOf(msg.sender) >= (_hghJuice * wagerMulti) + currentPrice, "Not enough HGH in wallet balance");
        
        // check in gym as well 
        require(IMaticMike(mmAddress).ownerOf(_tokenId) == msg.sender || IHgh(hghAddress).getStaker(_tokenId) == msg.sender, "Not the owner of token");
        require(royaleParticipants[_rumbleId.current()] < rumbleSize && !battleIsComplete[_rumbleId.current()], "Royale trigger currently in progress. Try again in a minute");
        
        // require that they are not already entered in the competition...
        require(!tokenToRumble[_tokenId][_rumbleId.current()], "Already entered in competition");

        // if new rumble populate analytics from previous rumble
        if(_rumbleId.current() != 0 && royaleParticipants[_rumbleId.current()] == 0){
            populateWinners(_rumbleId.current() - 1);
        }

        // burn the juiced up amount
        IHgh(hghAddress).burnFrom(msg.sender, _hghJuice * wagerMulti);

        // transfer 1 HGH to contract
        IHgh(hghAddress).transferFrom(msg.sender, address(this), currentPrice);

        // begin royale entry
        royaleParticipants[_rumbleId.current()]++;
        royalePot[_rumbleId.current()] = royalePot[_rumbleId.current()] + wagerMulti;
        tokenToRumble[_tokenId][_rumbleId.current()] = true;
        
        bytes32 requestId = requestRandomness(keyHash, fee);

        responseIdToBattle[requestId] = BattleType(
            1,
            _rumbleId.current(),
            _tokenId,
            _hghJuice,
            wagerMulti
        );

        rumbleIdParticipants[_rumbleId.current()].push(_tokenId);
        tokenToRumblesEntered[_tokenId].push(_rumbleId.current());
        addressToRumblesEntered[msg.sender].push(_rumbleId.current());

        return _rumbleId.current();
    }

    // fulfill chainlink VRF randomness, and run roll logic
    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
        uint256 rumbleId = responseIdToBattle[requestId].battleId;
        uint256 powerup = 0;

        if(responseIdToBattle[requestId].juicedUp > 0){
            powerup = (randomness % (responseIdToBattle[requestId].juicedUp * 9)) + responseIdToBattle[requestId].juicedUp;
        }

        uint powerlevel = IMaticMike(mmAddress).getPowerLevel(responseIdToBattle[requestId].tokenId) + powerup;
        address tokenHolder;

        // check if in gym and assign accordingly
        if(IMaticMike(mmAddress).ownerOf(responseIdToBattle[requestId].tokenId) != hghAddress){
            tokenHolder = IMaticMike(mmAddress).ownerOf(responseIdToBattle[requestId].tokenId);
        }
        else{
            tokenHolder = IHgh(hghAddress).getStaker(responseIdToBattle[requestId].tokenId);
        }
         

        uint256 roll = randomness % powerlevel;

        rumbleIdToRolls[rumbleId].push(
            RollInfo(
                responseIdToBattle[requestId].tokenId,
                tokenHolder,
                roll
            )
        );

        royaleProcessedLink[rumbleId]++;

        if(royaleProcessedLink[rumbleId] == royaleParticipants[rumbleId]){
            if(royaleParticipants[rumbleId] >= rumbleSize){
                beginDance(rumbleId);
            }
            else if(royaleParticipants[rumbleId] >= minimumSize && block.timestamp - royaleTimeTrigger[rumbleId] >= maxTime){
                beginDance(rumbleId);
            }
        }
    }

    function beginDance(uint256 rumbleId) internal{
        require(!battleIsComplete[rumbleId], "Battle already completed");

        RollInfo memory fpRoll;
        RollInfo memory spRoll;
        RollInfo memory tpRoll;

        // we should sort all the entries and create an array of structs from lowest to highest
        for(uint16 i=0; i<rumbleIdToRolls[rumbleId].length; i++){
            if(rumbleIdToRolls[rumbleId][i].roll > fpRoll.roll){
                tpRoll = spRoll;
                spRoll = fpRoll;
                fpRoll = rumbleIdToRolls[rumbleId][i];
            }
            else if(rumbleIdToRolls[rumbleId][i].roll == fpRoll.roll){
                tpRoll = spRoll;

                if(coinFlip(rumbleIdToRolls[rumbleId][i].tokenId, rumbleIdToRolls[rumbleId][i].holder, i) > 0){
                    spRoll = fpRoll;
                    fpRoll = rumbleIdToRolls[rumbleId][i];
                }
                else{
                    spRoll = rumbleIdToRolls[rumbleId][i];
                }
            }
            else if(rumbleIdToRolls[rumbleId][i].roll > spRoll.roll){
                tpRoll = spRoll;
                spRoll = rumbleIdToRolls[rumbleId][i];
            }
            else if(rumbleIdToRolls[rumbleId][i].roll == spRoll.roll){
                if(coinFlip(rumbleIdToRolls[rumbleId][i].tokenId, rumbleIdToRolls[rumbleId][i].holder, i) > 0){
                    tpRoll = spRoll;
                    spRoll = rumbleIdToRolls[rumbleId][i];
                }
                else{
                    tpRoll = rumbleIdToRolls[rumbleId][i];
                }
            }
            else if(rumbleIdToRolls[rumbleId][i].roll > tpRoll.roll){
                tpRoll = rumbleIdToRolls[rumbleId][i];
            }
            else if(rumbleIdToRolls[rumbleId][i].roll == tpRoll.roll && coinFlip(rumbleIdToRolls[rumbleId][i].tokenId, rumbleIdToRolls[rumbleId][i].holder, i) > 0){
                tpRoll = rumbleIdToRolls[rumbleId][i];
            }
        }

        uint256 totalPot = royalePot[rumbleId];
        uint256 tpPayout = totalPot * 1/10;
        uint256 spPayout = totalPot * 2/10;
        uint256 fpPayout = totalPot * 7/10;


        // we should have a internal struct that saves the top 3 placements
        battleIdToWinners[rumbleId].push(
            Winner(
                fpRoll.tokenId,
                1,
                rumbleId,
                fpPayout,
                fpRoll.holder
            )
        );

        battleIdToWinners[rumbleId].push(
            Winner(
                spRoll.tokenId,
                2,
                rumbleId,
                spPayout,
                spRoll.holder
            )
        );

        battleIdToWinners[rumbleId].push(
            Winner(
                tpRoll.tokenId,
                3,
                rumbleId,
                tpPayout,
                tpRoll.holder
            )
        );

        // increase rumbleid
        battleIsComplete[rumbleId] = true;

        _rumbleId.increment();
        royaleTimeTrigger[_rumbleId.current()] = block.timestamp;
        
        // payout winners
        IHgh(hghAddress).transfer(tpRoll.holder, tpPayout);
        IHgh(hghAddress).transfer(spRoll.holder, spPayout);
        IHgh(hghAddress).transfer(fpRoll.holder, fpPayout);
    }

    function coinFlip(uint256 _t, address _a, uint16 _c) internal view returns (uint8){
        return uint8(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            block.timestamp,
                            block.difficulty,
                            _t,
                            _a,
                            _c,
                            _rumbleId.current()
                        )
                    )
                ) % 2
            );
    }


    // analytics stuff
    function populateWinners(uint256 rumbleId) internal{
        for(uint8 i=0; i<battleIdToWinners[rumbleId].length; i++){
            tokenToWinner[battleIdToWinners[rumbleId][i].tokenId].push(battleIdToWinners[rumbleId][i]);
            addressToWinner[battleIdToWinners[rumbleId][i].holder].push(battleIdToWinners[rumbleId][i]);
            
            if(battleIdToWinners[rumbleId][i].placement == 1){
                firstPlacements.push(battleIdToWinners[rumbleId][i].tokenId);
                leaders.firstP = firstPlacements;
            }
            else  if(battleIdToWinners[rumbleId][i].placement == 2){
                secondPlacements.push(battleIdToWinners[rumbleId][i].tokenId);
                leaders.secondP = secondPlacements;
            }
            else if(battleIdToWinners[rumbleId][i].placement == 3){
                thirdPlacements.push(battleIdToWinners[rumbleId][i].tokenId);
                leaders.thirdP = thirdPlacements;
            }
        }
    }
}

File 2 of 13 : IMaticMike.sol
// contracts/IMaticMike.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";


interface IMaticMike is IERC721Enumerable {    
    function withdrawnTokens(uint256 tokenId) external view returns (bool);
    function getPowerLevel(uint256 tokenId) external view returns (uint16);
}

File 3 of 13 : IHgh.sol
// contracts/IHgh.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IHgh is IERC20 {
    function burnFrom(address account, uint256 amount) external;
    function getStaker(uint256 tokenId) external view returns (address);
}

File 4 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 5 of 13 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 6 of 13 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 7 of 13 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 8 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 9 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 10 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 11 of 13 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {

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

  function approve(
    address spender,
    uint256 value
  )
    external
    returns (
      bool success
    );

  function balanceOf(
    address owner
  )
    external
    view
    returns (
      uint256 balance
    );

  function decimals()
    external
    view
    returns (
      uint8 decimalPlaces
    );

  function decreaseApproval(
    address spender,
    uint256 addedValue
  )
    external
    returns (
      bool success
    );

  function increaseApproval(
    address spender,
    uint256 subtractedValue
  ) external;

  function name()
    external
    view
    returns (
      string memory tokenName
    );

  function symbol()
    external
    view
    returns (
      string memory tokenSymbol
    );

  function totalSupply()
    external
    view
    returns (
      uint256 totalTokensIssued
    );

  function transfer(
    address to,
    uint256 value
  )
    external
    returns (
      bool success
    );

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  )
    external
    returns (
      bool success
    );

  function transferFrom(
    address from,
    address to,
    uint256 value
  )
    external
    returns (
      bool success
    );

}

File 12 of 13 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract VRFRequestIDBase {

  /**
   * @notice returns the seed which is actually input to the VRF coordinator
   *
   * @dev To prevent repetition of VRF output due to repetition of the
   * @dev user-supplied seed, that seed is combined in a hash with the
   * @dev user-specific nonce, and the address of the consuming contract. The
   * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
   * @dev the final seed, but the nonce does protect against repetition in
   * @dev requests which are included in a single block.
   *
   * @param _userSeed VRF seed input provided by user
   * @param _requester Address of the requesting contract
   * @param _nonce User-specific nonce at the time of the request
   */
  function makeVRFInputSeed(
    bytes32 _keyHash,
    uint256 _userSeed,
    address _requester,
    uint256 _nonce
  )
    internal
    pure
    returns (
      uint256
    )
  {
    return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
  }

  /**
   * @notice Returns the id for this request
   * @param _keyHash The serviceAgreement ID to be used for this request
   * @param _vRFInputSeed The seed to be passed directly to the VRF
   * @return The id for this request
   *
   * @dev Note that _vRFInputSeed is not the seed passed by the consuming
   * @dev contract, but the one generated by makeVRFInputSeed
   */
  function makeRequestId(
    bytes32 _keyHash,
    uint256 _vRFInputSeed
  )
    internal
    pure
    returns (
      bytes32
    )
  {
    return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
  }
}

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

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

/** ****************************************************************************
 * @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.
 * *****************************************************************************
 * @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     constuctor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) 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), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (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. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @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 ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @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.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {

  /**
   * @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 VRFConsumerBase 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 randomness the VRF output
   */
  function fulfillRandomness(
    bytes32 requestId,
    uint256 randomness
  )
    internal
    virtual;

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 constant private USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(
    bytes32 _keyHash,
    uint256 _fee
  )
    internal
    returns (
      bytes32 requestId
    )
  {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed  = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface immutable internal LINK;
  address immutable private vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   * @param _link address of LINK token contract
   *
   * @dev https://docs.chain.link/docs/link-token-contracts
   */
  constructor(
    address _vrfCoordinator,
    address _link
  ) {
    vrfCoordinator = _vrfCoordinator;
    LINK = LinkTokenInterface(_link);
  }

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomness(
    bytes32 requestId,
    uint256 randomness
  )
    external
  {
    require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
    fulfillRandomness(requestId, randomness);
  }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint8","name":"_hghJuice","type":"uint8"}],"name":"enterRoyale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rumbleId","type":"uint256"}],"name":"forceStart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentEntries","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentPot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentRumble","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rumbleId","type":"uint256"}],"name":"getEntriesByRumble","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFirstPlace","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLeaderboards","outputs":[{"components":[{"internalType":"uint256[]","name":"firstP","type":"uint256[]"},{"internalType":"uint256[]","name":"secondP","type":"uint256[]"},{"internalType":"uint256[]","name":"thirdP","type":"uint256[]"}],"internalType":"struct DanceOff.Leaderboards","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxJuice","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getPlacementsByAddress","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint8","name":"placement","type":"uint8"},{"internalType":"uint256","name":"rumbleId","type":"uint256"},{"internalType":"uint256","name":"payout","type":"uint256"},{"internalType":"address","name":"holder","type":"address"}],"internalType":"struct DanceOff.Winner[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rumbleId","type":"uint256"}],"name":"getPlacementsByRumble","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint8","name":"placement","type":"uint8"},{"internalType":"uint256","name":"rumbleId","type":"uint256"},{"internalType":"uint256","name":"payout","type":"uint256"},{"internalType":"address","name":"holder","type":"address"}],"internalType":"struct DanceOff.Winner[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getPlacementsByToken","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint8","name":"placement","type":"uint8"},{"internalType":"uint256","name":"rumbleId","type":"uint256"},{"internalType":"uint256","name":"payout","type":"uint256"},{"internalType":"address","name":"holder","type":"address"}],"internalType":"struct DanceOff.Winner[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRumblesEntered","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getRumblesEnteredByAddress","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSecondPlace","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getThirdPlace","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTimeTrigger","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rumbleId","type":"uint256"}],"name":"isComplete","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_active","type":"bool"}],"name":"setActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hghAddress","type":"address"},{"internalType":"address","name":"_mmAddress","type":"address"}],"name":"setAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setLinkFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxJuice","type":"uint8"}],"name":"setMaxJuice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"setMaxTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_size","type":"uint8"}],"name":"setMinSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_size","type":"uint8"}],"name":"setRumbleSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setTimeTriggerNow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawHghIfStuck","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052670de0b6b3a764000060178190556018556019805461ffff1916611432179055610708601a55601b8054600560ff19918216179091556022805490911690553480156200005057600080fd5b507f3d2341adb2d31f1c5530cdc622016af293177ae000000000000000000000000060a0527fb0897686c545045afc77cf20ec7a532e3120e0f1000000000000000000000000608052620000a43362000106565b7ff86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da601d55655af3107a4000601e5542600d6000620000ef600262000158602090811b62001f1f17901c565b81526020810191909152604001600020556200015c565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b5490565b60805160601c60a05160601c613daf6200018f60003960008181610c5e01526135e5015260006135a90152613daf6000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c806391b7f5ed1161012a578063c104652a116100bd578063e6f618b71161008c578063e7eed1f711610071578063e7eed1f714610451578063eebe1c4614610459578063f2fde38b1461046c57600080fd5b8063e6f618b71461043e578063e74ba8ee1461044657600080fd5b8063c104652a146103fd578063cd8ff65714610410578063e0221df614610423578063e07353cb1461043657600080fd5b8063a97dfa07116100f9578063a97dfa07146103b1578063acec338a146103c4578063b2b750a7146103d7578063bf36ccf5146103ea57600080fd5b806391b7f5ed1461036557806394985ddd1461037857806398b777e71461038b57806399043b761461039e57600080fd5b806361df9124116101a2578063715018a611610171578063715018a61461031a5780638a5ff04e146103225780638d0d4042146103355780638da5cb5b1461033d57600080fd5b806361df9124146102d557806364a7b172146102dd57806366a8a0ab146102f257806368e41f031461031257600080fd5b80633a0be1a6116101de5780633a0be1a6146102765780633b58524d1461029957806342eb2c8c146102ac5780634b725bbe146102c257600080fd5b806302fb0c5e1461021057806303aaa64d146102325780630fa9ca0f146102475780632df3fbce14610261575b600080fd5b60225461021d9060ff1681565b60405190151581526020015b60405180910390f35b61023a61047f565b6040516102299190613b3e565b61024f6105b6565b60405160ff9091168152602001610229565b61027461026f3660046139b6565b6105de565b005b61021d610284366004613958565b6000908152600b602052604090205460ff1690565b6102746102a736600461389f565b610698565b6102b461078d565b604051908152602001610229565b6102746102d03660046139b6565b6107b0565b6102b461086a565b6102e561087a565b6040516102299190613b2b565b61030561030036600461385e565b6108d2565b6040516102299190613aa4565b6102e5610999565b6102746109ef565b610305610330366004613958565b610a7c565b610274610b1e565b60015460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610229565b610274610373366004613958565b610bc0565b610274610386366004613912565b610c46565b610274610399366004613958565b610cf3565b6102e56103ac366004613958565b610d79565b6102e56103bf366004613958565b610ddb565b6102746103d23660046138d8565b610e3b565b6102e56103e536600461385e565b610eed565b6102746103f8366004613958565b610f64565b61030561040b366004613958565b610ff1565b61027461041e366004613958565b611093565b6102746104313660046139b6565b611119565b6102746111ce565b6102e56113a6565b601b5460ff1661024f565b6102b46113fc565b6102b461046736600461398a565b61140b565b61027461047a36600461385e565b611df2565b6104a360405180606001604052806060815260200160608152602001606081525090565b60408051601f80546080602082028401810190945260608301818152929391928492909184918401828280156104f857602002820191906000526020600020905b8154815260200190600101908083116104e4575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561055057602002820191906000526020600020905b81548152602001906001019080831161053c575b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156105a857602002820191906000526020600020905b815481526020019060010190808311610594575b505050505081525050905090565b6000600e60006105c560025490565b815260208101919091526040016000205460ff16919050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610664576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b601b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff163314610719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b601b80547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1661010073ffffffffffffffffffffffffffffffffffffffff94851602179055601c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b6000600d600061079c60025490565b815260200190815260200160002054905090565b60015473ffffffffffffffffffffffffffffffffffffffff163314610831576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b6019805460ff909216610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b600061087560025490565b905090565b606060068054806020026020016040519081016040528092919081815260200182805480156108c857602002820191906000526020600020905b8154815260200190600101908083116108b4575b5050505050905090565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601560209081526040808320805482518185028101850190935280835260609492939192909184015b8282101561098e5760008481526020908190206040805160a081018252600586029092018054835260018082015460ff1684860152600282015492840192909252600381015460608401526004015473ffffffffffffffffffffffffffffffffffffffff1660808301529083529092019101610917565b505050509050919050565b606060078054806020026020016040519081016040528092919081815260200182805480156108c857602002820191906000526020600020908154815260200190600101908083116108b4575050505050905090565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b610a7a6000611f23565b565b600081815260136020908152604080832080548251818502810185019093528083526060949293919290918401821561098e5760008481526020908190206040805160a081018252600586029092018054835260018082015460ff1684860152600282015492840192909252600381015460608401526004015473ffffffffffffffffffffffffffffffffffffffff1660808301529083529092019101610917565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b42600d6000610bad60025490565b8152602081019190915260400160002055565b60015473ffffffffffffffffffffffffffffffffffffffff163314610c41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b601855565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ce5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161065b565b610cef8282611f9a565b5050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610d74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b601a55565b600081815260126020908152604091829020805483518184028101840190945280845260609392830182828015610dcf57602002820191906000526020600020905b815481526020019060010190808311610dbb575b50505050509050919050565b600081815260146020908152604091829020805483518184028101840190945280845260609392830182828015610dcf5760200282019190600052602060002090815481526020019060010190808311610dbb5750505050509050919050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b602280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260166020908152604091829020805483518184028101840190945280845260609392830182828015610dcf5760200282019190600052602060002090815481526020019060010190808311610dbb5750505050509050919050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610fe5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b610fee816124b7565b50565b6000818152600c6020908152604080832080548251818502810185019093528083526060949293919290918401821561098e5760008481526020908190206040805160a081018252600586029092018054835260018082015460ff1684860152600282015492840192909252600381015460608401526004015473ffffffffffffffffffffffffffffffffffffffff1660808301529083529092019101610917565b60015473ffffffffffffffffffffffffffffffffffffffff163314611114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b601e55565b60015473ffffffffffffffffffffffffffffffffffffffff16331461119a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b601980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff16331461124f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b601b546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600091610100900473ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b1580156112be57600080fd5b505afa1580156112d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f69190613971565b601b546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815233600482015260248101839052919250610100900473ffffffffffffffffffffffffffffffffffffffff169063a9059cbb90604401602060405180830381600087803b15801561136e57600080fd5b505af1158015611382573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cef91906138f5565b606060058054806020026020016040519081016040528092919081815260200182805480156108c857602002820191906000526020600020908154815260200190600101908083116108b4575050505050905090565b60006010600061079c60025490565b60225460009060ff166114a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f44616e636520526f79616c65206e6f742063757272656e746c7920616374697660448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161065b565b6017546114b08160ff8516613be9565b6114ba9190613ca8565b15611521576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f48474820416d6f756e742063616e6e6f74206265206120646563696d616c0000604482015260640161065b565b601b5460ff9081169083161115611594576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f76657220746865206d6178696d756d206a7569636520616d6f756e74000000604482015260640161065b565b6018546017546115a79060ff8516613be9565b6115b19190613bbd565b601b546040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015261010090910473ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561161e57600080fd5b505afa158015611632573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116569190613971565b10156116be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4e6f7420656e6f7567682048474820696e2077616c6c65742062616c616e6365604482015260640161065b565b601c546040517f6352211e00000000000000000000000000000000000000000000000000000000815260048101859052339173ffffffffffffffffffffffffffffffffffffffff1690636352211e9060240160206040518083038186803b15801561172857600080fd5b505afa15801561173c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117609190613882565b73ffffffffffffffffffffffffffffffffffffffff16148061183c5750601b546040517fe3c998fe000000000000000000000000000000000000000000000000000000008152600481018590523391610100900473ffffffffffffffffffffffffffffffffffffffff169063e3c998fe9060240160206040518083038186803b1580156117ec57600080fd5b505afa158015611800573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118249190613882565b73ffffffffffffffffffffffffffffffffffffffff16145b6118a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e6f7420746865206f776e6572206f6620746f6b656e00000000000000000000604482015260640161065b565b60195460ff16600e60006118b560025490565b815260208101919091526040016000205460ff161080156118f45750600b60006118de60025490565b815260208101919091526040016000205460ff16155b611980576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f526f79616c6520747269676765722063757272656e746c7920696e2070726f6760448201527f726573732e2054727920616761696e20696e2061206d696e7574650000000000606482015260840161065b565b60008381526011602052604081209061199860025490565b815260208101919091526040016000205460ff1615611a13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f416c726561647920656e746572656420696e20636f6d7065746974696f6e0000604482015260640161065b565b60025415801590611a425750600e6000611a2c60025490565b815260208101919091526040016000205460ff16155b15611a6457611a646001611a5560025490565b611a5f9190613c4f565b613136565b601b60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379cc6790336017548560ff16611ab49190613be9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b158015611b1f57600080fd5b505af1158015611b33573d6000803e3d6000fd5b5050601b546018546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019190915261010090910473ffffffffffffffffffffffffffffffffffffffff1692506323b872dd9150606401602060405180830381600087803b158015611bb757600080fd5b505af1158015611bcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bef91906138f5565b50600e6000611bfd60025490565b815260208101919091526040016000908120805460ff1691611c1e83613c88565b91906101000a81548160ff021916908360ff1602179055505060175460106000611c4760025490565b815260200190815260200160002054611c609190613bbd565b60106000611c6d60025490565b8152602001908152602001600020819055506001601160008581526020019081526020016000206000611c9f60025490565b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000611cd4601d54601e546135a5565b90506040518060a00160405280600160ff168152602001611cf460025490565b8152602080820187905260ff8681166040808501919091526017546060948501526000868152600a8452818120865181549085167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00918216178255878601516001808401919091558885015160028085019190915597890151600384018054919097169216919091179094556080909601516004909601959095558354855260148352808520805480840182559086528386200189905588855260128352808520845481548085018355918752848720909101553385526016835284208354815492830182559085529190932090920191909155545b949350505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611e73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161065b565b73ffffffffffffffffffffffffffffffffffffffff8116611f16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161065b565b610fee81611f23565b5490565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000828152600a60205260408120600181015460039091015490919060ff1615611ff8576000848152600a602052604090206003015460ff16611fde816009613c26565b611feb9060ff1685613ca8565b611ff59190613bbd565b90505b601c546000858152600a60205260408082206002015490517fd2e59bfe00000000000000000000000000000000000000000000000000000000815260048101919091529091839173ffffffffffffffffffffffffffffffffffffffff9091169063d2e59bfe9060240160206040518083038186803b15801561207957600080fd5b505afa15801561208d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b19190613934565b61ffff166120bf9190613bbd565b601b54601c546000888152600a60205260408082206002015490517f6352211e00000000000000000000000000000000000000000000000000000000815260048101919091529394509261010090920473ffffffffffffffffffffffffffffffffffffffff90811692911690636352211e9060240160206040518083038186803b15801561214c57600080fd5b505afa158015612160573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121849190613882565b73ffffffffffffffffffffffffffffffffffffffff161461226157601c546000878152600a6020526040908190206002015490517f6352211e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90921691636352211e9161220a9160040190815260200190565b60206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225a9190613882565b905061231e565b601b546000878152600a6020526040908190206002015490517fe3c998fe000000000000000000000000000000000000000000000000000000008152600481019190915261010090910473ffffffffffffffffffffffffffffffffffffffff169063e3c998fe9060240160206040518083038186803b1580156122e357600080fd5b505afa1580156122f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231b9190613882565b90505b600061232a8387613ca8565b600086815260096020908152604080832081516060810183528c8552600a8452828520600290810154825273ffffffffffffffffffffffffffffffffffffffff898116838701908152838601898152855460018082018855968a52888a2095516003909102909501948555905194840180547fffffffffffffffffffffffff000000000000000000000000000000000000000016959092169490941790559151910155888352600f9091528120805492935060ff90921691906123ec83613c88565b82546101009290920a60ff8181021990931691831602179091556000878152600e6020908152604080832054600f909252909120549082169116141590506124ae576019546000868152600e602052604090205460ff91821691161061245a57612455856124b7565b6124ae565b6019546000868152600e602052604090205460ff61010090920482169116108015906124a05750601a546000868152600d602052604090205461249d9042613c4f565b10155b156124ae576124ae856124b7565b50505050505050565b6000818152600b602052604090205460ff1615612530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f426174746c6520616c726561647920636f6d706c657465640000000000000000604482015260640161065b565b61256a604051806060016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b6125a4604051806060016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b6125de604051806060016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b60005b60008581526009602052604090205461ffff82161015612b24576040808501516000878152600960205291909120805461ffff841690811061262557612625613d1a565b90600052602060002090600302016002015411156126bc57600085815260096020526040902080548594935061ffff831690811061266557612665613d1a565b600091825260209182902060408051606081018252600390930290910180548352600181015473ffffffffffffffffffffffffffffffffffffffff1693830193909352600290920154918101919091529350612b12565b6040808501516000878152600960205291909120805461ffff84169081106126e6576126e6613d1a565b906000526020600020906003020160020154141561283f5760008581526009602052604081208054859450612794919061ffff851690811061272a5761272a613d1a565b906000526020600020906003020160000154600960008981526020019081526020016000208461ffff168154811061276457612764613d1a565b600091825260209091206001600390920201015473ffffffffffffffffffffffffffffffffffffffff1684613738565b60ff1611156127c4576000858152600960205260409020805485945061ffff831690811061266557612665613d1a565b6000858152600960205260409020805461ffff83169081106127e8576127e8613d1a565b600091825260209182902060408051606081018252600390930290910180548352600181015473ffffffffffffffffffffffffffffffffffffffff1693830193909352600290920154918101919091529250612b12565b6040808401516000878152600960205291909120805461ffff841690811061286957612869613d1a565b90600052602060002090600302016002015411156128a8576000858152600960205260409020805484935061ffff83169081106127e8576127e8613d1a565b6040808401516000878152600960205291909120805461ffff84169081106128d2576128d2613d1a565b90600052602060002090600302016002015414156129be5760008581526009602052604081208054612913919061ffff851690811061272a5761272a613d1a565b60ff161115612943576000858152600960205260409020805484935061ffff83169081106127e8576127e8613d1a565b6000858152600960205260409020805461ffff831690811061296757612967613d1a565b600091825260209182902060408051606081018252600390930290910180548352600181015473ffffffffffffffffffffffffffffffffffffffff1693830193909352600290920154918101919091529150612b12565b6040808301516000878152600960205291909120805461ffff84169081106129e8576129e8613d1a565b9060005260206000209060030201600201541115612a24576000858152600960205260409020805461ffff831690811061296757612967613d1a565b6040808301516000878152600960205291909120805461ffff8416908110612a4e57612a4e613d1a565b906000526020600020906003020160020154148015612a96575060008581526009602052604081208054612a91919061ffff851690811061272a5761272a613d1a565b60ff16115b15612b12576000858152600960205260409020805461ffff8316908110612abf57612abf613d1a565b600091825260209182902060408051606081018252600390930290910180548352600181015473ffffffffffffffffffffffffffffffffffffffff16938301939093526002909201549181019190915291505b80612b1c81613c66565b9150506125e1565b5060008481526010602052604081205490600a612b42836001613be9565b612b4c9190613bd5565b90506000600a612b5d846002613be9565b612b679190613bd5565b90506000600a612b78856007613be9565b612b829190613bd5565b9050600c60008981526020019081526020016000206040518060a0016040528089600001518152602001600160ff1681526020018a8152602001838152602001896020015173ffffffffffffffffffffffffffffffffffffffff1681525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010160006101000a81548160ff021916908360ff160217905550604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050600c60008981526020019081526020016000206040518060a0016040528088600001518152602001600260ff1681526020018a8152602001848152602001886020015173ffffffffffffffffffffffffffffffffffffffff1681525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010160006101000a81548160ff021916908360ff160217905550604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050600c60008981526020019081526020016000206040518060a0016040528087600001518152602001600360ff1681526020018a8152602001858152602001876020015173ffffffffffffffffffffffffffffffffffffffff1681525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010160006101000a81548160ff021916908360ff160217905550604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506001600b60008a815260200190815260200160002060006101000a81548160ff021916908315150217905550612ee5600280546001019055565b42600d6000612ef360025490565b8152602080820192909252604090810160002092909255601b549087015191517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152602481018690526101009091049091169063a9059cbb90604401602060405180830381600087803b158015612f8757600080fd5b505af1158015612f9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fbf91906138f5565b50601b5460208701516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015260248101859052610100909204169063a9059cbb90604401602060405180830381600087803b15801561303d57600080fd5b505af1158015613051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061307591906138f5565b50601b5460208801516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015260248101849052610100909204169063a9059cbb90604401602060405180830381600087803b1580156130f357600080fd5b505af1158015613107573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061312b91906138f5565b505050505050505050565b60005b6000828152600c602052604090205460ff82161015610cef576000828152600c602052604081208054601392919060ff851690811061317a5761317a613d1a565b9060005260206000209060050201600001548152602001908152602001600020600c60008481526020019081526020016000208260ff16815481106131c1576131c1613d1a565b6000918252602080832084546001818101875595855282852060059485029092018054919094029091019081558483015494810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff9687161790556002808401549082015560038084015490820155600492830154920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155848252600c905260408120805460159385169081106132a1576132a1613d1a565b600091825260208083206004600590930201919091015473ffffffffffffffffffffffffffffffffffffffff1683528281019390935260409182018120858252600c90935220805460ff84169081106132fc576132fc613d1a565b6000918252602080832084546001818101875595855282852060059485029092018054919094029091019081558483015494810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff9687161790556002808401549082015560038084015490820155600492830154920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155848252600c9052604090208054909183169081106133db576133db613d1a565b60009182526020909120600160059092020181015460ff161415613456576000828152600c6020526040902080546005919060ff841690811061342057613420613d1a565b60009182526020808320600592830201548454600181018655948452922090920155805461345091601f916137e3565b50613593565b6000828152600c60205260409020805460ff831690811061347957613479613d1a565b600091825260209091206005909102016001015460ff16600214156134f4576000828152600c6020526040902080546006919060ff84169081106134bf576134bf613d1a565b6000918252602080832060059092029091015483546001810185559383529181902090920155600680546134509291906137e3565b6000828152600c60205260409020805460ff831690811061351757613517613d1a565b600091825260209091206005909102016001015460ff1660031415613593576000828152600c6020526040902080546007919060ff841690811061355d5761355d613d1a565b60009182526020808320600590920290910154835460018101855593835291209091015560078054613591916021916137e3565b505b8061359d81613c88565b915050613139565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001613622929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161364f93929190613a0c565b602060405180830381600087803b15801561366957600080fd5b505af115801561367d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136a191906138f5565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120868452929091526136fb906001613bbd565b6000858152602081815260409182902092909255805180830187905280820184905281518082038301815260609091019091528051910120611dea565b60006002424486868661374a60025490565b604080516020810197909752860194909452606080860193909352911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608084015260f01b7fffff000000000000000000000000000000000000000000000000000000000000166094830152609682015260b6016040516020818303038152906040528051906020012060001c611dea9190613ca8565b8280548282559060005260206000209081019282156138235760005260206000209182015b82811115613823578254825591600101919060010190613808565b5061382f929150613833565b5090565b5b8082111561382f5760008155600101613834565b803560ff8116811461385957600080fd5b919050565b60006020828403121561387057600080fd5b813561387b81613d49565b9392505050565b60006020828403121561389457600080fd5b815161387b81613d49565b600080604083850312156138b257600080fd5b82356138bd81613d49565b915060208301356138cd81613d49565b809150509250929050565b6000602082840312156138ea57600080fd5b813561387b81613d6b565b60006020828403121561390757600080fd5b815161387b81613d6b565b6000806040838503121561392557600080fd5b50508035926020909101359150565b60006020828403121561394657600080fd5b815161ffff8116811461387b57600080fd5b60006020828403121561396a57600080fd5b5035919050565b60006020828403121561398357600080fd5b5051919050565b6000806040838503121561399d57600080fd5b823591506139ad60208401613848565b90509250929050565b6000602082840312156139c857600080fd5b61387b82613848565b600081518084526020808501945080840160005b83811015613a01578151875295820195908201906001016139e5565b509495945050505050565b73ffffffffffffffffffffffffffffffffffffffff8416815260006020848184015260606040840152835180606085015260005b81811015613a5c57858101830151858201608001528201613a40565b81811115613a6e576000608083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160800195945050505050565b602080825282518282018190526000919060409081850190868401855b82811015613b1e578151805185528681015160ff168786015285810151868601526060808201519086015260809081015173ffffffffffffffffffffffffffffffffffffffff169085015260a09093019290850190600101613ac1565b5091979650505050505050565b60208152600061387b60208301846139d1565b602081526000825160606020840152613b5a60808401826139d1565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080858403016040860152613b9683836139d1565b9250604086015191508085840301606086015250613bb482826139d1565b95945050505050565b60008219821115613bd057613bd0613cbc565b500190565b600082613be457613be4613ceb565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613c2157613c21613cbc565b500290565b600060ff821660ff84168160ff0481118215151615613c4757613c47613cbc565b029392505050565b600082821015613c6157613c61613cbc565b500390565b600061ffff80831681811415613c7e57613c7e613cbc565b6001019392505050565b600060ff821660ff811415613c9f57613c9f613cbc565b60010192915050565b600082613cb757613cb7613ceb565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610fee57600080fd5b8015158114610fee57600080fdfea264697066735822122079d634988119b3721d9e925601f032b519051682f05998d8a971ec7362442f4264736f6c63430008070033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.