ETH Price: $3,179.64 (+1.47%)
Gas: 4 Gwei

Contract

0xeE231dca742BcD784dc07BA5eC935aBB98E468d7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add To Tower146353962022-04-22 15:09:35813 days ago1650640175IN
0xeE231dca...B98E468d7
0 ETH0.0050574389.66294201
Sell Treasure Ch...138681262021-12-24 13:18:18932 days ago1640351898IN
0xeE231dca...B98E468d7
0 ETH0.0025019537.98963031
Add To Training ...138503272021-12-21 19:07:58935 days ago1640113678IN
0xeE231dca...B98E468d7
0 ETH0.0018634270.45888856
Claim Trainings ...138390082021-12-20 1:07:21936 days ago1639962441IN
0xeE231dca...B98E468d7
0 ETH0.0015132956.25195675
Add To Tower138355172021-12-19 12:13:14937 days ago1639915994IN
0xeE231dca...B98E468d7
0 ETH0.0025468236.42898989
Add To Tower138343562021-12-19 8:00:02937 days ago1639900802IN
0xeE231dca...B98E468d7
0 ETH0.0211768739.77713679
Add To Tower138343532021-12-19 7:59:41937 days ago1639900781IN
0xeE231dca...B98E468d7
0 ETH0.0100930344.46270752
Claim Trainings ...138310632021-12-18 19:39:38938 days ago1639856378IN
0xeE231dca...B98E468d7
0 ETH0.0008398630.58267188
Add To Tower138288592021-12-18 11:25:12938 days ago1639826712IN
0xeE231dca...B98E468d7
0 ETH0.008192538.15790097
Add To Tower138287512021-12-18 11:00:09938 days ago1639825209IN
0xeE231dca...B98E468d7
0 ETH0.0069783334.96056843
Add To Training ...138280592021-12-18 8:27:21938 days ago1639816041IN
0xeE231dca...B98E468d7
0 ETH0.0008951633.84752728
Add To Tower138280552021-12-18 8:27:01938 days ago1639816021IN
0xeE231dca...B98E468d7
0 ETH0.022281133
Add To Training ...138278262021-12-18 7:40:05938 days ago1639813205IN
0xeE231dca...B98E468d7
0 ETH0.0009537134.85911341
Add To Training ...138278262021-12-18 7:40:05938 days ago1639813205IN
0xeE231dca...B98E468d7
0 ETH0.0008822433.35911341
Claim Trainings ...138278262021-12-18 7:40:05938 days ago1639813205IN
0xeE231dca...B98E468d7
0 ETH0.0009024933.35911341
Reveal Oldest Tr...138278262021-12-18 7:40:05938 days ago1639813205IN
0xeE231dca...B98E468d7
0 ETH0.0010303633.35911341
Add To Tower138271702021-12-18 5:23:02938 days ago1639804982IN
0xeE231dca...B98E468d7
0 ETH0.0147232843
Add To Tower138249512021-12-17 21:09:34939 days ago1639775374IN
0xeE231dca...B98E468d7
0 ETH0.0114135952.66855289
Add To Tower138246232021-12-17 19:59:14939 days ago1639771154IN
0xeE231dca...B98E468d7
0 ETH0.0159002679.65826753
Add To Tower138236472021-12-17 16:17:47939 days ago1639757867IN
0xeE231dca...B98E468d7
0 ETH0.0552167758.97464202
Add To Tower138226192021-12-17 12:23:16939 days ago1639743796IN
0xeE231dca...B98E468d7
0 ETH0.0161447447.15142649
Mint Commit138225892021-12-17 12:16:40939 days ago1639743400IN
0xeE231dca...B98E468d7
0 ETH0.0010903235
Claim Trainings ...138225892021-12-17 12:16:40939 days ago1639743400IN
0xeE231dca...B98E468d7
0 ETH0.0009464735
Add To Tower138223832021-12-17 11:26:37939 days ago1639740397IN
0xeE231dca...B98E468d7
0 ETH0.0281431335.21849484
Add To Tower138223822021-12-17 11:26:36939 days ago1639740396IN
0xeE231dca...B98E468d7
0 ETH0.0348823833.16812638
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WnDGameTG

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : WnDGameTG.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IWnDGame.sol";
import "./interfaces/ITrainingGrounds.sol";
import "./interfaces/ITraits.sol";
import "./interfaces/IGP.sol";
import "./interfaces/IWnD.sol";
import "./interfaces/ISacrificialAlter.sol";


