Contract 0xd0835cfb4504e048cbb72615afc35afc84b774d6

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2ddee05baa6a287074326f0830d43c1f8bdc00064ab2ec4ed6ce2d27edad3fb8Participate Batt...94703842021-07-25 16:42:2763 days 2 hrs ago0xfa5e018df7ded7c16ac2d614709eab5a1b6518b6 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.000720575
0x3e599ac7599ed2c8b3bbacfc57e1867471c570203e89306d8cc63fded830099bParticipate Batt...94703762021-07-25 16:41:5763 days 2 hrs ago0xfa5e018df7ded7c16ac2d614709eab5a1b6518b6 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.000720575
0x60ddfec274913ce1ce5b041d8c38b2d32e43762580ef9fe8068801f47b83261aCreate New Battl...94685392021-07-25 15:06:0863 days 4 hrs ago0x7e559eb141ec53011ba3dc95cca4635e2ee9c39f IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.001199365
0xf38b44bd1d1f08096c8325e1738e9e1550b111eebba48e68ea2485c2dd1c2933Create New Battl...94648672021-07-25 11:57:0663 days 7 hrs ago0x7e559eb141ec53011ba3dc95cca4635e2ee9c39f IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.001199365
0xcfc6245e06c3e2186d17807c3c6b91d3f2ef604fe6cbee7f123ac0d14f6fcdb1Claim Present94423302021-07-24 17:06:2764 days 2 hrs ago0x92ef6eac193c71b271a1edc2f8a13f468c73f73f IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00076159
0x3a13309484eecd1a66beeaf2847b9f4e7fb361ed16dc5e6b99729d79f000eebbClaim Present94408162021-07-24 15:48:4864 days 3 hrs ago0xbf03caf6a23964ac6ca3f2d36d3e3907e4c4a670 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00083659
0xc977710f4eda297645f5b374797bef443c92963ff8f76fd047735068c6cbacabComplete Battle94407792021-07-24 15:46:5764 days 3 hrs ago0x7e559eb141ec53011ba3dc95cca4635e2ee9c39f IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00083359
0xb92807a5125ff9768cbb9c81e2443364e12429d77fd177ed27391e4e57b7d758Participate Batt...94406822021-07-24 15:41:5664 days 3 hrs ago0xbf03caf6a23964ac6ca3f2d36d3e3907e4c4a670 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00078459
0x5c8f72c3d4f9b807ccbc5294e5868bd749829ce752627cfc2634457d4faddef1Participate Batt...94406682021-07-24 15:41:1364 days 3 hrs ago0x3df407a2105393a23af3fa6fcf34bd1bf7bb39d4 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00077006
0x97d3d39b087de4855159dc40352b8b9116f2c5274595c5ee923ec1a6732344bfParticipate Batt...94404732021-07-24 15:31:2864 days 3 hrs ago0x8b0f658781ca00adc7ff19c73f0b989cb8f51113 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.000336435
0x1103da0307ab13426a1493ca12fc7adc865ceb89a3ecf084871a47ddf768459bParticipate Batt...94404312021-07-24 15:29:1764 days 3 hrs ago0x8b0f658781ca00adc7ff19c73f0b989cb8f51113 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00075553
0x98479baa2f631673361db8dbd9f1e7e20f8ccb54005f9164d8c4872d261737e7Participate Batt...94404112021-07-24 15:28:1764 days 3 hrs ago0x3d500c3cc68569cce2da3ece0c9870d515185068 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.000741
0x5ac5b9b25f43928b5d3dfe4b50a3a70457f4ce0a44120fcba3675e04942c82b2Participate Batt...94398332021-07-24 14:56:5764 days 4 hrs ago0x7dad9503dd410c215ab765e027323cb82f971305 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00072647
0x19d4c0b2039beaaa62cb386c6dc54faaed8f521f88b4e4524ca14b5d5b4012eaParticipate Batt...94397092021-07-24 14:50:4464 days 4 hrs ago0x54fc4dfed03c1b0bbfdc60e46a780bcbf42b2988 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00071194
0x6f489e923358bcb6a9bb04b1024ee39ea4ebbc0267cd78bb00b551e52631bd82Participate Batt...94388992021-07-24 14:09:0564 days 5 hrs ago0x35fa54663d7295e319a712850906b871dd1258a7 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00069741
0x4b9418d932af51159a55cc4abb4b61e544b259d26b2b0250959a00ce8203f728Participate Batt...94385172021-07-24 13:49:3364 days 5 hrs ago0x54453804695801f38741442617fc956a3a2e99cc IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00068288
0xc5487505113b6ecce2727985c122cc99542e5b428c4c21e640ad7c255d3686b2Participate Batt...94380482021-07-24 13:25:2364 days 5 hrs ago0x95ec69b2a3ffb389a9a204b2a2ef3288b9604170 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00066835
0x19b60cd2589500521291130e147f73537b1083e7466e123812eec35097bab680Participate Batt...94379292021-07-24 13:19:2564 days 5 hrs ago0x44ffc02bef6ff3971a3e57c8e1e686010901b8a3 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00080382
0x2d50b19d2f4c85b53523ea13ce858ebce05b59373c8d48303283b1c1920858a7Complete Battle94376952021-07-24 13:07:3764 days 6 hrs ago0x7e559eb141ec53011ba3dc95cca4635e2ee9c39f IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00090853
0x69b8547d988ae03d6070cec0cc716b997bd4d1fdabcac21c143ea6dba122653cCreate New Battl...94373552021-07-24 12:50:2564 days 6 hrs ago0x7e559eb141ec53011ba3dc95cca4635e2ee9c39f IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.001199365
0xb8c2c7fa99b2dc3aaf1ac9fd341a96bf84ec556ac534b3089a10e06c06da570bComplete Battle94372852021-07-24 12:46:5564 days 6 hrs ago0x7e559eb141ec53011ba3dc95cca4635e2ee9c39f IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.0003126
0x65b100df785c0bbec34ba359ffb1316923e1420074ce4a339ef6723f023941f6Participate Batt...94371862021-07-24 12:41:5864 days 6 hrs ago0x92ef6eac193c71b271a1edc2f8a13f468c73f73f IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.000741
0xc4046c89123594ba9c336cf960bc81bb61bc68f6bb93b696457632d62df3108cParticipate Batt...94371122021-07-24 12:38:1664 days 6 hrs ago0x44ffc02bef6ff3971a3e57c8e1e686010901b8a3 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00072647
0x8bb9fdf2ecbd0f129220eb7361e6e3e072b6d22805fe7bc7821bff826a7a6b82Participate Batt...94366412021-07-24 12:14:3164 days 7 hrs ago0x54453804695801f38741442617fc956a3a2e99cc IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00071194
0x3e9156f70dee9feafbc0d6c07fa86a8457af503666e2e2c19127c4f541a225d4Participate Batt...94363082021-07-24 11:57:5264 days 7 hrs ago0x95ec69b2a3ffb389a9a204b2a2ef3288b9604170 IN  0xd0835cfb4504e048cbb72615afc35afc84b774d60 BNB0.00069741
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BattleContract

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 8 : BattleContract.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./INFTContract.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/dev/VRFConsumerBase.sol";