contract WnDGameTG is IWnDGame, Ownable, ReentrancyGuard, Pausable {

  struct MintCommit {
    address recipient;
    bool stake;
    uint16 amount;
  }

  struct TrainingCommit {
    address tokenOwner;
    uint16 tokenId;
    bool isAdding; // If false, the commit is for claiming rewards
    bool isUnstaking; // If !isAdding, this will determine if user is unstaking
    bool isTraining; // If !isAdding, this will define where the staked token is (only necessary for wizards)
  }

  uint256 public constant TREASURE_CHEST = 5;
  // max $GP cost 
  uint256 private maxGpCost = 72000 ether;

  /** =========== MINTING COMMIT AND REVEAL VARIABLES =========== */
  // commitId -> array of all pending commits
  mapping(uint16 => MintCommit[]) private commitQueueMints;
  // Track when a commitId started accepting commits
  mapping(uint16 => uint256) private commitIdStartTimeMints;
  mapping(address => uint16) private pendingMintCommitsForAddr;
  // Tracks the current commitId batch to put new commits into
  uint16 private _commitIdCurMints = 1;
  // tracks the oldest commitId that has commits needing to be revealed
  uint16 private _commitIdPendingMints = 0;
  /** =========== TRAINING COMMIT AND REVEAL VARIABLES =========== */
  // commitId -> array of all pending commits
  mapping(uint16 => TrainingCommit[]) private commitQueueTraining;
  // Track when a commitId started accepting commits
  mapping(uint16 => uint256) private commitIdStartTimeTraining;
  mapping(address => uint16) private pendingTrainingCommitsForAddr;
  mapping(uint256 => bool) private tokenHasPendingCommit;
  // Tracks the current commitId batch to put new commits into
  uint16 private _commitIdCurTraining = 1;
  // tracks the oldest commitId that has commits needing to be revealed
  uint16 private _commitIdPendingTraining = 0;

  // Time from starting a commit batch to allow new commits to enter
  uint64 private timePerCommitBatch = 5 minutes;
  // Time from starting a commit batch to allow users to reveal these in exchange for $GP
  uint64 private timeToAllowArb = 1 hours;
  uint16 private pendingMintAmt;
  bool public allowCommits = true;

  uint256 private revealRewardAmt = 36000 ether;
  uint256 private stakingCost = 8000 ether;

  // reference to the TrainingGrounds
  ITrainingGrounds public trainingGrounds;
  // reference to $GP for burning on mint
  IGP public gpToken;
  // reference to Traits
  ITraits public traits;
  // reference to NFT collection
  IWnD public wndNFT;
  // reference to alter collection
  ISacrificialAlter public alter;

  constructor() {
    _pause();
  }

  /** CRITICAL TO SETUP */

  modifier requireContractsSet() {
      require(address(gpToken) != address(0) && address(traits) != address(0) 
        && address(wndNFT) != address(0) && address(alter) != address(0)
         && address(trainingGrounds) != address(0)
        , "Contracts not set");
      _;
  }

  function setContracts(address _gp, address _traits, address _wnd, address _alter, address _trainingGrounds) external onlyOwner {
    gpToken = IGP(_gp);
    traits = ITraits(_traits);
    wndNFT = IWnD(_wnd);
    alter = ISacrificialAlter(_alter);
    trainingGrounds = ITrainingGrounds(_trainingGrounds);
  }

  /** EXTERNAL */

  function getPendingMintCommits(address addr) external view returns (uint16) {
    return pendingMintCommitsForAddr[addr];
  }
  function getPendingTrainingCommits(address addr) external view returns (uint16) {
    return pendingTrainingCommitsForAddr[addr];
  }
  function isTokenPendingReveal(uint256 tokenId) external view returns (bool) {
    return tokenHasPendingCommit[tokenId];
  }
  function hasStaleMintCommit() external view returns (bool) {
    uint16 pendingId = _commitIdPendingMints;
    // Check if the revealable commitId has anything to commit and increment it until it does, or is the same as the current commitId
    while(commitQueueMints[pendingId].length == 0 && pendingId < _commitIdCurMints) {
      // Only iterate if the commit pending is empty and behind the current id.
      // This is to prevent it from being in front of the current id and missing commits.
      pendingId += 1;
    }
    return commitIdStartTimeMints[pendingId] < block.timestamp - timeToAllowArb && commitQueueMints[pendingId].length > 0;
  }
  function hasStaleTrainingCommit() external view returns (bool) {
    uint16 pendingId = _commitIdPendingTraining;
    // Check if the revealable commitId has anything to commit and increment it until it does, or is the same as the current commitId
    while(commitQueueTraining[pendingId].length == 0 && pendingId < _commitIdCurTraining) {
      // Only iterate if the commit pending is empty and behind the current id.
      // This is to prevent it from being in front of the current id and missing commits.
      pendingId += 1;
    }
    return commitIdStartTimeTraining[pendingId] < block.timestamp - timeToAllowArb && commitQueueTraining[pendingId].length > 0;
  }

  /** Allow users to reveal the oldest commit for GP. Mints commits must be stale to be able to be revealed this way */
  function revealOldestMint() external whenNotPaused {
    require(tx.origin == _msgSender(), "Only EOA");

    // Check if the revealable commitId has anything to commit and increment it until it does, or is the same as the current commitId
    while(commitQueueMints[_commitIdPendingMints].length == 0 && _commitIdPendingMints < _commitIdCurMints) {
      // Only iterate if the commit pending is empty and behind the current id.
      // This is to prevent it from being in front of the current id and missing commits.
      _commitIdPendingMints += 1;
    }
    // Check if there is a commit in a revealable batch and pop/reveal it
    require(commitIdStartTimeMints[_commitIdPendingMints] < block.timestamp - timeToAllowArb && commitQueueMints[_commitIdPendingMints].length > 0, "No stale commits to reveal");
    // If the pending batch is old enough to be revealed and has stuff in it, mine one.
    MintCommit memory commit = commitQueueMints[_commitIdPendingMints][commitQueueMints[_commitIdPendingMints].length - 1];
    commitQueueMints[_commitIdPendingMints].pop();
    revealMint(commit);
    gpToken.mint(_msgSender(), revealRewardAmt * commit.amount);
  }

  /** Allow users to reveal the oldest commit for GP. Mints commits must be stale to be able to be revealed this way */
  function skipOldestMint() external onlyOwner {
    // Check if the revealable commitId has anything to commit and increment it until it does, or is the same as the current commitId
    while(commitQueueMints[_commitIdPendingMints].length == 0 && _commitIdPendingMints < _commitIdCurMints) {
      // Only iterate if the commit pending is empty and behind the current id.
      // This is to prevent it from being in front of the current id and missing commits.
      _commitIdPendingMints += 1;
    }
    // Check if there is a commit in a revealable batch and pop/reveal it
    require(commitQueueMints[_commitIdPendingMints].length > 0, "No stale commits to reveal");
    // If the pending batch is old enough to be revealed and has stuff in it, mine one.
    commitQueueMints[_commitIdPendingMints].pop();
    // Do not reveal the commit, only pop it from the queue and move on.
    // revealMint(commit);
  }

  function revealOldestTraining() external whenNotPaused {
    require(tx.origin == _msgSender(), "Only EOA");

    // Check if the revealable commitId has anything to commit and increment it until it does, or is the same as the current commitId
    while(commitQueueTraining[_commitIdPendingTraining].length == 0 && _commitIdPendingTraining < _commitIdCurTraining) {
      // Only iterate if the commit pending is empty and behind the current id.
      // This is to prevent it from being in front of the current id and missing commits.
      _commitIdPendingTraining += 1;
    }
    // Check if there is a commit in a revealable batch and pop/reveal it
    require(commitIdStartTimeTraining[_commitIdPendingTraining] < block.timestamp - timeToAllowArb && commitQueueTraining[_commitIdPendingTraining].length > 0, "No stale commits to reveal");
    // If the pending batch is old enough to be revealed and has stuff in it, mine one.
    TrainingCommit memory commit = commitQueueTraining[_commitIdPendingTraining][commitQueueTraining[_commitIdPendingTraining].length - 1];
    commitQueueTraining[_commitIdPendingTraining].pop();
    revealTraining(commit);
    gpToken.mint(_msgSender(), revealRewardAmt);
  }

  function skipOldestTraining() external onlyOwner {
    // Check if the revealable commitId has anything to commit and increment it until it does, or is the same as the current commitId
    while(commitQueueTraining[_commitIdPendingTraining].length == 0 && _commitIdPendingTraining < _commitIdCurTraining) {
      // Only iterate if the commit pending is empty and behind the current id.
      // This is to prevent it from being in front of the current id and missing commits.
      _commitIdPendingTraining += 1;
    }
    // Check if there is a commit in a revealable batch and pop/reveal it
    require(commitQueueTraining[_commitIdPendingTraining].length > 0, "No stale commits to reveal");
    // If the pending batch is old enough to be revealed and has stuff in it, mine one.
    TrainingCommit memory commit = commitQueueTraining[_commitIdPendingTraining][commitQueueTraining[_commitIdPendingTraining].length - 1];
    commitQueueTraining[_commitIdPendingTraining].pop();
    // Do not reveal the commit, only pop it from the queue and move on.
    // revealTraining(commit);
    tokenHasPendingCommit[commit.tokenId] = false;
  }

  /** Initiate the start of a mint. This action burns $GP, as the intent of committing is that you cannot back out once you've started.
    * This will add users into the pending queue, to be revealed after a random seed is generated and assigned to the commit id this
    * commit was added to. */
  function mintCommit(uint256 amount, bool stake) external whenNotPaused nonReentrant {
    require(allowCommits, "adding commits disallowed");
    require(tx.origin == _msgSender(), "Only EOA");
    uint16 minted = wndNFT.minted();
    uint256 maxTokens = wndNFT.getMaxTokens();
    require(minted + pendingMintAmt + amount <= maxTokens, "All tokens minted");
    require(amount > 0 && amount <= 10, "Invalid mint amount");
    if(commitIdStartTimeMints[_commitIdCurMints] == 0) {
      commitIdStartTimeMints[_commitIdCurMints] = block.timestamp;
    }

    // Check if current commit batch is past the threshold for time and increment commitId if so
    if(commitIdStartTimeMints[_commitIdCurMints] < block.timestamp - timePerCommitBatch) {
      // increment commitId to start a new batch
      _commitIdCurMints += 1;
      commitIdStartTimeMints[_commitIdCurMints] = block.timestamp;
    }

    // Add this mint request to the commit queue for the current commitId
    uint256 totalGpCost = 0;
    // Loop through the amount of 
    for (uint i = 1; i <= amount; i++) {
      // Add N number of commits to the queue. This is so people reveal the same number of commits as they added.
      commitQueueMints[_commitIdCurMints].push(MintCommit(_msgSender(), stake, 1));
      totalGpCost += mintCost(minted + pendingMintAmt + i, maxTokens);
    }
    if (totalGpCost > 0) {
      gpToken.burn(_msgSender(), totalGpCost);
      gpToken.updateOriginAccess();
    }
    uint16 amt = uint16(amount);
    pendingMintCommitsForAddr[_msgSender()] += amt;
    pendingMintAmt += amt;

    // Check if the revealable commitId has anything to commit and increment it until it does, or is the same as the current commitId
    while(commitQueueMints[_commitIdPendingMints].length == 0 && _commitIdPendingMints < _commitIdCurMints) {
      // Only iterate if the commit pending is empty and behind the current id.
      // This is to prevent it from being in front of the current id and missing commits.
      _commitIdPendingMints += 1;
    }
    // Check if there is a commit in a revealable batch and pop/reveal it
    if(commitIdStartTimeMints[_commitIdPendingMints] < block.timestamp - timePerCommitBatch && commitQueueMints[_commitIdPendingMints].length > 0) {
      // If the pending batch is old enough to be revealed and has stuff in it, mine the number that was added to the queue.
      for (uint256 i = 0; i < amount; i++) {
        // First iteration is guaranteed to have 1 commit to mine, so we can always retroactively check that we can continue to reveal after
        MintCommit memory commit = commitQueueMints[_commitIdPendingMints][commitQueueMints[_commitIdPendingMints].length - 1];
        commitQueueMints[_commitIdPendingMints].pop();
        revealMint(commit);
        // Check to see if we are able to continue mining commits
        if(commitQueueMints[_commitIdPendingMints].length == 0 && _commitIdPendingMints < _commitIdCurMints) {
          _commitIdPendingMints += 1;
          if(commitIdStartTimeMints[_commitIdPendingMints] > block.timestamp - timePerCommitBatch 
            || commitQueueMints[_commitIdPendingMints].length == 0
            || _commitIdPendingMints == _commitIdCurMints)
          {
            // If there are no more commits to reveal, exit
            break;
          }
        }
      }
    }
  }

  function revealMint(MintCommit memory commit) internal {
    uint16 minted = wndNFT.minted();
    pendingMintAmt -= commit.amount;
    uint16[] memory tokenIds = new uint16[](commit.amount);
    uint16[] memory tokenIdsToStake = new uint16[](commit.amount);
    uint256 seed = uint256(keccak256(abi.encode(commit.recipient, minted, commitIdStartTimeMints[_commitIdPendingMints])));
    for (uint k = 0; k < commit.amount; k++) {
      minted++;
      // scramble the random so the steal / treasure mechanic are different per mint
      seed = uint256(keccak256(abi.encode(seed, commit.recipient)));
      address recipient = selectRecipient(seed, commit.recipient);
      if(recipient != commit.recipient && alter.balanceOf(commit.recipient, TREASURE_CHEST) > 0) {
        // If the mint is going to be stolen, there's a 50% chance 
        //  a dragon will prefer a treasure chest over it
        if(seed & 1 == 1) {
          alter.safeTransferFrom(commit.recipient, recipient, TREASURE_CHEST, 1, "");
          recipient = commit.recipient;
        }
      }
      tokenIds[k] = minted;
      if (!commit.stake || recipient != commit.recipient) {
        wndNFT.mint(recipient, seed);
      } else {
        wndNFT.mint(address(trainingGrounds), seed);
        tokenIdsToStake[k] = minted;
      }
    }
    wndNFT.updateOriginAccess(tokenIds);
    // mints are revealed 1 at a time. Because of this, we only need to check if the first tokenId is stolen
    // Don't call add many if there is no token to add.
    if(commit.stake && tokenIdsToStake[0] != 0) {
      trainingGrounds.addManyToTowerAndFlight(commit.recipient, tokenIdsToStake);
    }
    pendingMintCommitsForAddr[commit.recipient] -= commit.amount;
  }

  function addToTower(uint16[] calldata tokenIds) external whenNotPaused {
    require(_msgSender() == tx.origin, "Only EOA");
    for (uint256 i = 0; i < tokenIds.length; i++) {
      require(!tokenHasPendingCommit[tokenIds[i]], "token has pending commit");
    }
    trainingGrounds.addManyToTowerAndFlight(tx.origin, tokenIds);
  }

  function addToTrainingCommit(uint16[] calldata tokenIds) external whenNotPaused {
    require(allowCommits, "adding commits disallowed");
    require(tx.origin == _msgSender(), "Only EOA");
    if(commitIdStartTimeTraining[_commitIdCurTraining] == 0) {
      commitIdStartTimeTraining[_commitIdCurTraining] = block.timestamp;
    }

    // Check if current commit batch is past the threshold for time and increment commitId if so
    if(commitIdStartTimeTraining[_commitIdCurTraining] < block.timestamp - timePerCommitBatch) {
      // increment commitId to start a new batch
      _commitIdCurTraining += 1;
      commitIdStartTimeTraining[_commitIdCurTraining] = block.timestamp;
    }
    // Loop through the amount of tokens being added
    uint16 numDragons;
    for (uint i = 0; i < tokenIds.length; i++) {
      require(address(trainingGrounds) != wndNFT.ownerOf(tokenIds[i]), "token already staked");
      require(!tokenHasPendingCommit[tokenIds[i]], "token has pending commit");
      require(_msgSender() == wndNFT.ownerOf(tokenIds[i]), "not owner of token");
      if(!wndNFT.isWizard(tokenIds[i])) {
        numDragons += 1;
      }
      tokenHasPendingCommit[tokenIds[i]] = true;
      // Add N number of commits to the queue. This is so people reveal the same number of commits as they added.
      commitQueueTraining[_commitIdCurTraining].push(TrainingCommit(_msgSender(), tokenIds[i], true, false, true));
    }
    gpToken.burn(_msgSender(), stakingCost * (tokenIds.length - numDragons)); // Dragons are free to stake
    gpToken.updateOriginAccess();
    pendingTrainingCommitsForAddr[_msgSender()] += uint16(tokenIds.length);
    tryRevealTraining(tokenIds.length);
  }

  function claimTrainingsCommit(uint16[] calldata tokenIds, bool isUnstaking, bool isTraining) external whenNotPaused {
    require(allowCommits, "adding commits disallowed");
    require(tx.origin == _msgSender(), "Only EOA");
    if(commitIdStartTimeTraining[_commitIdCurTraining] == 0) {
      commitIdStartTimeTraining[_commitIdCurTraining] = block.timestamp;
    }

    // Check if current commit batch is past the threshold for time and increment commitId if so
    if(commitIdStartTimeTraining[_commitIdCurTraining] < block.timestamp - timePerCommitBatch) {
      // increment commitId to start a new batch
      _commitIdCurTraining += 1;
      commitIdStartTimeTraining[_commitIdCurTraining] = block.timestamp;
    }
    uint16 numDragons;
    // Loop through the amount of tokens being added
    for (uint i = 0; i < tokenIds.length; i++) {
      require(!tokenHasPendingCommit[tokenIds[i]], "token has pending commit");
      require(trainingGrounds.isTokenStaked(tokenIds[i], isTraining) && trainingGrounds.ownsToken(tokenIds[i])
      , "Token not in staking pool");
      if(isUnstaking) {
        if(wndNFT.isWizard(tokenIds[i])) {
          // Check to see if the wizard has earned enough to withdraw.
          // If emissions run out, allow them to attempt to withdraw anyways.
          if(isTraining) {
            require(trainingGrounds.curWhipsEmitted() >= 16000
              || trainingGrounds.calculateErcEmissionRewards(tokenIds[i]) > 0, "can't unstake wizard yet");
          }
          else {
            require(trainingGrounds.totalGPEarned() > 500000000 ether - 4000 ether
              || trainingGrounds.calculateGpRewards(tokenIds[i]) >= 4000 ether, "can't unstake wizard yet");
          }
        }
        else {
          numDragons += 1;
        }
      }
      tokenHasPendingCommit[tokenIds[i]] = true;
      // Add N number of commits to the queue. This is so people reveal the same number of commits as they added.
      commitQueueTraining[_commitIdCurTraining].push(TrainingCommit(_msgSender(), tokenIds[i], false, isUnstaking, isTraining));
    }
    if(isUnstaking) {
      gpToken.burn(_msgSender(), stakingCost * (tokenIds.length - numDragons)); // Dragons are free to stake
      gpToken.updateOriginAccess();
    }
    pendingTrainingCommitsForAddr[_msgSender()] += uint16(tokenIds.length);
    tryRevealTraining(tokenIds.length);
  }

  function tryRevealTraining(uint256 amount) internal {
    // Check if the revealable commitId has anything to commit and increment it until it does, or is the same as the current commitId
    while(commitQueueTraining[_commitIdPendingTraining].length == 0 && _commitIdPendingTraining < _commitIdCurTraining) {
      // Only iterate if the commit pending is empty and behind the current id.
      // This is to prevent it from being in front of the current id and missing commits.
      _commitIdPendingTraining += 1;
    }
    // Check if there is a commit in a revealable batch and pop/reveal it
    if(commitIdStartTimeTraining[_commitIdPendingTraining] < block.timestamp - timePerCommitBatch && commitQueueTraining[_commitIdPendingTraining].length > 0) {
      // If the pending batch is old enough to be revealed and has stuff in it, mine the number that was added to the queue.
      for (uint256 i = 0; i < amount; i++) {
        // First iteration is guaranteed to have 1 commit to mine, so we can always retroactively check that we can continue to reveal after
        TrainingCommit memory commit = commitQueueTraining[_commitIdPendingTraining][commitQueueTraining[_commitIdPendingTraining].length - 1];
        commitQueueTraining[_commitIdPendingTraining].pop();
        revealTraining(commit);
        // Check to see if we are able to continue mining commits
        if(commitQueueTraining[_commitIdPendingTraining].length == 0 && _commitIdPendingTraining < _commitIdCurTraining) {
          _commitIdPendingTraining += 1;
          if(commitIdStartTimeTraining[_commitIdPendingTraining] > block.timestamp - timePerCommitBatch 
            || commitQueueTraining[_commitIdPendingTraining].length == 0
            || _commitIdPendingTraining == _commitIdCurTraining)
          {
            // If there are no more commits to reveal, exit
            break;
          }
        }
      }
    }
  }

  function revealTraining(TrainingCommit memory commit) internal {
    uint16[] memory idSingle = new uint16[](1);
    idSingle[0] = commit.tokenId;
    tokenHasPendingCommit[commit.tokenId] = false;
    if(commit.isAdding) {
      if(wndNFT.ownerOf(commit.tokenId) != commit.tokenOwner) {
        // The owner has transferred their token and can no longer be staked. We can simply skip this reveal.
        return;
      }
      if(wndNFT.isWizard(commit.tokenId)) {
        // Add to training since tower staking doesn't need C+R
        uint256 seed = random(commit.tokenId, commitIdStartTimeTraining[_commitIdPendingTraining], commit.tokenOwner);
        trainingGrounds.addManyToTrainingAndFlight(seed, commit.tokenOwner, idSingle);
      }
      else {
        // Dragons go to the tower but really they are in both pools. This just avoids the stealing logic.
        trainingGrounds.addManyToTowerAndFlight(commit.tokenOwner, idSingle);
      }
    }
    else {
      if(!trainingGrounds.isTokenStaked(commit.tokenId, commit.isTraining)) {
        // Skip reveals if the token has already been claimed since committing to this tx (like claiming multiple times unknowingly)
        return;
      }
      if(commit.isTraining) {
        uint256 seed = random(commit.tokenId, commitIdStartTimeTraining[_commitIdPendingTraining], commit.tokenOwner);
        trainingGrounds.claimManyFromTrainingAndFlight(seed, commit.tokenOwner, idSingle, commit.isUnstaking);
      }
      else {
        trainingGrounds.claimManyFromTowerAndFlight(commit.tokenOwner, idSingle, commit.isUnstaking);
      }
    }
    pendingTrainingCommitsForAddr[commit.tokenOwner] -= 1;
  }

  /** Deterministically random. This assumes the call was a part of commit+reveal design 
   * that disallowed the benefactor of this outcome to make this call */
  function random(uint16 tokenId, uint256 time, address owner) internal pure returns (uint256) {
    return uint256(keccak256(abi.encodePacked(
      owner,
      tokenId,
      time
    )));
  }

  /** 
   * @param tokenId the ID to check the cost of to mint
   * @return the cost of the given token ID
   */
  function mintCost(uint256 tokenId, uint256 maxTokens) public view returns (uint256) {
    if (tokenId <= maxTokens * 8 / 20) return 24000 ether;
    if (tokenId <= maxTokens * 11 / 20) return 36000 ether;
    if (tokenId <= maxTokens * 14 / 20) return 48000 ether;
    if (tokenId <= maxTokens * 17 / 20) return 60000 ether; 
    // if (tokenId > maxTokens * 17 / 20)
    return maxGpCost;
  }

  function makeTreasureChests(uint16 qty) external whenNotPaused {
    require(tx.origin == _msgSender(), "Only EOA");
    // $GP exchange amount handled within alter contract
    // Will fail if sender doesn't have enough $GP
    // Transfer does not need approved,
    //  as there is established trust between this contract and the alter contract 
    alter.mint(TREASURE_CHEST, qty, _msgSender());
  }

  function sellTreasureChests(uint16 qty) external whenNotPaused {
    require(tx.origin == _msgSender(), "Only EOA");
    // $GP exchange amount handled within alter contract
    alter.burn(TREASURE_CHEST, qty, _msgSender());
  }

  /** INTERNAL */

  /**
   * the first 25% (ETH purchases) go to the minter
   * the remaining 80% have a 10% chance to be given to a random staked dragon
   * @param seed a random value to select a recipient from
   * @return the address of the recipient (either the minter or the Dragon thief's owner)
   */
  function selectRecipient(uint256 seed, address committer) internal view returns (address) {
    if (((seed >> 245) % 10) != 0) return committer; // top 10 bits haven't been used
    address thief = trainingGrounds.randomDragonOwner(seed >> 144); // 144 bits reserved for trait selection
    if (thief == address(0x0)) return committer;
    return thief;
  }

  /** ADMIN */

  /**
   * enables owner to pause / unpause contract
   */
  function setPaused(bool _paused) external requireContractsSet onlyOwner {
    if (_paused) _pause();
    else _unpause();
  }

  function setMaxGpCost(uint256 _amount) external requireContractsSet onlyOwner {
    maxGpCost = _amount;
  }

  function setAllowCommits(bool allowed) external onlyOwner {
    allowCommits = allowed;
  }

  function setRevealRewardAmt(uint256 rewardAmt) external onlyOwner {
    revealRewardAmt = rewardAmt;
  }

  /** Allow the contract owner to set the pending mint amount.
    * This allows any long-standing pending commits to be overwritten, say for instance if the max supply has been 
    *  reached but there are many stale pending commits, it could be used to free up those spaces if needed/desired by the community.
    * This function should not be called lightly, this will have negative consequences on the game. */
  function setPendingMintAmt(uint256 pendingAmt) external onlyOwner {
    pendingMintAmt = uint16(pendingAmt);
  }

  /**
   * allows owner to withdraw funds from minting
   */
  function withdraw() external onlyOwner {
    payable(owner()).transfer(address(this).balance);
  }
}