contract BattleContract is VRFConsumerBase, Ownable {
    enum STATUS {
        READY,
        END
    }
    struct Battle {
        uint256 id;
        string uri;
        uint256 startTime;
        uint256 endTime;
        uint256 level;
        uint256 award;
        STATUS status;
    }

    struct Participant {
        uint256 nftId;
        address nftOwner;
        bool isClaimedNFT;
        bool isClaimedGFX;
    }

    uint256 internal BATTLE_TIME = 1 minutes;

    Battle[] public battles;
    uint256 public battlesCount;

    // BattleLevel => Battle ID
    mapping(uint256 => uint256) public battlesByLevel;

    // BattleLevel => Battles Count
    mapping(uint256 => uint256) public battlesCountByLevel;

    // BattleId => Participant[]
    mapping(uint256 => Participant[]) public participants;

    // BattleId => Number of Participants
    mapping(uint256 => uint256) public participantsCount;

    // BattleID => Winner
    mapping(uint256 => Participant) public battleHistories;

    // Chainlink RNG
    bytes32 internal keyHash;
    uint256 internal fee;
    address internal requester;

    // Chainlink Request Id => Battle ID
    uint256 public currentBattleId;
    mapping(bytes32 => uint256) public requestBattleIds;
    mapping(uint256 => uint256) public battleRandomness;
    mapping(uint256 => uint256) public battleWinnerIndexes;

    // Contract Interfaces
    IERC20 internal gfx_;
    INFTContract internal nft_;

    // -------------- Event Trigers -----------------
    /**
     * @param battleId Battle Id
     * @param uri Battle URI
     * @param level Battle level
     * @param award Battle GFX Award
     * @param startTime Battle start timestamp
     * @param endTime Battle end timestamp
     */
    event NewBattleCreated(
        uint256 battleId,
        string uri,
        uint256 level,
        uint256 award,
        uint256 startTime,
        uint256 endTime
    );

    /**
     * @param battleId Battle Id
     * @param nftId New Participant NFT id
     * @param total number of participant
     */
    event NewParticipantJoined(uint256 battleId, uint256 nftId, uint256 total);

    /**
     * @param battleId Battle Id
     */
    event CompleteBattle(uint256 battleId);

    /**
     * @param battleId Battle Id
     * @param nftId Winner NFT Id
     */
    event NewWinner(uint256 battleId, uint256 nftId, address nftOwner);

    /**
     * @param nftId Claimed NFT Id
     * @param nftOwner NFT Owner Address
     * @param amount GFX Amount
     */
    event ClaimedGFX(uint256 nftId, address nftOwner, uint256 amount);

    /**
     * @param nftId Claimed NFT Id
     * @param nftOwner NFT Owner Address
     */
    event ClaimedNFT(uint256 nftId, address nftOwner);

    event RequestRNG(uint256 battleId, bytes32 requestId);

    event ResponseRNG(uint256 battleId, uint256 randomness, bytes32 requestId);

    /**
     * BattleContract constructor
     * @param _vrfCoordinator address of Chainlink VRFCoordinator
     * @param _linkToken address of Chainlink Token Address
     * @param _keyHash hash
     */
    constructor(
        address _vrfCoordinator,
        address _linkToken,
        bytes32 _keyHash
    ) VRFConsumerBase(_vrfCoordinator, _linkToken) {
        keyHash = _keyHash;
        fee = 0.2 * (10**18);

        battlesCount = 0;
    }

    /**
     * Initalize Interfaces
     * @param _nft NFTContract address
     * @param _gfx GFX Token Contract address
     */
    function initialize(address _nft, address _gfx) external onlyOwner {
        gfx_ = IERC20(_gfx);
        nft_ = INFTContract(_nft);
    }

    // ---------------------------------------- Modifiers ------------------------------------
    /**
     * Validate Battle ID
     * @param _battleId Battle ID
     */
    modifier _checkValidBattleId(uint256 _battleId) {
        require(
            _battleId < battlesCount,
            "BattleContract: _battleId is invalid number"
        );
        _;
    }

    /**
     * Validate NFT Owner
     * @param _nftId NFT ID
     */
    modifier _onlyOwner(uint256 _nftId) {
        address nftOwner = nft_.ownerOf(_nftId);
        require(
            msg.sender == nftOwner,
            "BattleContract: You are not NFT owner"
        );
        _;
    }

    /**
     * Can participate battle
     * @param _battleId Battle ID
     * @param _nftId NFT ID
     */
    modifier _canParticipateBattle(uint256 _battleId, uint256 _nftId) {
        Battle memory battle = battles[_battleId];
        require(
            battle.startTime >= block.timestamp,
            "BattleContract: Not able to Join Battle"
        );
        require(
            battle.status == STATUS.READY,
            "BattleContract: Battle had already been ended"
        );

        address nftOwner = nft_.ownerOf(_nftId);
        bool wasParticipated = false;
        for (uint256 i = 0; i < participantsCount[_battleId]; i++) {
            if (participants[_battleId][i].nftOwner == nftOwner) {
                wasParticipated = true;
            }
        }

        require(!wasParticipated, "BattleContract: Already participated");
        _;
    }

    /**
     * Can complete battle
     * @param _battleId Battle ID
     */
    modifier _canCompleteBattle(uint256 _battleId) {
        Battle memory battle = battles[_battleId];
        require(
            battle.endTime <= block.timestamp,
            "BattleContract: Not able to complete Battle"
        );
        require(
            battle.status == STATUS.READY,
            "BattleContract: Battle had already been ended"
        );
        _;
    }

    /**
     * Check winner
     * @param _battleId Battle ID
     */
    modifier _isWinner(uint256 _battleId) {
        Participant memory winner = battleHistories[_battleId];
        require(
            winner.nftOwner == msg.sender,
            "BattleContract: You are not a winner"
        );
        _;
    }

    // ----------------------------------------- Private Functions -------------------------------
    /**
     * Generate Random Number by Chainlink VRF
     * @param _battleId Battle ID
     */
    function _generateRandomNumber(uint256 _battleId, uint256 _seed) private {
        require(keyHash != bytes32(0), "Must have valid key hash");
        require(
            LINK.balanceOf(address(this)) >= fee,
            "Not enough LINK - fill contract with faucet"
        );

        currentBattleId = _battleId;

        bytes32 requestId = requestRandomness(keyHash, fee, _seed);

        emit RequestRNG(_battleId, requestId);

        requestBattleIds[requestId] = _battleId + 1;
    }

    /**
     * Chainlink VRF RNG Callback
     * @param requestId Request ID
     * @param randomness Random Number
     */
    function fulfillRandomness(bytes32 requestId, uint256 randomness)
        internal
        override
    {
        emit ResponseRNG(currentBattleId, randomness, requestId);

        require(
            currentBattleId >= 0,
            "BattleContract: Invalid Chainlink Request"
        );

        battleRandomness[currentBattleId] = randomness;
        battleWinnerIndexes[currentBattleId] = randomness;
        uint256 winnerIndex = randomness % participantsCount[currentBattleId];

        Participant memory participant = participants[currentBattleId][
            winnerIndex
        ];
        battleHistories[currentBattleId] = participant;

        // _burnNFT(currentBattleId, winnerIndex);

        nft_.setNFTLevelUp(participant.nftId);
        nft_.setNFTURI(participant.nftId, battles[currentBattleId].uri);

        emit NewWinner(
            currentBattleId,
            participant.nftId,
            participant.nftOwner
        );
    }

    /**
     * Burn Lose NFTs
     * @param _battleId Battle ID
     * @param _winnerIndex Winner Index of participants
     */
    function _burnNFT(uint256 _battleId, uint256 _winnerIndex) private {
        for (uint256 i = 0; i < participantsCount[_battleId]; i++) {
            if (_winnerIndex != i) {
                nft_.burnNFT(participants[_battleId][i].nftId);
            }
        }
    }

    // ------------------------------------------ Public Functions -------------------------------
    /**
     * Create New Battle
     * @param _uri Battle URI
     * @param _level Battle Level
     * @param _award Battle GFX Award
     * @param _startTime Battle Start Time
     */
    function createNewBattle(
        string memory _uri,
        uint256 _level,
        uint256 _award,
        uint256 _startTime
    ) public onlyOwner returns (uint256) {
        require(
            _startTime > block.timestamp,
            "BattleContract: StartTime is over"
        );

        Battle memory battle;
        battle.id = battlesCount;
        battle.uri = _uri;
        battle.level = _level;
        battle.award = _award;
        battle.startTime = _startTime;
        battle.endTime = _startTime + BATTLE_TIME;
        battle.status = STATUS.READY;

        battles.push(battle);
        battlesCount++;

        // Sort battles by level
        battlesByLevel[_level] = battle.id;
        battlesCountByLevel[_level]++;

        // Initialize the number of battle participants
        participantsCount[battle.id] = 0;
        // Trigger newBattleCreated event
        emit NewBattleCreated(
            battle.id,
            battle.uri,
            battle.level,
            battle.award,
            battle.startTime,
            battle.endTime
        );

        return battle.id;
    }

    /**
     * Participate Battle
     * @param _battleId Battle ID
     * @param _nftId NFT ID
     */
    function participateBattle(uint256 _battleId, uint256 _nftId)
        public
        _checkValidBattleId(_battleId)
        _onlyOwner(_nftId)
        _canParticipateBattle(_battleId, _nftId)
    {
        Participant memory participant;
        participant.nftId = _nftId;
        participant.nftOwner = nft_.ownerOf(_nftId);
        participant.isClaimedNFT = false;
        participant.isClaimedGFX = false;

        participants[_battleId].push(participant);
        participantsCount[_battleId]++;

        nft_.transferNFT(address(this), _nftId);

        emit NewParticipantJoined(
            _battleId,
            _nftId,
            participantsCount[_battleId]
        );
    }

    /**
     * Complete Battle
     * @param _battleId Battle ID
     */
    function completeBattle(uint256 _battleId, uint256 _seed)
        public
        onlyOwner
        _checkValidBattleId(_battleId)
        _canCompleteBattle(_battleId)
    {
        battles[_battleId].status = STATUS.END;

        if (participantsCount[_battleId] > 0) {
            _generateRandomNumber(_battleId, _seed);
        }

        emit CompleteBattle(_battleId);
    }

    /**
     * Claim NFT
     * @param _battleId Battle ID
     */
    function _claimNFT(uint256 _battleId) private {
        Participant storage winner = battleHistories[_battleId];
        require(!winner.isClaimedNFT, "BattleContract: Already Claimed NFT");

        nft_.transferNFT(winner.nftOwner, winner.nftId);
        winner.isClaimedNFT = true;

        emit ClaimedNFT(winner.nftId, winner.nftOwner);
    }

    /**
     * Claim GFX Award
     * @param _battleId Battle ID
     */
    function _claimGFX(uint256 _battleId) private {
        Participant storage winner = battleHistories[_battleId];
        require(!winner.isClaimedGFX, "BattleContract: Already Claimed GFX");

        uint256 amount = battles[_battleId].award * (10**18);
        gfx_.transfer(winner.nftOwner, amount);
        winner.isClaimedGFX = true;

        emit ClaimedGFX(
            winner.nftId,
            winner.nftOwner,
            battles[_battleId].award
        );
    }

    /**
     * Claim
     * @param _battleId Battle ID
     */
    function claimPresent(uint256 _battleId) public _isWinner(_battleId) {
        Participant memory winner = battleHistories[_battleId];
        require(
            !winner.isClaimedGFX && !winner.isClaimedNFT,
            "BattleContract: Already Claimed"
        );

        _claimNFT(_battleId);
        _claimGFX(_battleId);
    }

    /**
     * Refund all of NFTs
     * @param _battleId Battle ID
     */
    function refundNFTs(uint256 _battleId) public onlyOwner {
        Participant[] storage nfts = participants[_battleId];
        for (uint256 i = 0; i < nfts.length; i++) {
            if (!nfts[i].isClaimedNFT) {
                nft_.transferNFT(nfts[i].nftOwner, nfts[i].nftId);
                nfts[i].isClaimedNFT = true;

                emit ClaimedNFT(nfts[i].nftId, nfts[i].nftOwner);
            }
        }

        battleHistories[_battleId].isClaimedNFT = true;
    }

    // function mintTestNFT(uint256 _nftCount, address _owner) public onlyOwner {
    //     for (uint256 i = 0; i < _nftCount; i++) {
    //         nft_.mint(_owner, "test-nft", "test-nft-link");
    //     }
    // }

    // function participateTestNFT(
    //     uint256 _battleId,
    //     uint256 _start,
    //     uint256 _end
    // ) public onlyOwner {
    //     for (uint256 i = _start; i < _end; i++) {
    //         participateBattle(_battleId, i);
    //     }
    // }
}