File 2 of 14 : 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 3 of 14 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 14 : IWnDGame.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

interface IWnDGame {
  
}

File 6 of 14 : ITrainingGrounds.sol
// SPDX-License-Identifier: MIT LICENSE 

pragma solidity ^0.8.0;

interface ITrainingGrounds {
  function addManyToTowerAndFlight(address tokenOwner, uint16[] calldata tokenIds) external;
  function claimManyFromTowerAndFlight(address tokenOwner, uint16[] calldata tokenIds, bool unstake) external;
  function addManyToTrainingAndFlight(uint256 seed, address tokenOwner, uint16[] calldata tokenIds) external;
  function claimManyFromTrainingAndFlight(uint256 seed, address tokenOwner, uint16[] calldata tokenIds, bool unstake) external;
  function randomDragonOwner(uint256 seed) external view returns (address);
  function isTokenStaked(uint256 tokenId, bool isTraining) external view returns (bool);
  function ownsToken(uint256 tokenId) external view returns (bool);
  function calculateGpRewards(uint256 tokenId) external view returns (uint256 owed);
  function calculateErcEmissionRewards(uint256 tokenId) external view returns (uint256 owed);
  function curWhipsEmitted() external view returns (uint16);
  function curMagicRunesEmitted() external view returns (uint16);
  function totalGPEarned() external view returns (uint256);
}

File 7 of 14 : ITraits.sol
// SPDX-License-Identifier: MIT LICENSE 

pragma solidity ^0.8.0;

interface ITraits {
  function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 8 of 14 : IGP.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

interface IGP {
    function mint(address to, uint256 amount) external;
    function burn(address from, uint256 amount) external;
    function updateOriginAccess() external;
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}

File 9 of 14 : IWnD.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

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

interface IWnD is IERC721Enumerable {

    // game data storage
    struct WizardDragon {
        bool isWizard;
        uint8 body;
        uint8 head;
        uint8 spell;
        uint8 eyes;
        uint8 neck;
        uint8 mouth;
        uint8 wand;
        uint8 tail;
        uint8 rankIndex;
    }

    function minted() external returns (uint16);
    function updateOriginAccess(uint16[] memory tokenIds) external;
    function mint(address recipient, uint256 seed) external;
    function burn(uint256 tokenId) external;
    function getMaxTokens() external view returns (uint256);
    function getPaidTokens() external view returns (uint256);
    function getTokenTraits(uint256 tokenId) external view returns (WizardDragon memory);
    function getTokenWriteBlock(uint256 tokenId) external view returns(uint64);
    function isWizard(uint256 tokenId) external view returns(bool);
  
}

File 10 of 14 : ISacrificialAlter.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

interface ISacrificialAlter {
    function mint(uint256 typeId, uint16 qty, address recipient) external;
    function burn(uint256 typeId, uint16 qty, address burnFrom) external;
    function updateOriginAccess() external;
    function balanceOf(address account, uint256 id) external returns (uint256);
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external;
}

File 11 of 14 : 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 12 of 14 : 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 13 of 14 : 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 14 of 14 : 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);
}

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

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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"TREASURE_CHEST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"addToTower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"addToTrainingCommit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowCommits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"alter","outputs":[{"internalType":"contract ISacrificialAlter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"},{"internalType":"bool","name":"isUnstaking","type":"bool"},{"internalType":"bool","name":"isTraining","type":"bool"}],"name":"claimTrainingsCommit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getPendingMintCommits","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getPendingTrainingCommits","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gpToken","outputs":[{"internalType":"contract IGP","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasStaleMintCommit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasStaleTrainingCommit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isTokenPendingReveal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"qty","type":"uint16"}],"name":"makeTreasureChests","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"mintCommit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"maxTokens","type":"uint256"}],"name":"mintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealOldestMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealOldestTraining","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"qty","type":"uint16"}],"name":"sellTreasureChests","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"allowed","type":"bool"}],"name":"setAllowCommits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gp","type":"address"},{"internalType":"address","name":"_traits","type":"address"},{"internalType":"address","name":"_wnd","type":"address"},{"internalType":"address","name":"_alter","type":"address"},{"internalType":"address","name":"_trainingGrounds","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxGpCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pendingAmt","type":"uint256"}],"name":"setPendingMintAmt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardAmt","type":"uint256"}],"name":"setRevealRewardAmt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"skipOldestMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"skipOldestTraining","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trainingGrounds","outputs":[{"internalType":"contract ITrainingGrounds","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traits","outputs":[{"internalType":"contract ITraits","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wndNFT","outputs":[{"internalType":"contract IWnD","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6080604052690f3f20b8dfa69d0000006003556007805463ffffffff19166001179055600c8054760100000000000000000e10000000000000012c00000001600162ff000160a01b031990911617905569079f905c6fd34e800000600d556901b1ae4d6e2ef5000000600e553480156200007857600080fd5b506200008433620000a2565b600180556002805460ff191690556200009c620000f2565b62000190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff16156200013d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620001733390565b6040516001600160a01b03909116815260200160405180910390a1565b6146b080620001a06000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c806394cdc9f51161011a578063e1fc334f116100ad578063f2eea45c1161007c578063f2eea45c1461045a578063f2fde38b1461046d578063f62b1c0d14610480578063f63bf8bd14610493578063f8b2a46e146104a657600080fd5b8063e1fc334f1461040e578063e5d391a214610421578063e6eebd8b14610434578063f075b0801461044757600080fd5b8063b7cd90cd116100e9578063b7cd90cd146103d8578063bdc8cbc2146103e0578063cadeef03146103f3578063cd0b86da1461040657600080fd5b806394cdc9f514610388578063999c0700146103905780639ecacf5c146103bd578063b362fb99146103c557600080fd5b80633df6cc4f1161019d5780635c975abb1161016c5780635c975abb1461033e5780636f7bb00a14610349578063715018a61461035c57806383c72a83146103645780638da5cb5b1461037757600080fd5b80633df6cc4f146102e157806343b8e5c0146102f4578063498c626a146103075780634a371d7b1461031b57600080fd5b806326e52ba9116101d957806326e52ba91461027b57806327b574eb146102bb5780632af103c8146102c35780633ccfd60b146102d957600080fd5b8063078e8be71461020b5780631090c5de1461023b57806316c38b3c1461025357806318adfb6214610268575b600080fd5b600f5461021e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6102436104b9565b6040519015158152602001610232565b61026661026136600461418a565b610561565b005b6102666102763660046141fa565b61064f565b6102a861028936600461403e565b6001600160a01b031660009081526006602052604090205461ffff1690565b60405161ffff9091168152602001610232565b610266610724565b6102cb600581565b604051908152602001610232565b61026661085d565b6102666102ef36600461418a565b6108c1565b6102666103023660046141fa565b610909565b600c5461024390600160b01b900460ff1681565b6102436103293660046141fa565b6000908152600b602052604090205460ff1690565b60025460ff16610243565b60105461021e906001600160a01b031681565b610266610938565b6102666103723660046141c2565b61096e565b6000546001600160a01b031661021e565b610266610a34565b6102a861039e36600461403e565b6001600160a01b03166000908152600a602052604090205461ffff1690565b610266610c37565b6102666103d33660046140e6565b610eb5565b610243610fed565b6102666103ee3660046141c2565b611092565b6102666104013660046140e6565b6110ee565b610266611834565b60115461021e906001600160a01b031681565b61026661042f36600461422a565b611ab6565b6102cb610442366004614259565b612340565b610266610455366004614125565b612405565b60135461021e906001600160a01b031681565b61026661047b36600461403e565b612e40565b61026661048e3660046141fa565b612ed8565b6102666104a1366004614076565b612f24565b60125461021e906001600160a01b031681565b600c5460009062010000900461ffff165b61ffff81166000908152600860205260409020541580156104f45750600c5461ffff908116908216105b1561050b5761050460018261451f565b90506104ca565b600c5461052890600160601b90046001600160401b0316426145b3565b61ffff821660009081526009602052604090205410801561055b575061ffff811660009081526008602052604090205415155b91505090565b6010546001600160a01b03161580159061058557506011546001600160a01b031615155b801561059b57506012546001600160a01b031615155b80156105b157506013546001600160a01b031615155b80156105c75750600f546001600160a01b031615155b61060c5760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b60448201526064015b60405180910390fd5b6000546001600160a01b031633146106365760405162461bcd60e51b81526004016106039061440c565b801561064757610644612fad565b50565b610644613022565b6010546001600160a01b03161580159061067357506011546001600160a01b031615155b801561068957506012546001600160a01b031615155b801561069f57506013546001600160a01b031615155b80156106b55750600f546001600160a01b031615155b6106f55760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b6044820152606401610603565b6000546001600160a01b0316331461071f5760405162461bcd60e51b81526004016106039061440c565b600355565b6000546001600160a01b0316331461074e5760405162461bcd60e51b81526004016106039061440c565b60075462010000900461ffff16600090815260046020526040902054158015610785575060075461ffff8082166201000090920416105b156107c9576001600760028282829054906101000a900461ffff166107aa919061451f565b92506101000a81548161ffff021916908361ffff16021790555061074e565b60075462010000900461ffff166000908152600460205260409020546108015760405162461bcd60e51b815260040161060390614441565b60075462010000900461ffff16600090815260046020526040902080548061083957634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160b81b0319169055019055565b6000546001600160a01b031633146108875760405162461bcd60e51b81526004016106039061440c565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610644573d6000803e3d6000fd5b6000546001600160a01b031633146108eb5760405162461bcd60e51b81526004016106039061440c565b600c8054911515600160b01b0260ff60b01b19909216919091179055565b6000546001600160a01b031633146109335760405162461bcd60e51b81526004016106039061440c565b600d55565b6000546001600160a01b031633146109625760405162461bcd60e51b81526004016106039061440c565b61096c600061309c565b565b60025460ff16156109915760405162461bcd60e51b8152600401610603906143ab565b3233146109b05760405162461bcd60e51b815260040161060390614389565b6013546001600160a01b03166351416019600583335b6040516001600160e01b031960e086901b168152600481019390935261ffff90911660248301526001600160a01b031660448201526064015b600060405180830381600087803b158015610a1957600080fd5b505af1158015610a2d573d6000803e3d6000fd5b5050505050565b6000546001600160a01b03163314610a5e5760405162461bcd60e51b81526004016106039061440c565b600c5462010000900461ffff16600090815260086020526040902054158015610a955750600c5461ffff8082166201000090920416105b15610ad9576001600c60028282829054906101000a900461ffff16610aba919061451f565b92506101000a81548161ffff021916908361ffff160217905550610a5e565b600c5462010000900461ffff16600090815260086020526040902054610b115760405162461bcd60e51b815260040161060390614441565b600c5462010000900461ffff1660009081526008602052604081208054610b3a906001906145b3565b81548110610b5857634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160a08101825291909301546001600160a01b038116825261ffff600160a01b820481168385015260ff600160b01b83048116151584870152600160b81b8304811615156060850152600160c01b90920490911615156080830152600c546201000090041684526008909152912080549192509080610bf457634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160c81b03191690559092019092559182015161ffff168152600b90915260409020805460ff19169055565b60025460ff1615610c5a5760405162461bcd60e51b8152600401610603906143ab565b323314610c795760405162461bcd60e51b815260040161060390614389565b60075462010000900461ffff16600090815260046020526040902054158015610cb0575060075461ffff8082166201000090920416105b15610cf4576001600760028282829054906101000a900461ffff16610cd5919061451f565b92506101000a81548161ffff021916908361ffff160217905550610c79565b600c54610d1190600160601b90046001600160401b0316426145b3565b60075462010000900461ffff16600090815260056020526040902054108015610d54575060075462010000900461ffff1660009081526004602052604090205415155b610d705760405162461bcd60e51b815260040161060390614441565b60075462010000900461ffff1660009081526004602052604081208054610d99906001906145b3565b81548110610db757634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160608101825291909301546001600160a01b038116825260ff600160a01b82041615158284015261ffff600160a81b9091048116828501526007546201000090041684526004909152912080549192509080610e3157634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160b81b0319169055019055610e5c816130ec565b6010546001600160a01b03166340c10f1933836040015161ffff16600d54610e849190614571565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016109ff565b60025460ff1615610ed85760405162461bcd60e51b8152600401610603906143ab565b333214610ef75760405162461bcd60e51b815260040161060390614389565b60005b81811015610f8257600b6000848484818110610f2657634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610f3b91906141c2565b61ffff16815260208101919091526040016000205460ff1615610f705760405162461bcd60e51b8152600401610603906143d5565b80610f7a816145ec565b915050610efa565b50600f5460405163315ec95760e11b81526001600160a01b03909116906362bd92ae90610fb7903290869086906004016142b8565b600060405180830381600087803b158015610fd157600080fd5b505af1158015610fe5573d6000803e3d6000fd5b505050505050565b60075460009062010000900461ffff165b61ffff8116600090815260046020526040902054158015611028575060075461ffff908116908216105b1561103f5761103860018261451f565b9050610ffe565b600c5461105c90600160601b90046001600160401b0316426145b3565b61ffff821660009081526005602052604090205410801561055b575061ffff166000908152600460205260409020541515919050565b60025460ff16156110b55760405162461bcd60e51b8152600401610603906143ab565b3233146110d45760405162461bcd60e51b815260040161060390614389565b6013546001600160a01b03166306e7b953600583336109c6565b60025460ff16156111115760405162461bcd60e51b8152600401610603906143ab565b600c54600160b01b900460ff1661113a5760405162461bcd60e51b815260040161060390614478565b3233146111595760405162461bcd60e51b815260040161060390614389565b600c5461ffff1660009081526009602052604090205461118c57600c5461ffff1660009081526009602052604090204290555b600c546111aa9064010000000090046001600160401b0316426145b3565b600c5461ffff16600090815260096020526040902054101561121257600c8054600191906000906111e090849061ffff1661451f565b82546101009290920a61ffff818102199093169183160217909155600c54166000908152600960205260409020429055505b6000805b828110156116f1576012546001600160a01b0316636352211e85858481811061124f57634e487b7160e01b600052603260045260246000fd5b905060200201602081019061126491906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b15801561129e57600080fd5b505afa1580156112b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d6919061405a565b600f546001600160a01b039081169116141561132b5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88185b1c9958591e481cdd185ad95960621b6044820152606401610603565b600b600085858481811061134f57634e487b7160e01b600052603260045260246000fd5b905060200201602081019061136491906141c2565b61ffff16815260208101919091526040016000205460ff16156113995760405162461bcd60e51b8152600401610603906143d5565b6012546001600160a01b0316636352211e8585848181106113ca57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906113df91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b15801561141957600080fd5b505afa15801561142d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611451919061405a565b6001600160a01b0316336001600160a01b0316146114a65760405162461bcd60e51b81526020600482015260126024820152713737ba1037bbb732b91037b3103a37b5b2b760711b6044820152606401610603565b6012546001600160a01b031663ff53f4738585848181106114d757634e487b7160e01b600052603260045260246000fd5b90506020020160208101906114ec91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b15801561152657600080fd5b505afa15801561153a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155e91906141a6565b6115705761156d60018361451f565b91505b6001600b600086868581811061159657634e487b7160e01b600052603260045260246000fd5b90506020020160208101906115ab91906141c2565b61ffff908116825260208083019390935260409182016000908120805460ff191695151595909517909455600c541683526008825291829020825160a081019093523383529190810186868581811061161457634e487b7160e01b600052603260045260246000fd5b905060200201602081019061162991906141c2565b61ffff908116825260016020808401829052600060408086018290526060958601849052875493840188559681528190208551920180549186015196860151948601516080909601511515600160c01b0260ff60c01b19961515600160b81b0260ff60b81b19961515600160b01b029690961661ffff60b01b1998909516600160a01b026001600160b01b03199093166001600160a01b03909416939093179190911795909516919091179190911791909116179055806116e9816145ec565b915050611216565b506010546001600160a01b0316639dc29fac3361171261ffff8516866145b3565b600e5461171f9190614571565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561176557600080fd5b505af1158015611779573d6000803e3d6000fd5b50505050601060009054906101000a90046001600160a01b03166001600160a01b0316639c47ee3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156117cd57600080fd5b505af11580156117e1573d6000803e3d6000fd5b5050336000908152600a60205260408120805486945090925061180990849061ffff1661451f565b92506101000a81548161ffff021916908361ffff16021790555061182f83839050613748565b505050565b60025460ff16156118575760405162461bcd60e51b8152600401610603906143ab565b3233146118765760405162461bcd60e51b815260040161060390614389565b600c5462010000900461ffff166000908152600860205260409020541580156118ad5750600c5461ffff8082166201000090920416105b156118f1576001600c60028282829054906101000a900461ffff166118d2919061451f565b92506101000a81548161ffff021916908361ffff160217905550611876565b600c5461190e90600160601b90046001600160401b0316426145b3565b600c5462010000900461ffff166000908152600960205260409020541080156119515750600c5462010000900461ffff1660009081526008602052604090205415155b61196d5760405162461bcd60e51b815260040161060390614441565b600c5462010000900461ffff1660009081526008602052604081208054611996906001906145b3565b815481106119b457634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160a08101825291909301546001600160a01b038116825261ffff600160a01b820481168385015260ff600160b01b83048116151584870152600160b81b8304811615156060850152600160c01b90920490911615156080830152600c546201000090041684526008909152912080549192509080611a5057634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160c81b0319169055019055611a7b81613a5d565b601054600d546040516340c10f1960e01b815233600482015260248101919091526001600160a01b03909116906340c10f19906044016109ff565b60025460ff1615611ad95760405162461bcd60e51b8152600401610603906143ab565b60026001541415611b2c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610603565b6002600155600c54600160b01b900460ff16611b5a5760405162461bcd60e51b815260040161060390614478565b323314611b795760405162461bcd60e51b815260040161060390614389565b60125460408051630278162160e51b815290516000926001600160a01b031691634f02c42091600480830192602092919082900301818787803b158015611bbf57600080fd5b505af1158015611bd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf791906141de565b90506000601260009054906101000a90046001600160a01b03166001600160a01b0316636abcded16040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4957600080fd5b505afa158015611c5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c819190614212565b600c5490915081908590611ca090600160a01b900461ffff168561451f565b61ffff16611cae9190614545565b1115611cf05760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b6044820152606401610603565b600084118015611d015750600a8411155b611d435760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b6044820152606401610603565b60075461ffff16600090815260056020526040902054611d765760075461ffff1660009081526005602052604090204290555b600c54611d949064010000000090046001600160401b0316426145b3565b60075461ffff166000908152600560205260409020541015611dfc576007805460019190600090611dca90849061ffff1661451f565b82546101009290920a61ffff818102199093169183160217909155600754166000908152600560205260409020429055505b600060015b858111611ee75760075461ffff16600090815260046020526040908190208151606081019092529080336001600160a01b0390811682528815156020808401919091526001604093840181905285549081018655600095865294819020845195018054918501519490930151949091166001600160a81b031990911617600160a01b92151583021761ffff60a81b1916600160a81b61ffff94851602179055600c54611ec9928492611eb59204168761451f565b61ffff16611ec39190614545565b84612340565b611ed39083614545565b915080611edf816145ec565b915050611e01565b508015611fc9576010546001600160a01b0316639dc29fac336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015611f4857600080fd5b505af1158015611f5c573d6000803e3d6000fd5b50505050601060009054906101000a90046001600160a01b03166001600160a01b0316639c47ee3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611fb057600080fd5b505af1158015611fc4573d6000803e3d6000fd5b505050505b33600090815260066020526040812080548792839291611fee90849061ffff1661451f565b92506101000a81548161ffff021916908361ffff16021790555080600c60148282829054906101000a900461ffff16612027919061451f565b92506101000a81548161ffff021916908361ffff1602179055505b60075462010000900461ffff16600090815260046020526040902054158015612079575060075461ffff8082166201000090920416105b156120bd576001600760028282829054906101000a900461ffff1661209e919061451f565b92506101000a81548161ffff021916908361ffff160217905550612042565b600c546120db9064010000000090046001600160401b0316426145b3565b60075462010000900461ffff1660009081526005602052604090205410801561211e575060075462010000900461ffff1660009081526004602052604090205415155b156123345760005b868110156123325760075462010000900461ffff1660009081526004602052604081208054612157906001906145b3565b8154811061217557634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160608101825291909301546001600160a01b038116825260ff600160a01b82041615158284015261ffff600160a81b90910481168285015260075462010000900416845260049091529120805491925090806121ef57634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160b81b031916905501905561221a816130ec565b60075462010000900461ffff16600090815260046020526040902054158015612251575060075461ffff8082166201000090920416105b1561231f576001600760028282829054906101000a900461ffff16612276919061451f565b92506101000a81548161ffff021916908361ffff160217905550600c60049054906101000a90046001600160401b03166001600160401b0316426122ba91906145b3565b60075462010000900461ffff1660009081526005602052604090205411806122fb575060075462010000900461ffff16600090815260046020526040902054155b80612314575060075462010000810461ffff9081169116145b1561231f5750612332565b508061232a816145ec565b915050612126565b505b50506001805550505050565b6000601461234f836008614571565b612359919061455d565b831161237057506905150ae84a8cdf0000006123ff565b601461237d83600b614571565b612387919061455d565b831161239e575069079f905c6fd34e8000006123ff565b60146123ab83600e614571565b6123b5919061455d565b83116123cc5750690a2a15d09519be0000006123ff565b60146123d9836011614571565b6123e3919061455d565b83116123fa5750690cb49b44ba602d8000006123ff565b506003545b92915050565b60025460ff16156124285760405162461bcd60e51b8152600401610603906143ab565b600c54600160b01b900460ff166124515760405162461bcd60e51b815260040161060390614478565b3233146124705760405162461bcd60e51b815260040161060390614389565b600c5461ffff166000908152600960205260409020546124a357600c5461ffff1660009081526009602052604090204290555b600c546124c19064010000000090046001600160401b0316426145b3565b600c5461ffff16600090815260096020526040902054101561252957600c8054600191906000906124f790849061ffff1661451f565b82546101009290920a61ffff818102199093169183160217909155600c54166000908152600960205260409020429055505b6000805b84811015612cfc57600b600087878481811061255957634e487b7160e01b600052603260045260246000fd5b905060200201602081019061256e91906141c2565b61ffff16815260208101919091526040016000205460ff16156125a35760405162461bcd60e51b8152600401610603906143d5565b600f546001600160a01b031663471199f08787848181106125d457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906125e991906141c2565b6040516001600160e01b031960e084901b16815261ffff9091166004820152851515602482015260440160206040518083038186803b15801561262b57600080fd5b505afa15801561263f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061266391906141a6565b80156127225750600f546001600160a01b031663f04d65fd87878481811061269b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906126b091906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272291906141a6565b61276e5760405162461bcd60e51b815260206004820152601960248201527f546f6b656e206e6f7420696e207374616b696e6720706f6f6c000000000000006044820152606401610603565b8315612b73576012546001600160a01b031663ff53f4738787848181106127a557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906127ba91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b1580156127f457600080fd5b505afa158015612808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282c91906141a6565b15612b655782156129ca57600f546040805163051310f160e41b81529051613e80926001600160a01b0316916351310f10916004808301926020929190829003018186803b15801561287d57600080fd5b505afa158015612891573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128b591906141de565b61ffff1610158061297e5750600f546000906001600160a01b031663f60378a78888858181106128f557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061290a91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b15801561294457600080fd5b505afa158015612958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297c9190614212565b115b6129c55760405162461bcd60e51b815260206004820152601860248201527718d85b89dd081d5b9cdd185ad9481dda5e985c99081e595d60421b6044820152606401610603565b612b73565b600f5460408051630530587560e01b815290516b019d964578c18906f9800000926001600160a01b0316916305305875916004808301926020929190829003018186803b158015612a1a57600080fd5b505afa158015612a2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a529190614212565b118061297e5750600f5468d8d726b7177a800000906001600160a01b0316632a427888888885818110612a9557634e487b7160e01b600052603260045260246000fd5b9050602002016020810190612aaa91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b158015612ae457600080fd5b505afa158015612af8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1c9190614212565b10156129c55760405162461bcd60e51b815260206004820152601860248201527718d85b89dd081d5b9cdd185ad9481dda5e985c99081e595d60421b6044820152606401610603565b612b7060018361451f565b91505b6001600b6000888885818110612b9957634e487b7160e01b600052603260045260246000fd5b9050602002016020810190612bae91906141c2565b61ffff908116825260208083019390935260409182016000908120805460ff191695151595909517909455600c541683526008825291829020825160a0810190935233835291908101888885818110612c1757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190612c2c91906141c2565b61ffff9081168252600060208084018290528915156040808601919091528915156060958601528654600181018855968352918190208551960180549186015192860151948601516080909601511515600160c01b0260ff60c01b19961515600160b81b0260ff60b81b19961515600160b01b029690961661ffff60b01b1994909516600160a01b026001600160b01b03199093166001600160a01b0390981697909717919091179190911691909117919091179190911691909117905580612cf4816145ec565b91505061252d565b508215612df7576010546001600160a01b0316639dc29fac33612d2361ffff8516886145b3565b600e54612d309190614571565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612d7657600080fd5b505af1158015612d8a573d6000803e3d6000fd5b50505050601060009054906101000a90046001600160a01b03166001600160a01b0316639c47ee3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612dde57600080fd5b505af1158015612df2573d6000803e3d6000fd5b505050505b336000908152600a602052604081208054869290612e1a90849061ffff1661451f565b92506101000a81548161ffff021916908361ffff160217905550610a2d85859050613748565b6000546001600160a01b03163314612e6a5760405162461bcd60e51b81526004016106039061440c565b6001600160a01b038116612ecf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610603565b6106448161309c565b6000546001600160a01b03163314612f025760405162461bcd60e51b81526004016106039061440c565b600c805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b6000546001600160a01b03163314612f4e5760405162461bcd60e51b81526004016106039061440c565b601080546001600160a01b03199081166001600160a01b03978816179091556011805482169587169590951790945560128054851693861693909317909255601380548416918516919091179055600f80549092169216919091179055565b60025460ff1615612fd05760405162461bcd60e51b8152600401610603906143ab565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586130053390565b6040516001600160a01b03909116815260200160405180910390a1565b60025460ff1661306b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610603565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613005565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60125460408051630278162160e51b815290516000926001600160a01b031691634f02c42091600480830192602092919082900301818787803b15801561313257600080fd5b505af1158015613146573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061316a91906141de565b90508160400151600c60148282829054906101000a900461ffff1661318f9190614590565b92506101000a81548161ffff021916908361ffff1602179055506000826040015161ffff166001600160401b038111156131d957634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015613202578160200160208202803683370190505b5090506000836040015161ffff166001600160401b0381111561323557634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561325e578160200160208202803683370190505b50845160075461ffff62010000909104811660009081526005602090815260408083205481516001600160a01b039096168684015293891685820152606080860194909452805180860390940184526080909401909352815191909201209192505b856040015161ffff168110156135e957846132da816145ca565b8751604051919750613303925084916020019182526001600160a01b0316602082015260400190565b6040516020818303038152906040528051906020012060001c9150600061332e838860000151613edb565b905086600001516001600160a01b0316816001600160a01b0316141580156133dd57506013548751604051627eeac760e11b81526001600160a01b03918216600482015260056024820152600092919091169062fdd58e90604401602060405180830381600087803b1580156133a357600080fd5b505af11580156133b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133db9190614212565b115b15613477578260011660011415613477576013548751604051637921219560e11b81526001600160a01b0391821660048201528382166024820152600560448201526001606482015260a06084820152600060a482015291169063f242432a9060c401600060405180830381600087803b15801561345a57600080fd5b505af115801561346e573d6000803e3d6000fd5b50508851925050505b8585838151811061349857634e487b7160e01b600052603260045260246000fd5b61ffff90921660209283029190910182015287015115806134c6575086516001600160a01b03828116911614155b15613536576012546040516340c10f1960e01b81526001600160a01b03838116600483015260248201869052909116906340c10f1990604401600060405180830381600087803b15801561351957600080fd5b505af115801561352d573d6000803e3d6000fd5b505050506135d6565b601254600f546040516340c10f1960e01b81526001600160a01b039182166004820152602481018690529116906340c10f1990604401600060405180830381600087803b15801561358657600080fd5b505af115801561359a573d6000803e3d6000fd5b50505050858483815181106135bf57634e487b7160e01b600052603260045260246000fd5b602002602001019061ffff16908161ffff16815250505b50806135e1816145ec565b9150506132c0565b506012546040516335ca838b60e01b81526001600160a01b03909116906335ca838b9061361a908690600401614376565b600060405180830381600087803b15801561363457600080fd5b505af1158015613648573d6000803e3d6000fd5b505050508460200151801561368a57508160008151811061367957634e487b7160e01b600052603260045260246000fd5b602002602001015161ffff16600014155b156136f457600f54855160405163315ec95760e11b81526001600160a01b03909216916362bd92ae916136c1918690600401614314565b600060405180830381600087803b1580156136db57600080fd5b505af11580156136ef573d6000803e3d6000fd5b505050505b60408086015186516001600160a01b03166000908152600660205291822080549192909161372790849061ffff16614590565b92506101000a81548161ffff021916908361ffff1602179055505050505050565b600c5462010000900461ffff1660009081526008602052604090205415801561377f5750600c5461ffff8082166201000090920416105b156137c3576001600c60028282829054906101000a900461ffff166137a4919061451f565b92506101000a81548161ffff021916908361ffff160217905550613748565b600c546137e19064010000000090046001600160401b0316426145b3565b600c5462010000900461ffff166000908152600960205260409020541080156138245750600c5462010000900461ffff1660009081526008602052604090205415155b156106445760005b81811015613a5957600c5462010000900461ffff166000908152600860205260408120805461385d906001906145b3565b8154811061387b57634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160a08101825291909301546001600160a01b038116825261ffff600160a01b820481168385015260ff600160b01b83048116151584870152600160b81b8304811615156060850152600160c01b90920490911615156080830152600c54620100009004168452600890915291208054919250908061391757634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160c81b031916905501905561394281613a5d565b600c5462010000900461ffff166000908152600860205260409020541580156139795750600c5461ffff8082166201000090920416105b15613a46576001600c60028282829054906101000a900461ffff1661399e919061451f565b92506101000a81548161ffff021916908361ffff160217905550600c60049054906101000a90046001600160401b03166001600160401b0316426139e291906145b3565b600c5462010000900461ffff166000908152600960205260409020541180613a235750600c5462010000900461ffff16600090815260086020526040902054155b80613a3c5750600c5462010000810461ffff9081169116145b15613a4657505050565b5080613a51816145ec565b91505061382c565b5050565b60408051600180825281830190925260009160208083019080368337019050509050816020015181600081518110613aa557634e487b7160e01b600052603260045260246000fd5b61ffff928316602091820292909201810191909152838101519091166000908152600b909152604090819020805460ff1916905582015115613d1257815160125460208401516040516331a9108f60e11b815261ffff90911660048201526001600160a01b039283169290911690636352211e9060240160206040518083038186803b158015613b3457600080fd5b505afa158015613b48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b6c919061405a565b6001600160a01b031614613b7e575050565b6012546020830151604051600162ac0b8d60e01b0319815261ffff90911660048201526001600160a01b039091169063ff53f4739060240160206040518083038186803b158015613bce57600080fd5b505afa158015613be2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c0691906141a6565b15613ca957602082810151600c5462010000900461ffff166000908152600990925260408220548451613c3a929190613f98565b600f54845160405162eacb7960e51b81529293506001600160a01b0390911691631d596f2091613c719185919087906004016144af565b600060405180830381600087803b158015613c8b57600080fd5b505af1158015613c9f573d6000803e3d6000fd5b5050505050613e8f565b600f54825160405163315ec95760e11b81526001600160a01b03909216916362bd92ae91613cdb918590600401614314565b600060405180830381600087803b158015613cf557600080fd5b505af1158015613d09573d6000803e3d6000fd5b50505050613e8f565b600f5460208301516080840151604051630471199f60e41b815261ffff9092166004830152151560248201526001600160a01b039091169063471199f09060440160206040518083038186803b158015613d6b57600080fd5b505afa158015613d7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613da391906141a6565b613dab575050565b816080015115613e2257602082810151600c5462010000900461ffff166000908152600990925260408220548451613de4929190613f98565b600f5484516060860151604051630b3eb67160e01b81529394506001600160a01b0390921692630b3eb67192613c71928692909188916004016144e2565b600f5482516060840151604051633e6bca0760e01b81526001600160a01b0390931692633e6bca0792613e5c929091869190600401614340565b600060405180830381600087803b158015613e7657600080fd5b505af1158015613e8a573d6000803e3d6000fd5b505050505b81516001600160a01b03166000908152600a60205260408120805460019290613ebd90849061ffff16614590565b92506101000a81548161ffff021916908361ffff1602179055505050565b6000613eec600a60f585901c614607565b15613ef85750806123ff565b600f54604051638336a6cf60e01b8152609085901c60048201526000916001600160a01b031690638336a6cf9060240160206040518083038186803b158015613f4057600080fd5b505afa158015613f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f78919061405a565b90506001600160a01b038116613f9157829150506123ff565b9392505050565b6040516bffffffffffffffffffffffff19606083901b1660208201526001600160f01b031960f085901b1660348201526036810183905260009060560160408051601f198184030181529190528051602090910120949350505050565b60008083601f840112614006578182fd5b5081356001600160401b0381111561401c578182fd5b6020830191508360208260051b850101111561403757600080fd5b9250929050565b60006020828403121561404f578081fd5b8135613f9181614647565b60006020828403121561406b578081fd5b8151613f9181614647565b600080600080600060a0868803121561408d578081fd5b853561409881614647565b945060208601356140a881614647565b935060408601356140b881614647565b925060608601356140c881614647565b915060808601356140d881614647565b809150509295509295909350565b600080602083850312156140f8578182fd5b82356001600160401b0381111561410d578283fd5b61411985828601613ff5565b90969095509350505050565b6000806000806060858703121561413a578384fd5b84356001600160401b0381111561414f578485fd5b61415b87828801613ff5565b909550935050602085013561416f8161465c565b9150604085013561417f8161465c565b939692955090935050565b60006020828403121561419b578081fd5b8135613f918161465c565b6000602082840312156141b7578081fd5b8151613f918161465c565b6000602082840312156141d3578081fd5b8135613f918161466a565b6000602082840312156141ef578081fd5b8151613f918161466a565b60006020828403121561420b578081fd5b5035919050565b600060208284031215614223578081fd5b5051919050565b6000806040838503121561423c578182fd5b82359150602083013561424e8161465c565b809150509250929050565b6000806040838503121561426b578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156142ad57815161ffff168752958201959082019060010161428d565b509495945050505050565b6001600160a01b038416815260406020808301829052908201839052600090849060608401835b868110156143085783356142f28161466a565b61ffff16825292820192908201906001016142df565b50979650505050505050565b6001600160a01b03831681526040602082018190526000906143389083018461427a565b949350505050565b6001600160a01b03841681526060602082018190526000906143649083018561427a565b90508215156040830152949350505050565b602081526000613f91602083018461427a565b6020808252600890820152674f6e6c7920454f4160c01b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526018908201527f746f6b656e206861732070656e64696e6720636f6d6d69740000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601a908201527f4e6f207374616c6520636f6d6d69747320746f2072657665616c000000000000604082015260600190565b60208082526019908201527f616464696e6720636f6d6d69747320646973616c6c6f77656400000000000000604082015260600190565b8381526001600160a01b03831660208201526060604082018190526000906144d99083018461427a565b95945050505050565b8481526001600160a01b038416602082015260806040820181905260009061450c9083018561427a565b9050821515606083015295945050505050565b600061ffff80831681851680830382111561453c5761453c61461b565b01949350505050565b600082198211156145585761455861461b565b500190565b60008261456c5761456c614631565b500490565b600081600019048311821515161561458b5761458b61461b565b500290565b600061ffff838116908316818110156145ab576145ab61461b565b039392505050565b6000828210156145c5576145c561461b565b500390565b600061ffff808316818114156145e2576145e261461b565b6001019392505050565b60006000198214156146005761460061461b565b5060010190565b60008261461657614616614631565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038116811461064457600080fd5b801515811461064457600080fd5b61ffff8116811461064457600080fdfea264697066735822122035663fc2d28265625567faf5ace42c637fc087f34727d029527cf76af6524f7b64736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102065760003560e01c806394cdc9f51161011a578063e1fc334f116100ad578063f2eea45c1161007c578063f2eea45c1461045a578063f2fde38b1461046d578063f62b1c0d14610480578063f63bf8bd14610493578063f8b2a46e146104a657600080fd5b8063e1fc334f1461040e578063e5d391a214610421578063e6eebd8b14610434578063f075b0801461044757600080fd5b8063b7cd90cd116100e9578063b7cd90cd146103d8578063bdc8cbc2146103e0578063cadeef03146103f3578063cd0b86da1461040657600080fd5b806394cdc9f514610388578063999c0700146103905780639ecacf5c146103bd578063b362fb99146103c557600080fd5b80633df6cc4f1161019d5780635c975abb1161016c5780635c975abb1461033e5780636f7bb00a14610349578063715018a61461035c57806383c72a83146103645780638da5cb5b1461037757600080fd5b80633df6cc4f146102e157806343b8e5c0146102f4578063498c626a146103075780634a371d7b1461031b57600080fd5b806326e52ba9116101d957806326e52ba91461027b57806327b574eb146102bb5780632af103c8146102c35780633ccfd60b146102d957600080fd5b8063078e8be71461020b5780631090c5de1461023b57806316c38b3c1461025357806318adfb6214610268575b600080fd5b600f5461021e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6102436104b9565b6040519015158152602001610232565b61026661026136600461418a565b610561565b005b6102666102763660046141fa565b61064f565b6102a861028936600461403e565b6001600160a01b031660009081526006602052604090205461ffff1690565b60405161ffff9091168152602001610232565b610266610724565b6102cb600581565b604051908152602001610232565b61026661085d565b6102666102ef36600461418a565b6108c1565b6102666103023660046141fa565b610909565b600c5461024390600160b01b900460ff1681565b6102436103293660046141fa565b6000908152600b602052604090205460ff1690565b60025460ff16610243565b60105461021e906001600160a01b031681565b610266610938565b6102666103723660046141c2565b61096e565b6000546001600160a01b031661021e565b610266610a34565b6102a861039e36600461403e565b6001600160a01b03166000908152600a602052604090205461ffff1690565b610266610c37565b6102666103d33660046140e6565b610eb5565b610243610fed565b6102666103ee3660046141c2565b611092565b6102666104013660046140e6565b6110ee565b610266611834565b60115461021e906001600160a01b031681565b61026661042f36600461422a565b611ab6565b6102cb610442366004614259565b612340565b610266610455366004614125565b612405565b60135461021e906001600160a01b031681565b61026661047b36600461403e565b612e40565b61026661048e3660046141fa565b612ed8565b6102666104a1366004614076565b612f24565b60125461021e906001600160a01b031681565b600c5460009062010000900461ffff165b61ffff81166000908152600860205260409020541580156104f45750600c5461ffff908116908216105b1561050b5761050460018261451f565b90506104ca565b600c5461052890600160601b90046001600160401b0316426145b3565b61ffff821660009081526009602052604090205410801561055b575061ffff811660009081526008602052604090205415155b91505090565b6010546001600160a01b03161580159061058557506011546001600160a01b031615155b801561059b57506012546001600160a01b031615155b80156105b157506013546001600160a01b031615155b80156105c75750600f546001600160a01b031615155b61060c5760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b60448201526064015b60405180910390fd5b6000546001600160a01b031633146106365760405162461bcd60e51b81526004016106039061440c565b801561064757610644612fad565b50565b610644613022565b6010546001600160a01b03161580159061067357506011546001600160a01b031615155b801561068957506012546001600160a01b031615155b801561069f57506013546001600160a01b031615155b80156106b55750600f546001600160a01b031615155b6106f55760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b6044820152606401610603565b6000546001600160a01b0316331461071f5760405162461bcd60e51b81526004016106039061440c565b600355565b6000546001600160a01b0316331461074e5760405162461bcd60e51b81526004016106039061440c565b60075462010000900461ffff16600090815260046020526040902054158015610785575060075461ffff8082166201000090920416105b156107c9576001600760028282829054906101000a900461ffff166107aa919061451f565b92506101000a81548161ffff021916908361ffff16021790555061074e565b60075462010000900461ffff166000908152600460205260409020546108015760405162461bcd60e51b815260040161060390614441565b60075462010000900461ffff16600090815260046020526040902080548061083957634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160b81b0319169055019055565b6000546001600160a01b031633146108875760405162461bcd60e51b81526004016106039061440c565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610644573d6000803e3d6000fd5b6000546001600160a01b031633146108eb5760405162461bcd60e51b81526004016106039061440c565b600c8054911515600160b01b0260ff60b01b19909216919091179055565b6000546001600160a01b031633146109335760405162461bcd60e51b81526004016106039061440c565b600d55565b6000546001600160a01b031633146109625760405162461bcd60e51b81526004016106039061440c565b61096c600061309c565b565b60025460ff16156109915760405162461bcd60e51b8152600401610603906143ab565b3233146109b05760405162461bcd60e51b815260040161060390614389565b6013546001600160a01b03166351416019600583335b6040516001600160e01b031960e086901b168152600481019390935261ffff90911660248301526001600160a01b031660448201526064015b600060405180830381600087803b158015610a1957600080fd5b505af1158015610a2d573d6000803e3d6000fd5b5050505050565b6000546001600160a01b03163314610a5e5760405162461bcd60e51b81526004016106039061440c565b600c5462010000900461ffff16600090815260086020526040902054158015610a955750600c5461ffff8082166201000090920416105b15610ad9576001600c60028282829054906101000a900461ffff16610aba919061451f565b92506101000a81548161ffff021916908361ffff160217905550610a5e565b600c5462010000900461ffff16600090815260086020526040902054610b115760405162461bcd60e51b815260040161060390614441565b600c5462010000900461ffff1660009081526008602052604081208054610b3a906001906145b3565b81548110610b5857634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160a08101825291909301546001600160a01b038116825261ffff600160a01b820481168385015260ff600160b01b83048116151584870152600160b81b8304811615156060850152600160c01b90920490911615156080830152600c546201000090041684526008909152912080549192509080610bf457634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160c81b03191690559092019092559182015161ffff168152600b90915260409020805460ff19169055565b60025460ff1615610c5a5760405162461bcd60e51b8152600401610603906143ab565b323314610c795760405162461bcd60e51b815260040161060390614389565b60075462010000900461ffff16600090815260046020526040902054158015610cb0575060075461ffff8082166201000090920416105b15610cf4576001600760028282829054906101000a900461ffff16610cd5919061451f565b92506101000a81548161ffff021916908361ffff160217905550610c79565b600c54610d1190600160601b90046001600160401b0316426145b3565b60075462010000900461ffff16600090815260056020526040902054108015610d54575060075462010000900461ffff1660009081526004602052604090205415155b610d705760405162461bcd60e51b815260040161060390614441565b60075462010000900461ffff1660009081526004602052604081208054610d99906001906145b3565b81548110610db757634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160608101825291909301546001600160a01b038116825260ff600160a01b82041615158284015261ffff600160a81b9091048116828501526007546201000090041684526004909152912080549192509080610e3157634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160b81b0319169055019055610e5c816130ec565b6010546001600160a01b03166340c10f1933836040015161ffff16600d54610e849190614571565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016109ff565b60025460ff1615610ed85760405162461bcd60e51b8152600401610603906143ab565b333214610ef75760405162461bcd60e51b815260040161060390614389565b60005b81811015610f8257600b6000848484818110610f2657634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610f3b91906141c2565b61ffff16815260208101919091526040016000205460ff1615610f705760405162461bcd60e51b8152600401610603906143d5565b80610f7a816145ec565b915050610efa565b50600f5460405163315ec95760e11b81526001600160a01b03909116906362bd92ae90610fb7903290869086906004016142b8565b600060405180830381600087803b158015610fd157600080fd5b505af1158015610fe5573d6000803e3d6000fd5b505050505050565b60075460009062010000900461ffff165b61ffff8116600090815260046020526040902054158015611028575060075461ffff908116908216105b1561103f5761103860018261451f565b9050610ffe565b600c5461105c90600160601b90046001600160401b0316426145b3565b61ffff821660009081526005602052604090205410801561055b575061ffff166000908152600460205260409020541515919050565b60025460ff16156110b55760405162461bcd60e51b8152600401610603906143ab565b3233146110d45760405162461bcd60e51b815260040161060390614389565b6013546001600160a01b03166306e7b953600583336109c6565b60025460ff16156111115760405162461bcd60e51b8152600401610603906143ab565b600c54600160b01b900460ff1661113a5760405162461bcd60e51b815260040161060390614478565b3233146111595760405162461bcd60e51b815260040161060390614389565b600c5461ffff1660009081526009602052604090205461118c57600c5461ffff1660009081526009602052604090204290555b600c546111aa9064010000000090046001600160401b0316426145b3565b600c5461ffff16600090815260096020526040902054101561121257600c8054600191906000906111e090849061ffff1661451f565b82546101009290920a61ffff818102199093169183160217909155600c54166000908152600960205260409020429055505b6000805b828110156116f1576012546001600160a01b0316636352211e85858481811061124f57634e487b7160e01b600052603260045260246000fd5b905060200201602081019061126491906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b15801561129e57600080fd5b505afa1580156112b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d6919061405a565b600f546001600160a01b039081169116141561132b5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88185b1c9958591e481cdd185ad95960621b6044820152606401610603565b600b600085858481811061134f57634e487b7160e01b600052603260045260246000fd5b905060200201602081019061136491906141c2565b61ffff16815260208101919091526040016000205460ff16156113995760405162461bcd60e51b8152600401610603906143d5565b6012546001600160a01b0316636352211e8585848181106113ca57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906113df91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b15801561141957600080fd5b505afa15801561142d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611451919061405a565b6001600160a01b0316336001600160a01b0316146114a65760405162461bcd60e51b81526020600482015260126024820152713737ba1037bbb732b91037b3103a37b5b2b760711b6044820152606401610603565b6012546001600160a01b031663ff53f4738585848181106114d757634e487b7160e01b600052603260045260246000fd5b90506020020160208101906114ec91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b15801561152657600080fd5b505afa15801561153a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155e91906141a6565b6115705761156d60018361451f565b91505b6001600b600086868581811061159657634e487b7160e01b600052603260045260246000fd5b90506020020160208101906115ab91906141c2565b61ffff908116825260208083019390935260409182016000908120805460ff191695151595909517909455600c541683526008825291829020825160a081019093523383529190810186868581811061161457634e487b7160e01b600052603260045260246000fd5b905060200201602081019061162991906141c2565b61ffff908116825260016020808401829052600060408086018290526060958601849052875493840188559681528190208551920180549186015196860151948601516080909601511515600160c01b0260ff60c01b19961515600160b81b0260ff60b81b19961515600160b01b029690961661ffff60b01b1998909516600160a01b026001600160b01b03199093166001600160a01b03909416939093179190911795909516919091179190911791909116179055806116e9816145ec565b915050611216565b506010546001600160a01b0316639dc29fac3361171261ffff8516866145b3565b600e5461171f9190614571565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561176557600080fd5b505af1158015611779573d6000803e3d6000fd5b50505050601060009054906101000a90046001600160a01b03166001600160a01b0316639c47ee3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156117cd57600080fd5b505af11580156117e1573d6000803e3d6000fd5b5050336000908152600a60205260408120805486945090925061180990849061ffff1661451f565b92506101000a81548161ffff021916908361ffff16021790555061182f83839050613748565b505050565b60025460ff16156118575760405162461bcd60e51b8152600401610603906143ab565b3233146118765760405162461bcd60e51b815260040161060390614389565b600c5462010000900461ffff166000908152600860205260409020541580156118ad5750600c5461ffff8082166201000090920416105b156118f1576001600c60028282829054906101000a900461ffff166118d2919061451f565b92506101000a81548161ffff021916908361ffff160217905550611876565b600c5461190e90600160601b90046001600160401b0316426145b3565b600c5462010000900461ffff166000908152600960205260409020541080156119515750600c5462010000900461ffff1660009081526008602052604090205415155b61196d5760405162461bcd60e51b815260040161060390614441565b600c5462010000900461ffff1660009081526008602052604081208054611996906001906145b3565b815481106119b457634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160a08101825291909301546001600160a01b038116825261ffff600160a01b820481168385015260ff600160b01b83048116151584870152600160b81b8304811615156060850152600160c01b90920490911615156080830152600c546201000090041684526008909152912080549192509080611a5057634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160c81b0319169055019055611a7b81613a5d565b601054600d546040516340c10f1960e01b815233600482015260248101919091526001600160a01b03909116906340c10f19906044016109ff565b60025460ff1615611ad95760405162461bcd60e51b8152600401610603906143ab565b60026001541415611b2c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610603565b6002600155600c54600160b01b900460ff16611b5a5760405162461bcd60e51b815260040161060390614478565b323314611b795760405162461bcd60e51b815260040161060390614389565b60125460408051630278162160e51b815290516000926001600160a01b031691634f02c42091600480830192602092919082900301818787803b158015611bbf57600080fd5b505af1158015611bd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf791906141de565b90506000601260009054906101000a90046001600160a01b03166001600160a01b0316636abcded16040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4957600080fd5b505afa158015611c5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c819190614212565b600c5490915081908590611ca090600160a01b900461ffff168561451f565b61ffff16611cae9190614545565b1115611cf05760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b6044820152606401610603565b600084118015611d015750600a8411155b611d435760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b6044820152606401610603565b60075461ffff16600090815260056020526040902054611d765760075461ffff1660009081526005602052604090204290555b600c54611d949064010000000090046001600160401b0316426145b3565b60075461ffff166000908152600560205260409020541015611dfc576007805460019190600090611dca90849061ffff1661451f565b82546101009290920a61ffff818102199093169183160217909155600754166000908152600560205260409020429055505b600060015b858111611ee75760075461ffff16600090815260046020526040908190208151606081019092529080336001600160a01b0390811682528815156020808401919091526001604093840181905285549081018655600095865294819020845195018054918501519490930151949091166001600160a81b031990911617600160a01b92151583021761ffff60a81b1916600160a81b61ffff94851602179055600c54611ec9928492611eb59204168761451f565b61ffff16611ec39190614545565b84612340565b611ed39083614545565b915080611edf816145ec565b915050611e01565b508015611fc9576010546001600160a01b0316639dc29fac336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015611f4857600080fd5b505af1158015611f5c573d6000803e3d6000fd5b50505050601060009054906101000a90046001600160a01b03166001600160a01b0316639c47ee3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611fb057600080fd5b505af1158015611fc4573d6000803e3d6000fd5b505050505b33600090815260066020526040812080548792839291611fee90849061ffff1661451f565b92506101000a81548161ffff021916908361ffff16021790555080600c60148282829054906101000a900461ffff16612027919061451f565b92506101000a81548161ffff021916908361ffff1602179055505b60075462010000900461ffff16600090815260046020526040902054158015612079575060075461ffff8082166201000090920416105b156120bd576001600760028282829054906101000a900461ffff1661209e919061451f565b92506101000a81548161ffff021916908361ffff160217905550612042565b600c546120db9064010000000090046001600160401b0316426145b3565b60075462010000900461ffff1660009081526005602052604090205410801561211e575060075462010000900461ffff1660009081526004602052604090205415155b156123345760005b868110156123325760075462010000900461ffff1660009081526004602052604081208054612157906001906145b3565b8154811061217557634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160608101825291909301546001600160a01b038116825260ff600160a01b82041615158284015261ffff600160a81b90910481168285015260075462010000900416845260049091529120805491925090806121ef57634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160b81b031916905501905561221a816130ec565b60075462010000900461ffff16600090815260046020526040902054158015612251575060075461ffff8082166201000090920416105b1561231f576001600760028282829054906101000a900461ffff16612276919061451f565b92506101000a81548161ffff021916908361ffff160217905550600c60049054906101000a90046001600160401b03166001600160401b0316426122ba91906145b3565b60075462010000900461ffff1660009081526005602052604090205411806122fb575060075462010000900461ffff16600090815260046020526040902054155b80612314575060075462010000810461ffff9081169116145b1561231f5750612332565b508061232a816145ec565b915050612126565b505b50506001805550505050565b6000601461234f836008614571565b612359919061455d565b831161237057506905150ae84a8cdf0000006123ff565b601461237d83600b614571565b612387919061455d565b831161239e575069079f905c6fd34e8000006123ff565b60146123ab83600e614571565b6123b5919061455d565b83116123cc5750690a2a15d09519be0000006123ff565b60146123d9836011614571565b6123e3919061455d565b83116123fa5750690cb49b44ba602d8000006123ff565b506003545b92915050565b60025460ff16156124285760405162461bcd60e51b8152600401610603906143ab565b600c54600160b01b900460ff166124515760405162461bcd60e51b815260040161060390614478565b3233146124705760405162461bcd60e51b815260040161060390614389565b600c5461ffff166000908152600960205260409020546124a357600c5461ffff1660009081526009602052604090204290555b600c546124c19064010000000090046001600160401b0316426145b3565b600c5461ffff16600090815260096020526040902054101561252957600c8054600191906000906124f790849061ffff1661451f565b82546101009290920a61ffff818102199093169183160217909155600c54166000908152600960205260409020429055505b6000805b84811015612cfc57600b600087878481811061255957634e487b7160e01b600052603260045260246000fd5b905060200201602081019061256e91906141c2565b61ffff16815260208101919091526040016000205460ff16156125a35760405162461bcd60e51b8152600401610603906143d5565b600f546001600160a01b031663471199f08787848181106125d457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906125e991906141c2565b6040516001600160e01b031960e084901b16815261ffff9091166004820152851515602482015260440160206040518083038186803b15801561262b57600080fd5b505afa15801561263f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061266391906141a6565b80156127225750600f546001600160a01b031663f04d65fd87878481811061269b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906126b091906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272291906141a6565b61276e5760405162461bcd60e51b815260206004820152601960248201527f546f6b656e206e6f7420696e207374616b696e6720706f6f6c000000000000006044820152606401610603565b8315612b73576012546001600160a01b031663ff53f4738787848181106127a557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906127ba91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b1580156127f457600080fd5b505afa158015612808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282c91906141a6565b15612b655782156129ca57600f546040805163051310f160e41b81529051613e80926001600160a01b0316916351310f10916004808301926020929190829003018186803b15801561287d57600080fd5b505afa158015612891573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128b591906141de565b61ffff1610158061297e5750600f546000906001600160a01b031663f60378a78888858181106128f557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061290a91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b15801561294457600080fd5b505afa158015612958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297c9190614212565b115b6129c55760405162461bcd60e51b815260206004820152601860248201527718d85b89dd081d5b9cdd185ad9481dda5e985c99081e595d60421b6044820152606401610603565b612b73565b600f5460408051630530587560e01b815290516b019d964578c18906f9800000926001600160a01b0316916305305875916004808301926020929190829003018186803b158015612a1a57600080fd5b505afa158015612a2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a529190614212565b118061297e5750600f5468d8d726b7177a800000906001600160a01b0316632a427888888885818110612a9557634e487b7160e01b600052603260045260246000fd5b9050602002016020810190612aaa91906141c2565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b158015612ae457600080fd5b505afa158015612af8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1c9190614212565b10156129c55760405162461bcd60e51b815260206004820152601860248201527718d85b89dd081d5b9cdd185ad9481dda5e985c99081e595d60421b6044820152606401610603565b612b7060018361451f565b91505b6001600b6000888885818110612b9957634e487b7160e01b600052603260045260246000fd5b9050602002016020810190612bae91906141c2565b61ffff908116825260208083019390935260409182016000908120805460ff191695151595909517909455600c541683526008825291829020825160a0810190935233835291908101888885818110612c1757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190612c2c91906141c2565b61ffff9081168252600060208084018290528915156040808601919091528915156060958601528654600181018855968352918190208551960180549186015192860151948601516080909601511515600160c01b0260ff60c01b19961515600160b81b0260ff60b81b19961515600160b01b029690961661ffff60b01b1994909516600160a01b026001600160b01b03199093166001600160a01b0390981697909717919091179190911691909117919091179190911691909117905580612cf4816145ec565b91505061252d565b508215612df7576010546001600160a01b0316639dc29fac33612d2361ffff8516886145b3565b600e54612d309190614571565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612d7657600080fd5b505af1158015612d8a573d6000803e3d6000fd5b50505050601060009054906101000a90046001600160a01b03166001600160a01b0316639c47ee3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612dde57600080fd5b505af1158015612df2573d6000803e3d6000fd5b505050505b336000908152600a602052604081208054869290612e1a90849061ffff1661451f565b92506101000a81548161ffff021916908361ffff160217905550610a2d85859050613748565b6000546001600160a01b03163314612e6a5760405162461bcd60e51b81526004016106039061440c565b6001600160a01b038116612ecf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610603565b6106448161309c565b6000546001600160a01b03163314612f025760405162461bcd60e51b81526004016106039061440c565b600c805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b6000546001600160a01b03163314612f4e5760405162461bcd60e51b81526004016106039061440c565b601080546001600160a01b03199081166001600160a01b03978816179091556011805482169587169590951790945560128054851693861693909317909255601380548416918516919091179055600f80549092169216919091179055565b60025460ff1615612fd05760405162461bcd60e51b8152600401610603906143ab565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586130053390565b6040516001600160a01b03909116815260200160405180910390a1565b60025460ff1661306b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610603565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613005565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60125460408051630278162160e51b815290516000926001600160a01b031691634f02c42091600480830192602092919082900301818787803b15801561313257600080fd5b505af1158015613146573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061316a91906141de565b90508160400151600c60148282829054906101000a900461ffff1661318f9190614590565b92506101000a81548161ffff021916908361ffff1602179055506000826040015161ffff166001600160401b038111156131d957634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015613202578160200160208202803683370190505b5090506000836040015161ffff166001600160401b0381111561323557634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561325e578160200160208202803683370190505b50845160075461ffff62010000909104811660009081526005602090815260408083205481516001600160a01b039096168684015293891685820152606080860194909452805180860390940184526080909401909352815191909201209192505b856040015161ffff168110156135e957846132da816145ca565b8751604051919750613303925084916020019182526001600160a01b0316602082015260400190565b6040516020818303038152906040528051906020012060001c9150600061332e838860000151613edb565b905086600001516001600160a01b0316816001600160a01b0316141580156133dd57506013548751604051627eeac760e11b81526001600160a01b03918216600482015260056024820152600092919091169062fdd58e90604401602060405180830381600087803b1580156133a357600080fd5b505af11580156133b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133db9190614212565b115b15613477578260011660011415613477576013548751604051637921219560e11b81526001600160a01b0391821660048201528382166024820152600560448201526001606482015260a06084820152600060a482015291169063f242432a9060c401600060405180830381600087803b15801561345a57600080fd5b505af115801561346e573d6000803e3d6000fd5b50508851925050505b8585838151811061349857634e487b7160e01b600052603260045260246000fd5b61ffff90921660209283029190910182015287015115806134c6575086516001600160a01b03828116911614155b15613536576012546040516340c10f1960e01b81526001600160a01b03838116600483015260248201869052909116906340c10f1990604401600060405180830381600087803b15801561351957600080fd5b505af115801561352d573d6000803e3d6000fd5b505050506135d6565b601254600f546040516340c10f1960e01b81526001600160a01b039182166004820152602481018690529116906340c10f1990604401600060405180830381600087803b15801561358657600080fd5b505af115801561359a573d6000803e3d6000fd5b50505050858483815181106135bf57634e487b7160e01b600052603260045260246000fd5b602002602001019061ffff16908161ffff16815250505b50806135e1816145ec565b9150506132c0565b506012546040516335ca838b60e01b81526001600160a01b03909116906335ca838b9061361a908690600401614376565b600060405180830381600087803b15801561363457600080fd5b505af1158015613648573d6000803e3d6000fd5b505050508460200151801561368a57508160008151811061367957634e487b7160e01b600052603260045260246000fd5b602002602001015161ffff16600014155b156136f457600f54855160405163315ec95760e11b81526001600160a01b03909216916362bd92ae916136c1918690600401614314565b600060405180830381600087803b1580156136db57600080fd5b505af11580156136ef573d6000803e3d6000fd5b505050505b60408086015186516001600160a01b03166000908152600660205291822080549192909161372790849061ffff16614590565b92506101000a81548161ffff021916908361ffff1602179055505050505050565b600c5462010000900461ffff1660009081526008602052604090205415801561377f5750600c5461ffff8082166201000090920416105b156137c3576001600c60028282829054906101000a900461ffff166137a4919061451f565b92506101000a81548161ffff021916908361ffff160217905550613748565b600c546137e19064010000000090046001600160401b0316426145b3565b600c5462010000900461ffff166000908152600960205260409020541080156138245750600c5462010000900461ffff1660009081526008602052604090205415155b156106445760005b81811015613a5957600c5462010000900461ffff166000908152600860205260408120805461385d906001906145b3565b8154811061387b57634e487b7160e01b600052603260045260246000fd5b600091825260208083206040805160a08101825291909301546001600160a01b038116825261ffff600160a01b820481168385015260ff600160b01b83048116151584870152600160b81b8304811615156060850152600160c01b90920490911615156080830152600c54620100009004168452600890915291208054919250908061391757634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160c81b031916905501905561394281613a5d565b600c5462010000900461ffff166000908152600860205260409020541580156139795750600c5461ffff8082166201000090920416105b15613a46576001600c60028282829054906101000a900461ffff1661399e919061451f565b92506101000a81548161ffff021916908361ffff160217905550600c60049054906101000a90046001600160401b03166001600160401b0316426139e291906145b3565b600c5462010000900461ffff166000908152600960205260409020541180613a235750600c5462010000900461ffff16600090815260086020526040902054155b80613a3c5750600c5462010000810461ffff9081169116145b15613a4657505050565b5080613a51816145ec565b91505061382c565b5050565b60408051600180825281830190925260009160208083019080368337019050509050816020015181600081518110613aa557634e487b7160e01b600052603260045260246000fd5b61ffff928316602091820292909201810191909152838101519091166000908152600b909152604090819020805460ff1916905582015115613d1257815160125460208401516040516331a9108f60e11b815261ffff90911660048201526001600160a01b039283169290911690636352211e9060240160206040518083038186803b158015613b3457600080fd5b505afa158015613b48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b6c919061405a565b6001600160a01b031614613b7e575050565b6012546020830151604051600162ac0b8d60e01b0319815261ffff90911660048201526001600160a01b039091169063ff53f4739060240160206040518083038186803b158015613bce57600080fd5b505afa158015613be2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c0691906141a6565b15613ca957602082810151600c5462010000900461ffff166000908152600990925260408220548451613c3a929190613f98565b600f54845160405162eacb7960e51b81529293506001600160a01b0390911691631d596f2091613c719185919087906004016144af565b600060405180830381600087803b158015613c8b57600080fd5b505af1158015613c9f573d6000803e3d6000fd5b5050505050613e8f565b600f54825160405163315ec95760e11b81526001600160a01b03909216916362bd92ae91613cdb918590600401614314565b600060405180830381600087803b158015613cf557600080fd5b505af1158015613d09573d6000803e3d6000fd5b50505050613e8f565b600f5460208301516080840151604051630471199f60e41b815261ffff9092166004830152151560248201526001600160a01b039091169063471199f09060440160206040518083038186803b158015613d6b57600080fd5b505afa158015613d7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613da391906141a6565b613dab575050565b816080015115613e2257602082810151600c5462010000900461ffff166000908152600990925260408220548451613de4929190613f98565b600f5484516060860151604051630b3eb67160e01b81529394506001600160a01b0390921692630b3eb67192613c71928692909188916004016144e2565b600f5482516060840151604051633e6bca0760e01b81526001600160a01b0390931692633e6bca0792613e5c929091869190600401614340565b600060405180830381600087803b158015613e7657600080fd5b505af1158015613e8a573d6000803e3d6000fd5b505050505b81516001600160a01b03166000908152600a60205260408120805460019290613ebd90849061ffff16614590565b92506101000a81548161ffff021916908361ffff1602179055505050565b6000613eec600a60f585901c614607565b15613ef85750806123ff565b600f54604051638336a6cf60e01b8152609085901c60048201526000916001600160a01b031690638336a6cf9060240160206040518083038186803b158015613f4057600080fd5b505afa158015613f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f78919061405a565b90506001600160a01b038116613f9157829150506123ff565b9392505050565b6040516bffffffffffffffffffffffff19606083901b1660208201526001600160f01b031960f085901b1660348201526036810183905260009060560160408051601f198184030181529190528051602090910120949350505050565b60008083601f840112614006578182fd5b5081356001600160401b0381111561401c578182fd5b6020830191508360208260051b850101111561403757600080fd5b9250929050565b60006020828403121561404f578081fd5b8135613f9181614647565b60006020828403121561406b578081fd5b8151613f9181614647565b600080600080600060a0868803121561408d578081fd5b853561409881614647565b945060208601356140a881614647565b935060408601356140b881614647565b925060608601356140c881614647565b915060808601356140d881614647565b809150509295509295909350565b600080602083850312156140f8578182fd5b82356001600160401b0381111561410d578283fd5b61411985828601613ff5565b90969095509350505050565b6000806000806060858703121561413a578384fd5b84356001600160401b0381111561414f578485fd5b61415b87828801613ff5565b909550935050602085013561416f8161465c565b9150604085013561417f8161465c565b939692955090935050565b60006020828403121561419b578081fd5b8135613f918161465c565b6000602082840312156141b7578081fd5b8151613f918161465c565b6000602082840312156141d3578081fd5b8135613f918161466a565b6000602082840312156141ef578081fd5b8151613f918161466a565b60006020828403121561420b578081fd5b5035919050565b600060208284031215614223578081fd5b5051919050565b6000806040838503121561423c578182fd5b82359150602083013561424e8161465c565b809150509250929050565b6000806040838503121561426b578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156142ad57815161ffff168752958201959082019060010161428d565b509495945050505050565b6001600160a01b038416815260406020808301829052908201839052600090849060608401835b868110156143085783356142f28161466a565b61ffff16825292820192908201906001016142df565b50979650505050505050565b6001600160a01b03831681526040602082018190526000906143389083018461427a565b949350505050565b6001600160a01b03841681526060602082018190526000906143649083018561427a565b90508215156040830152949350505050565b602081526000613f91602083018461427a565b6020808252600890820152674f6e6c7920454f4160c01b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526018908201527f746f6b656e206861732070656e64696e6720636f6d6d69740000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601a908201527f4e6f207374616c6520636f6d6d69747320746f2072657665616c000000000000604082015260600190565b60208082526019908201527f616464696e6720636f6d6d69747320646973616c6c6f77656400000000000000604082015260600190565b8381526001600160a01b03831660208201526060604082018190526000906144d99083018461427a565b95945050505050565b8481526001600160a01b038416602082015260806040820181905260009061450c9083018561427a565b9050821515606083015295945050505050565b600061ffff80831681851680830382111561453c5761453c61461b565b01949350505050565b600082198211156145585761455861461b565b500190565b60008261456c5761456c614631565b500490565b600081600019048311821515161561458b5761458b61461b565b500290565b600061ffff838116908316818110156145ab576145ab61461b565b039392505050565b6000828210156145c5576145c561461b565b500390565b600061ffff808316818114156145e2576145e261461b565b6001019392505050565b60006000198214156146005761460061461b565b5060010190565b60008261461657614616614631565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038116811461064457600080fd5b801515811461064457600080fd5b61ffff8116811461064457600080fdfea264697066735822122035663fc2d28265625567faf5ace42c637fc087f34727d029527cf76af6524f7b64736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.