File 2 of 8 : INFTContract.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

interface INFTContract {
    function nfts(uint256 nftId)
        external
        view
        returns (
            uint256,
            string memory,
            string memory,
            uint256,
            bool,
            uint256
        );

    function nftOwners(uint256 nftId) external view returns (address);

    function mint(
        address _from,
        string memory _name,
        string memory _uri
    ) external;

    function burnNFT(uint256 _nftId) external;

    function transferNFT(address _to, uint256 _nftId) external;

    function getNFTLevelById(uint256 _nftId) external returns (uint256);

    function getNFTById(uint256 _nftId)
        external
        returns (
            uint256,
            string memory,
            string memory,
            uint256
        );

    function setNFTLevelUp(uint256 _nftId) external;

    function setNFTURI(uint256 _nftId, string memory _uri) external;

    function ownerOf(uint256 _nftId) external returns (address);

    function balanceOf(address _from) external returns (uint256);
}

File 3 of 8 : 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;

  /**
   * @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
   * @param _seed seed mixed into the input of the VRF.
   *
   * @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,
    uint256 _seed
  )
    internal
    returns (
      bytes32 requestId
    )
  {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, _seed));
    // 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, _seed, 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);
  }
}

File 4 of 8 : 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 5 of 8 : 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 6 of 8 : 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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 7 of 8 : 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 8 of 8 : 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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "evmVersion": "berlin",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_linkToken","type":"address"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":false,"internalType":"address","name":"nftOwner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimedGFX","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":false,"internalType":"address","name":"nftOwner","type":"address"}],"name":"ClaimedNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"battleId","type":"uint256"}],"name":"CompleteBattle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"battleId","type":"uint256"},{"indexed":false,"internalType":"string","name":"uri","type":"string"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"award","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"NewBattleCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"battleId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"NewParticipantJoined","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"battleId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":false,"internalType":"address","name":"nftOwner","type":"address"}],"name":"NewWinner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"battleId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"RequestRNG","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"battleId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randomness","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"ResponseRNG","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"battleHistories","outputs":[{"internalType":"uint256","name":"nftId","type":"uint256"},{"internalType":"address","name":"nftOwner","type":"address"},{"internalType":"bool","name":"isClaimedNFT","type":"bool"},{"internalType":"bool","name":"isClaimedGFX","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"battleRandomness","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"battleWinnerIndexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"battles","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"award","type":"uint256"},{"internalType":"enum BattleContract.STATUS","name":"status","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"battlesByLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"battlesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"battlesCountByLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_battleId","type":"uint256"}],"name":"claimPresent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_battleId","type":"uint256"},{"internalType":"uint256","name":"_seed","type":"uint256"}],"name":"completeBattle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"},{"internalType":"uint256","name":"_level","type":"uint256"},{"internalType":"uint256","name":"_award","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"createNewBattle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentBattleId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nft","type":"address"},{"internalType":"address","name":"_gfx","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"participants","outputs":[{"internalType":"uint256","name":"nftId","type":"uint256"},{"internalType":"address","name":"nftOwner","type":"address"},{"internalType":"bool","name":"isClaimedNFT","type":"bool"},{"internalType":"bool","name":"isClaimedGFX","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"participantsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_battleId","type":"uint256"},{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"participateBattle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_battleId","type":"uint256"}],"name":"refundNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requestBattleIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052603c6002553480156200001657600080fd5b50604051620044763803806200447683398181016040528101906200003c9190620001bc565b82828173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505050506000620000c06200018660201b60201c565b905080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35080600a819055506702c68af0bb140000600b8190555060006004819055505050506200028f565b600033905090565b6000815190506200019f816200025b565b92915050565b600081519050620001b68162000275565b92915050565b600080600060608486031215620001d857620001d762000256565b5b6000620001e8868287016200018e565b9350506020620001fb868287016200018e565b92505060406200020e86828701620001a5565b9150509250925092565b6000620002258262000236565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620002668162000218565b81146200027257600080fd5b50565b62000280816200022c565b81146200028c57600080fd5b50565b60805160601c60a05160601c6141ad620002c960003960008181611c4c015261288e015260008181611f2f015261285201526141ad6000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c8063606d2e96116100b85780638da5cb5b1161007c5780638da5cb5b1461036a57806394985ddd14610388578063baea80f2146103a4578063d932c7a9146103d4578063ed4927f814610404578063f2fde38b1461043457610137565b8063606d2e96146102975780636dcee204146102cd5780636eccc0c5146102fd578063715018a61461032d57806381fb1fb41461033757610137565b806332c18c1e116100ff57806332c18c1e146101f5578063467aa5b61461021157806346f061b514610241578063485cc9551461025d57806352ca29261461027957610137565b806305b6b4451461013c578063066e0144146101585780630ef2e8571461017457806311c9080d146101a45780632efcd19a146101c2575b600080fd5b61015660048036038101906101519190612e4e565b610450565b005b610172600480360381019061016d9190612df4565b6107a7565b005b61018e60048036038101906101899190612df4565b610a9c565b60405161019b9190613588565b60405180910390f35b6101ac610ab4565b6040516101b99190613588565b60405180910390f35b6101dc60048036038101906101d79190612df4565b610aba565b6040516101ec94939291906135cc565b60405180910390f35b61020f600480360381019061020a9190612df4565b610b24565b005b61022b60048036038101906102269190612d04565b610d72565b6040516102389190613588565b60405180910390f35b61025b60048036038101906102569190612e4e565b610d8a565b005b61027760048036038101906102729190612c97565b611582565b005b610281611684565b60405161028e9190613588565b60405180910390f35b6102b160048036038101906102ac9190612df4565b61168a565b6040516102c497969594939291906136d9565b60405180910390f35b6102e760048036038101906102e29190612d71565b611771565b6040516102f49190613588565b60405180910390f35b61031760048036038101906103129190612df4565b611a44565b6040516103249190613588565b60405180910390f35b610335611a5c565b005b610351600480360381019061034c9190612e4e565b611b99565b60405161036194939291906135cc565b60405180910390f35b610372611c20565b60405161037f9190613278565b60405180910390f35b6103a2600480360381019061039d9190612d31565b611c4a565b005b6103be60048036038101906103b99190612df4565b611ce6565b6040516103cb9190613588565b60405180910390f35b6103ee60048036038101906103e99190612df4565b611cfe565b6040516103fb9190613588565b60405180910390f35b61041e60048036038101906104199190612df4565b611d16565b60405161042b9190613588565b60405180910390f35b61044e60048036038101906104499190612c3d565b611d2e565b005b610458611eda565b73ffffffffffffffffffffffffffffffffffffffff16610476611c20565b73ffffffffffffffffffffffffffffffffffffffff16146104cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c3906134a8565b60405180910390fd5b816004548110610511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050890613568565b60405180910390fd5b8260006003828154811061052857610527613bdd565b5b90600052602060002090600702016040518060e00160405290816000820154815260200160018201805461055b90613a30565b80601f016020809104026020016040519081016040528092919081815260200182805461058790613a30565b80156105d45780601f106105a9576101008083540402835291602001916105d4565b820191906000526020600020905b8154815290600101906020018083116105b757829003601f168201915b50505050508152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff16600181111561062a57610629613b7f565b5b600181111561063c5761063b613b7f565b5b8152505090504281606001511115610689576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068090613468565b60405180910390fd5b6000600181111561069d5761069c613b7f565b5b8160c0015160018111156106b4576106b3613b7f565b5b146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90613548565b60405180910390fd5b60016003868154811061070a57610709613bdd565b5b906000526020600020906007020160060160006101000a81548160ff0219169083600181111561073d5761073c613b7f565b5b0217905550600060086000878152602001908152602001600020541115610769576107688585611ee2565b5b7f355b1e0da419991038d01846b3896ad22f5297e0bf95c7732de62f26d758f79a856040516107989190613588565b60405180910390a15050505050565b6107af611eda565b73ffffffffffffffffffffffffffffffffffffffff166107cd611c20565b73ffffffffffffffffffffffffffffffffffffffff1614610823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081a906134a8565b60405180910390fd5b600060076000838152602001908152602001600020905060005b8180549050811015610a685781818154811061085c5761085b613bdd565b5b906000526020600020906002020160010160149054906101000a900460ff16610a5557601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166394ab67fe8383815481106108d0576108cf613bdd565b5b906000526020600020906002020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684848154811061091557610914613bdd565b5b9060005260206000209060020201600001546040518363ffffffff1660e01b8152600401610944929190613293565b600060405180830381600087803b15801561095e57600080fd5b505af1158015610972573d6000803e3d6000fd5b50505050600182828154811061098b5761098a613bdd565b5b906000526020600020906002020160010160146101000a81548160ff0219169083151502179055507f6c31918c2dabe0275b23bef69f1a9e93053553a1e9fc048dde2389137628a8dd8282815481106109e7576109e6613bdd565b5b906000526020600020906002020160000154838381548110610a0c57610a0b613bdd565b5b906000526020600020906002020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051610a4c9291906135a3565b60405180910390a15b8080610a6090613a93565b91505061083d565b5060016009600084815260200190815260200160002060010160146101000a81548160ff0219169083151502179055505050565b60086020528060005260406000206000915090505481565b60045481565b60096020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900460ff16908060010160159054906101000a900460ff16905084565b80600060096000838152602001908152602001600020604051806080016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160149054906101000a900460ff161515151581526020016001820160159054906101000a900460ff16151515158152505090503373ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff1614610c4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4690613448565b60405180910390fd5b600060096000858152602001908152602001600020604051806080016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160149054906101000a900460ff161515151581526020016001820160159054906101000a900460ff16151515158152505090508060600151158015610d1b57508060400151155b610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d51906134c8565b60405180910390fd5b610d6384612093565b610d6c84612235565b50505050565b600e6020528060005260406000206000915090505481565b816004548110610dcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc690613568565b60405180910390fd5b816000601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610e2d9190613588565b602060405180830381600087803b158015610e4757600080fd5b505af1158015610e5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7f9190612c6a565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee6906133a8565b60405180910390fd5b8484600060038381548110610f0757610f06613bdd565b5b90600052602060002090600702016040518060e001604052908160008201548152602001600182018054610f3a90613a30565b80601f0160208091040260200160405190810160405280929190818152602001828054610f6690613a30565b8015610fb35780601f10610f8857610100808354040283529160200191610fb3565b820191906000526020600020905b815481529060010190602001808311610f9657829003601f168201915b50505050508152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff16600181111561100957611008613b7f565b5b600181111561101b5761101a613b7f565b5b8152505090504281604001511015611068576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105f90613508565b60405180910390fd5b6000600181111561107c5761107b613b7f565b5b8160c00151600181111561109357611092613b7f565b5b146110d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ca90613548565b60405180910390fd5b6000601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016111309190613588565b602060405180830381600087803b15801561114a57600080fd5b505af115801561115e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111829190612c6a565b90506000805b6008600087815260200190815260200160002054811015611245578273ffffffffffffffffffffffffffffffffffffffff166007600088815260200190815260200160002082815481106111df576111de613bdd565b5b906000526020600020906002020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561123257600191505b808061123d90613a93565b915050611188565b508015611287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127e90613428565b60405180910390fd5b61128f612a1b565b89816000018181525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8b6040518263ffffffff1660e01b81526004016112f49190613588565b602060405180830381600087803b15801561130e57600080fd5b505af1158015611322573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113469190612c6a565b816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008160400190151590811515815250506000816060019015159081151581525050600760008c81526020019081526020016000208190806001815401808255809150506001900390600052602060002090600202016000909190919091506000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160146101000a81548160ff02191690831515021790555060608201518160010160156101000a81548160ff0219169083151502179055505050600860008c8152602001908152602001600020600081548092919061149390613a93565b9190505550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166394ab67fe308c6040518363ffffffff1660e01b81526004016114f5929190613293565b600060405180830381600087803b15801561150f57600080fd5b505af1158015611523573d6000803e3d6000fd5b505050507f1a83a56a1914df8ca01fc5968d31168323874712d2a895b994f291cc7ed2ad228b8b600860008f81526020019081526020016000205460405161156d939291906137ed565b60405180910390a15050505050505050505050565b61158a611eda565b73ffffffffffffffffffffffffffffffffffffffff166115a8611c20565b73ffffffffffffffffffffffffffffffffffffffff16146115fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f5906134a8565b60405180910390fd5b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600d5481565b6003818154811061169a57600080fd5b90600052602060002090600702016000915090508060000154908060010180546116c390613a30565b80601f01602080910402602001604051908101604052809291908181526020018280546116ef90613a30565b801561173c5780601f106117115761010080835404028352916020019161173c565b820191906000526020600020905b81548152906001019060200180831161171f57829003601f168201915b5050505050908060020154908060030154908060040154908060050154908060060160009054906101000a900460ff16905087565b600061177b611eda565b73ffffffffffffffffffffffffffffffffffffffff16611799611c20565b73ffffffffffffffffffffffffffffffffffffffff16146117ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e6906134a8565b60405180910390fd5b428211611831576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611828906133e8565b60405180910390fd5b611839612a5d565b60045481600001818152505085816020018190525084816080018181525050838160a0018181525050828160400181815250506002548361187a91906138c7565b81606001818152505060008160c00190600181111561189c5761189b613b7f565b5b908160018111156118b0576118af613b7f565b5b815250506003819080600181540180825580915050600190039060005260206000209060070201600090919091909150600082015181600001556020820151816001019080519060200190611906929190612aac565b5060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff0219169083600181111561195a57611959613b7f565b5b021790555050506004600081548092919061197490613a93565b9190505550806000015160056000878152602001908152602001600020819055506006600086815260200190815260200160002060008154809291906119b990613a93565b919050555060006008600083600001518152602001908152602001600020819055507f2bcd615b05d13e16f538eaa5f186a58061aa31cca7698f760b23016e09af37c58160000151826020015183608001518460a0015185604001518660600151604051611a2c96959493929190613671565b60405180910390a18060000151915050949350505050565b60066020528060005260406000206000915090505481565b611a64611eda565b73ffffffffffffffffffffffffffffffffffffffff16611a82611c20565b73ffffffffffffffffffffffffffffffffffffffff1614611ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611acf906134a8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60076020528160005260406000208181548110611bb557600080fd5b9060005260206000209060020201600091509150508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900460ff16908060010160159054906101000a900460ff16905084565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ccf906134e8565b60405180910390fd5b611ce28282612459565b5050565b600f6020528060005260406000206000915090505481565b60106020528060005260406000206000915090505481565b60056020528060005260406000206000915090505481565b611d36611eda565b73ffffffffffffffffffffffffffffffffffffffff16611d54611c20565b73ffffffffffffffffffffffffffffffffffffffff1614611daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da1906134a8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611e1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e1190613388565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b6000801b600a541415611f2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2190613408565b60405180910390fd5b600b547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611f869190613278565b60206040518083038186803b158015611f9e57600080fd5b505afa158015611fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd69190612e21565b1015612017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161200e906133c8565b60405180910390fd5b81600d81905550600061202f600a54600b548461284e565b90507f902ecdb4b3d8716de536dc14928f87708c4d337d79055d63593d86f1f0f213788382604051612062929190613648565b60405180910390a160018361207791906138c7565b600e600083815260200190815260200160002081905550505050565b60006009600083815260200190815260200160002090508060010160149054906101000a900460ff16156120fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f390613368565b60405180910390fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166394ab67fe8260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683600001546040518363ffffffff1660e01b8152600401612181929190613293565b600060405180830381600087803b15801561219b57600080fd5b505af11580156121af573d6000803e3d6000fd5b5050505060018160010160146101000a81548160ff0219169083151502179055507f6c31918c2dabe0275b23bef69f1a9e93053553a1e9fc048dde2389137628a8dd81600001548260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516122299291906135a3565b60405180910390a15050565b60006009600083815260200190815260200160002090508060010160159054906101000a900460ff161561229e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161229590613488565b60405180910390fd5b6000670de0b6b3a7640000600384815481106122bd576122bc613bdd565b5b9060005260206000209060070201600501546122d9919061391d565b9050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b815260040161235c929190613293565b602060405180830381600087803b15801561237657600080fd5b505af115801561238a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ae9190612cd7565b5060018260010160156101000a81548160ff0219169083151502179055507f847a5a1009a8dd0cbd2676d5fc06bdc0513932143a23d5623fe4ecf17829999482600001548360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166003868154811061242b5761242a613bdd565b5b90600052602060002090600702016005015460405161244c93929190613611565b60405180910390a1505050565b7ff60e18ead2b359c9323cf5d7f9c84ccfb59933b8772d4494c18b959058d28e2f600d54828460405161248e939291906137b6565b60405180910390a16000600d5410156124dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124d390613528565b60405180910390fd5b80600f6000600d548152602001908152602001600020819055508060106000600d54815260200190815260200160002081905550600060086000600d54815260200190815260200160002054826125339190613af0565b9050600060076000600d548152602001908152602001600020828154811061255e5761255d613bdd565b5b9060005260206000209060020201604051806080016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160149054906101000a900460ff161515151581526020016001820160159054906101000a900460ff16151515158152505090508060096000600d5481526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160146101000a81548160ff02191690831515021790555060608201518160010160156101000a81548160ff021916908315150217905550905050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a27fd44782600001516040518263ffffffff1660e01b81526004016127189190613588565b600060405180830381600087803b15801561273257600080fd5b505af1158015612746573d6000803e3d6000fd5b50505050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638823468f82600001516003600d54815481106127a3576127a2613bdd565b5b90600052602060002090600702016001016040518363ffffffff1660e01b81526004016127d192919061374f565b600060405180830381600087803b1580156127eb57600080fd5b505af11580156127ff573d6000803e3d6000fd5b505050507f0bca21133cc65a2ac31f187f737199c5105afe8265eb1e603f7c0061e05e7ee8600d54826000015183602001516040516128409392919061377f565b60405180910390a150505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea07f00000000000000000000000000000000000000000000000000000000000000008587866040516020016128c19291906132fa565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016128ee939291906132bc565b602060405180830381600087803b15801561290857600080fd5b505af115801561291c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129409190612cd7565b5060006129618584306000808a8152602001908152602001600020546129ac565b905060016000808781526020019081526020016000205461298291906138c7565b600080878152602001908152602001600020819055506129a285826129e8565b9150509392505050565b6000848484846040516020016129c59493929190613323565b6040516020818303038152906040528051906020012060001c9050949350505050565b600082826040516020016129fd92919061324c565b60405160208183030381529060405280519060200120905092915050565b604051806080016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000151581526020016000151581525090565b6040518060e0016040528060008152602001606081526020016000815260200160008152602001600081526020016000815260200160006001811115612aa657612aa5613b7f565b5b81525090565b828054612ab890613a30565b90600052602060002090601f016020900481019282612ada5760008555612b21565b82601f10612af357805160ff1916838001178555612b21565b82800160010185558215612b21579182015b82811115612b20578251825591602001919060010190612b05565b5b509050612b2e9190612b32565b5090565b5b80821115612b4b576000816000905550600101612b33565b5090565b6000612b62612b5d84613849565b613824565b905082815260208101848484011115612b7e57612b7d613c40565b5b612b898482856139ee565b509392505050565b600081359050612ba08161411b565b92915050565b600081519050612bb58161411b565b92915050565b600081519050612bca81614132565b92915050565b600081359050612bdf81614149565b92915050565b600082601f830112612bfa57612bf9613c3b565b5b8135612c0a848260208601612b4f565b91505092915050565b600081359050612c2281614160565b92915050565b600081519050612c3781614160565b92915050565b600060208284031215612c5357612c52613c4a565b5b6000612c6184828501612b91565b91505092915050565b600060208284031215612c8057612c7f613c4a565b5b6000612c8e84828501612ba6565b91505092915050565b60008060408385031215612cae57612cad613c4a565b5b6000612cbc85828601612b91565b9250506020612ccd85828601612b91565b9150509250929050565b600060208284031215612ced57612cec613c4a565b5b6000612cfb84828501612bbb565b91505092915050565b600060208284031215612d1a57612d19613c4a565b5b6000612d2884828501612bd0565b91505092915050565b60008060408385031215612d4857612d47613c4a565b5b6000612d5685828601612bd0565b9250506020612d6785828601612c13565b9150509250929050565b60008060008060808587031215612d8b57612d8a613c4a565b5b600085013567ffffffffffffffff811115612da957612da8613c45565b5b612db587828801612be5565b9450506020612dc687828801612c13565b9350506040612dd787828801612c13565b9250506060612de887828801612c13565b91505092959194509250565b600060208284031215612e0a57612e09613c4a565b5b6000612e1884828501612c13565b91505092915050565b600060208284031215612e3757612e36613c4a565b5b6000612e4584828501612c28565b91505092915050565b60008060408385031215612e6557612e64613c4a565b5b6000612e7385828601612c13565b9250506020612e8485828601612c13565b9150509250929050565b612e9781613977565b82525050565b612ea681613989565b82525050565b612eb581613995565b82525050565b612ecc612ec782613995565b613adc565b82525050565b6000612edd8261388f565b612ee781856138a5565b9350612ef78185602086016139fd565b612f0081613c4f565b840191505092915050565b612f14816139dc565b82525050565b6000612f258261389a565b612f2f81856138b6565b9350612f3f8185602086016139fd565b612f4881613c4f565b840191505092915050565b60008154612f6081613a30565b612f6a81866138b6565b94506001821660008114612f855760018114612f9757612fca565b60ff1983168652602086019350612fca565b612fa08561387a565b60005b83811015612fc257815481890152600182019150602081019050612fa3565b808801955050505b50505092915050565b6000612fe06023836138b6565b9150612feb82613c60565b604082019050919050565b60006130036026836138b6565b915061300e82613caf565b604082019050919050565b60006130266025836138b6565b915061303182613cfe565b604082019050919050565b6000613049602b836138b6565b915061305482613d4d565b604082019050919050565b600061306c6021836138b6565b915061307782613d9c565b604082019050919050565b600061308f6018836138b6565b915061309a82613deb565b602082019050919050565b60006130b26024836138b6565b91506130bd82613e14565b604082019050919050565b60006130d56024836138b6565b91506130e082613e63565b604082019050919050565b60006130f8602b836138b6565b915061310382613eb2565b604082019050919050565b600061311b6023836138b6565b915061312682613f01565b604082019050919050565b600061313e6020836138b6565b915061314982613f50565b602082019050919050565b6000613161601f836138b6565b915061316c82613f79565b602082019050919050565b6000613184601f836138b6565b915061318f82613fa2565b602082019050919050565b60006131a76027836138b6565b91506131b282613fcb565b604082019050919050565b60006131ca6029836138b6565b91506131d58261401a565b604082019050919050565b60006131ed602d836138b6565b91506131f882614069565b604082019050919050565b6000613210602b836138b6565b915061321b826140b8565b604082019050919050565b61322f816139d2565b82525050565b613246613241826139d2565b613ae6565b82525050565b60006132588285612ebb565b6020820191506132688284613235565b6020820191508190509392505050565b600060208201905061328d6000830184612e8e565b92915050565b60006040820190506132a86000830185612e8e565b6132b56020830184613226565b9392505050565b60006060820190506132d16000830186612e8e565b6132de6020830185613226565b81810360408301526132f08184612ed2565b9050949350505050565b600060408201905061330f6000830185612eac565b61331c6020830184613226565b9392505050565b60006080820190506133386000830187612eac565b6133456020830186613226565b6133526040830185612e8e565b61335f6060830184613226565b95945050505050565b6000602082019050818103600083015261338181612fd3565b9050919050565b600060208201905081810360008301526133a181612ff6565b9050919050565b600060208201905081810360008301526133c181613019565b9050919050565b600060208201905081810360008301526133e18161303c565b9050919050565b600060208201905081810360008301526134018161305f565b9050919050565b6000602082019050818103600083015261342181613082565b9050919050565b60006020820190508181036000830152613441816130a5565b9050919050565b60006020820190508181036000830152613461816130c8565b9050919050565b60006020820190508181036000830152613481816130eb565b9050919050565b600060208201905081810360008301526134a18161310e565b9050919050565b600060208201905081810360008301526134c181613131565b9050919050565b600060208201905081810360008301526134e181613154565b9050919050565b6000602082019050818103600083015261350181613177565b9050919050565b600060208201905081810360008301526135218161319a565b9050919050565b60006020820190508181036000830152613541816131bd565b9050919050565b60006020820190508181036000830152613561816131e0565b9050919050565b6000602082019050818103600083015261358181613203565b9050919050565b600060208201905061359d6000830184613226565b92915050565b60006040820190506135b86000830185613226565b6135c56020830184612e8e565b9392505050565b60006080820190506135e16000830187613226565b6135ee6020830186612e8e565b6135fb6040830185612e9d565b6136086060830184612e9d565b95945050505050565b60006060820190506136266000830186613226565b6136336020830185612e8e565b6136406040830184613226565b949350505050565b600060408201905061365d6000830185613226565b61366a6020830184612eac565b9392505050565b600060c0820190506136866000830189613226565b81810360208301526136988188612f1a565b90506136a76040830187613226565b6136b46060830186613226565b6136c16080830185613226565b6136ce60a0830184613226565b979650505050505050565b600060e0820190506136ee600083018a613226565b81810360208301526137008189612f1a565b905061370f6040830188613226565b61371c6060830187613226565b6137296080830186613226565b61373660a0830185613226565b61374360c0830184612f0b565b98975050505050505050565b60006040820190506137646000830185613226565b81810360208301526137768184612f53565b90509392505050565b60006060820190506137946000830186613226565b6137a16020830185613226565b6137ae6040830184612e8e565b949350505050565b60006060820190506137cb6000830186613226565b6137d86020830185613226565b6137e56040830184612eac565b949350505050565b60006060820190506138026000830186613226565b61380f6020830185613226565b61381c6040830184613226565b949350505050565b600061382e61383f565b905061383a8282613a62565b919050565b6000604051905090565b600067ffffffffffffffff82111561386457613863613c0c565b5b61386d82613c4f565b9050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006138d2826139d2565b91506138dd836139d2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561391257613911613b21565b5b828201905092915050565b6000613928826139d2565b9150613933836139d2565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561396c5761396b613b21565b5b828202905092915050565b6000613982826139b2565b9050919050565b60008115159050919050565b6000819050919050565b60008190506139ad82614107565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006139e78261399f565b9050919050565b82818337600083830152505050565b60005b83811015613a1b578082015181840152602081019050613a00565b83811115613a2a576000848401525b50505050565b60006002820490506001821680613a4857607f821691505b60208210811415613a5c57613a5b613bae565b5b50919050565b613a6b82613c4f565b810181811067ffffffffffffffff82111715613a8a57613a89613c0c565b5b80604052505050565b6000613a9e826139d2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613ad157613ad0613b21565b5b600182019050919050565b6000819050919050565b6000819050919050565b6000613afb826139d2565b9150613b06836139d2565b925082613b1657613b15613b50565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f426174746c65436f6e74726163743a20416c726561647920436c61696d65642060008201527f4e46540000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f426174746c65436f6e74726163743a20596f7520617265206e6f74204e46542060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060008201527f7769746820666175636574000000000000000000000000000000000000000000602082015250565b7f426174746c65436f6e74726163743a20537461727454696d65206973206f766560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4d75737420686176652076616c6964206b657920686173680000000000000000600082015250565b7f426174746c65436f6e74726163743a20416c726561647920706172746963697060008201527f6174656400000000000000000000000000000000000000000000000000000000602082015250565b7f426174746c65436f6e74726163743a20596f7520617265206e6f74206120776960008201527f6e6e657200000000000000000000000000000000000000000000000000000000602082015250565b7f426174746c65436f6e74726163743a204e6f742061626c6520746f20636f6d7060008201527f6c65746520426174746c65000000000000000000000000000000000000000000602082015250565b7f426174746c65436f6e74726163743a20416c726561647920436c61696d65642060008201527f4746580000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f426174746c65436f6e74726163743a20416c726561647920436c61696d656400600082015250565b7f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00600082015250565b7f426174746c65436f6e74726163743a204e6f742061626c6520746f204a6f696e60008201527f20426174746c6500000000000000000000000000000000000000000000000000602082015250565b7f426174746c65436f6e74726163743a20496e76616c696420436861696e6c696e60008201527f6b20526571756573740000000000000000000000000000000000000000000000602082015250565b7f426174746c65436f6e74726163743a20426174746c652068616420616c72656160008201527f6479206265656e20656e64656400000000000000000000000000000000000000602082015250565b7f426174746c65436f6e74726163743a205f626174746c65496420697320696e7660008201527f616c6964206e756d626572000000000000000000000000000000000000000000602082015250565b6002811061411857614117613b7f565b5b50565b61412481613977565b811461412f57600080fd5b50565b61413b81613989565b811461414657600080fd5b50565b61415281613995565b811461415d57600080fd5b50565b614169816139d2565b811461417457600080fd5b5056fea26469706673582212202b4058b9b05f357f314186c36d7ec2f1401c03e27056ecb0594a464bb4c0e36a64736f6c63430008060033000000000000000000000000747973a5a2a4ae1d3a8fdf5479f1514f65db9c31000000000000000000000000404460c6a5ede2d891e8297795264fde62adbb75c251acd21ec4fb7f31bb8868288bfdbaeb4fbfec2df3735ddbd4f7dc8d60103c

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

000000000000000000000000747973a5a2a4ae1d3a8fdf5479f1514f65db9c31000000000000000000000000404460c6a5ede2d891e8297795264fde62adbb75c251acd21ec4fb7f31bb8868288bfdbaeb4fbfec2df3735ddbd4f7dc8d60103c

-----Decoded View---------------
Arg [0] : _vrfCoordinator (address): 0x747973a5a2a4ae1d3a8fdf5479f1514f65db9c31
Arg [1] : _linkToken (address): 0x404460c6a5ede2d891e8297795264fde62adbb75
Arg [2] : _keyHash (bytes32): 0xc251acd21ec4fb7f31bb8868288bfdbaeb4fbfec2df3735ddbd4f7dc8d60103c

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000747973a5a2a4ae1d3a8fdf5479f1514f65db9c31
Arg [1] : 000000000000000000000000404460c6a5ede2d891e8297795264fde62adbb75
Arg [2] : c251acd21ec4fb7f31bb8868288bfdbaeb4fbfec2df3735ddbd4f7dc8d60103c


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.