ETH Price: $2,974.72 (+2.55%)
Gas: 2 Gwei

Contract

0x15970e322847229b37CE8f7AdFe848808b1c7d2F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040138537002021-12-22 7:44:29926 days ago1640159069IN
 Create: Roar
0 ETH0.3951100

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Roar

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.8.7;



import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

// Utility Libraries
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";


// Security Libraries 
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";


// Token Libraries
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "./ERC721EnumerableUpgradeable.sol";
import "./VRFConsumerBaseUpgradeable.sol";


interface ISalmon {
  function burn(address from, uint256 amount) external;
}

interface IRiver {
  function addManyToRiverSideAndFishing(address account, uint16[] calldata tokenIds) external;
  function randomBearOwner(uint256 seed) external view returns (address);
}

interface IRiverOld {
  function randomBearOwner(uint256 seed) external view returns (address);
}

contract Roar is ReentrancyGuardUpgradeable, ERC721EnumerableUpgradeable, OwnableUpgradeable, PausableUpgradeable, VRFConsumerBaseUpgradeable {

  using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet; 
  using CountersUpgradeable for CountersUpgradeable.Counter;
  using AddressUpgradeable for address;


  // mint variables      
  mapping (address => bool) whitelistedContracts;              
  uint256 public  MAX_TOKENS;                                            // max number of tokens that can be minted - 50000 in production
  uint16 public minted;                                                  // number of tokens have been minted so far
  string public baseURI;

  // mappings
  mapping(uint256 => ManBear) private tokenTraits;                       // mapping from tokenId to a struct containing the token's traits
  mapping(uint256 => uint256) private existingCombinations;              // mapping from hashed(tokenTrait) to the tokenId it's associated with, Why? used to ensure there are no duplicates
  mapping(address => uint256[]) public _mints;

  
  struct ManBear {bool isFisherman; uint8[14] traitarray; uint8 alphaIndex;}

  // Pobabilities & Aliases
  // 0 - 8 are associated with fishermen, 9 - 13 are associated with Bears
  uint8[][18] public rarities;
  uint8[][18] public aliases;

  IRiverOld public oldRiver;
  IRiver public river;                                                      
  ISalmon public salmon;                                                    

  //Chainlink Setup:
  bytes32 internal keyHash;
  uint256 public fee;
  uint256 internal randomResult;
  uint256 internal randomNumber;
  address public linkToken;
  uint256 public vrfcooldown;
  CountersUpgradeable.Counter public vrfReqd;


  function initialize(address _salmon, uint256 _maxTokens, address _vrfCoordinator, address _link) initializer public {

   __ERC721_init("Bear Game Gen Y", "BEARGENY");
   __ERC721Enumerable_init();
    __Ownable_init();
    __ReentrancyGuard_init();
    __Pausable_init();
    __VRFConsumerBase_init(_vrfCoordinator,_link);


    keyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
    fee = 2 * 10 ** 18; // 2 LINK (Varies by network)
    linkToken = _link;
    vrfcooldown = 300;


    // Initate Interfaces
    salmon = ISalmon(_salmon);

    minted = 10498;
    MAX_TOKENS = _maxTokens;  

    rarities[0] = [31,49,51,69,113,187,204,207,225]; 
    rarities[1] = [35,48,67,115,189,208,221];
    rarities[2] = [59,97,136,159,197];
    rarities[3] = [85,113,131,143,169];
    rarities[4] = [255,255,255,255];
    rarities[5] = [34,59,118,164,197,222];
    rarities[6] = [59,111,145,197];
    rarities[7] = [57,93,163,199];
    rarities[8] = [255];

    aliases[0] = [8,7,6,5,4,3,2,1,0];
    aliases[1] = [6,5,4,3,2,1,0];
    aliases[2] = [4,3,2,1,0];
    aliases[3] = [4,3,2,1,0];
    aliases[4] = [3,2,1,0];
    aliases[5] = [5,4,3,2,1,0];
    aliases[6] = [3,2,1,0];
    aliases[7] = [3,2,1,0];
    aliases[8] = [0];

    rarities[9] = [255,255,255,255,255];
    rarities[10] = [39,51,59,67,125,131,189,197,204,217];
    rarities[11] = [51,54,57,64,72,90,194,199,202,207,212];
    rarities[12] = [48,60,96,160,196,208];
    rarities[13] = [51,102,153,204];

    aliases[9] = [0,1,2,3,4];
    aliases[10] = [9,8,7,6,5,4,3,2,1,0];
    aliases[11] = [10,9,8,7,6,5,4,3,2,1,0];
    aliases[12] = [5,4,3,2,1,0];
    aliases[13] = [3,2,1,0];
    
  
  }    
  // Calculates Mint Cost using $SALMON
  function mintCost(uint256 tokenId) public pure returns (uint256) {              
    if (tokenId <= 17000) return 20000 ether;              
    if (tokenId <= 27000) return 40000 ether;          
    if (tokenId <= 37000) return 60000 ether;         
    return 80000 ether;                                            
  }

  // Main Mint Functions
  function mint(uint256 amount, bool stake) external payable whenNotPaused nonReentrant() {

    address msgSender = _msgSender();

    require(!_msgSender().isContract(), "Contracts are not allowed big man");
    require(tx.origin == msgSender, "Only EOA");
    require(minted + amount <= MAX_TOKENS, "All tokens minted");
    require(amount > 0 && amount <= 10, "Invalid mint amount");
    require(msg.value == 0);

    getRandomChainlink();
    
    uint256 totalSalmonCost = 0;                                                          // $SALMON Cost to mint. 0 is Gen0
    uint16[] memory tokenIds = stake ? new uint16[](amount) : new uint16[](0);          
    uint256 seed;

    for (uint i = 0; i < amount; i++) {
      minted++;
      seed = random(minted);                                                            
      ManBear memory t = generate(seed);                                                            // Generates Token Traits and adds it to the array
      address recipient = selectRecipient(seed);                                         // Selects who the NFT is going to. Gen0 always will be minter. 
      if (!stake || recipient != msgSender) {                                            // recipient != _msgSender()
        _safeMint(recipient, minted);
      } else {
        _safeMint(address(river), minted);
        tokenIds[i] = minted;
      }
      totalSalmonCost += mintCost(minted);
      tokenTraits[minted] = t;
    }
    
    if (totalSalmonCost > 0) salmon.burn(msgSender, totalSalmonCost);
    if (stake) river.addManyToRiverSideAndFishing(msgSender, tokenIds);
  }

  function transferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public virtual override {
    // Hardcode the River's approval so that users don't have to waste gas approving
    if (_msgSender() != address(river))
      require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
    _transfer(from, to, tokenId);
  }

  // generates traits for a specific token, checking to make sure it's unique
  function generate(uint256 seed) private view returns (ManBear memory t) {

    t.isFisherman = (seed & 0xFFFF) % 10 != 0;
    t.traitarray[0] = 0;

    seed >>= 64;
    uint8 trait = uint8(seed) % uint8(rarities[13].length);           

    if (seed >> 8 < rarities[13][trait]) {
      t.alphaIndex = trait; 
      return t;
    }     

    t.alphaIndex = aliases[13][trait];  
    return t;

  }

  // Selects Trait using A.J. Walker's Alias algorithm for O(1) rarity table lookup
  function selectTrait(uint16 seed, uint8 traitType) private view returns (uint8) {

    uint8 trait = uint8(seed) % uint8(rarities[traitType].length);           
    if (seed >> 8 < rarities[traitType][trait]) return trait;                 
    return aliases[traitType][trait];

  }


  // selects the species and all of its traits based on the seed value
  function selectTraits(uint256 seed) private view returns (ManBear memory t) {    
    t.isFisherman = (seed & 0xFFFF) % 10 != 0;
    uint8 shift = t.isFisherman ? 0 : 9;                                          // 0 if its a Fisherman, 9 if its Bear

    seed >>= 16;
    if (t.isFisherman) {

      // / 0 - 8 are associated with fishermen, 


      t.traitarray[0] = selectTrait(uint16(seed & 0xFFFF), 0 + shift);
      seed >>= 16;
      t.traitarray[1] = selectTrait(uint16(seed & 0xFFFF), 1 + shift);
      seed >>= 16;
      t.traitarray[2] = selectTrait(uint16(seed & 0xFFFF), 2 + shift);
      seed >>= 16;
      t.traitarray[3] = selectTrait(uint16(seed & 0xFFFF), 3 + shift);
      seed >>= 16;
      t.traitarray[4] = selectTrait(uint16(seed & 0xFFFF), 4 + shift);
      seed >>= 16;
      t.traitarray[5] = selectTrait(uint16(seed & 0xFFFF), 5 + shift);
      seed >>= 16;
      t.traitarray[6] = selectTrait(uint16(seed & 0xFFFF), 6 + shift);
      seed >>= 16;
      t.traitarray[7] = selectTrait(uint16(seed & 0xFFFF), 7 + shift);
      seed >>= 16;
      t.traitarray[8] = selectTrait(uint16(seed & 0xFFFF), 8 + shift);

      t.alphaIndex = 0;




    } else {
      // 9 - 13 are associated with Bears

      t.traitarray[9] = selectTrait(uint16(seed & 0xFFFF), 0 + shift);
      seed >>= 16;
      t.traitarray[10] = selectTrait(uint16(seed & 0xFFFF), 1 + shift);
      seed >>= 16;
      t.traitarray[11] = selectTrait(uint16(seed & 0xFFFF), 2 + shift);
      seed >>= 16;
      t.traitarray[12] = selectTrait(uint16(seed & 0xFFFF), 3 + shift);
      seed >>= 16;
      t.traitarray[13] = selectTrait(uint16(seed & 0xFFFF), 4 + shift);

      t.alphaIndex = t.traitarray[13];
      
      
    }

  }


  // converts a struct to a 256 bit hash to check for uniqueness
  function structToHash(bool isFisherman, uint8[14] memory traitarray, uint8 alphaIndex) internal pure returns (uint256) {
    if(isFisherman){
      return uint256(bytes32(abi.encodePacked(true,
        traitarray[0],
        traitarray[1],
        traitarray[2],
        traitarray[3],
        traitarray[4],
        traitarray[5],
        traitarray[6],
        traitarray[7],
        traitarray[8],
        "0",
        "0",
        "0",
        "0",
        "0",
        alphaIndex)));
    }
    else{
      return uint256(bytes32(abi.encodePacked(false,
        "0",
        "0",
        "0",
        "0",
        "0",
        "0",
        "0",
        "0",
        "0",
        traitarray[9],
        traitarray[10],
        traitarray[11],
        traitarray[12],
        traitarray[13],
        alphaIndex)));
    }
    
  }
  // Select who the NFT goes to --- The first 20% (ETH purchases) go to the minter & the remaining 80% have a 10% chance to be given to a random staked Bear
  function selectRecipient(uint256 seed) private view returns (address) {

    
    require(tx.origin == msg.sender && !_msgSender().isContract(), "Contracts are not allowed big man");
     
    if (((seed >> 245) % 10) != 0) return _msgSender();                 // top 10 bits haven't been used
    if (random(seed) & 1 == 1) {                                           
        address thiefGenX = oldRiver.randomBearOwner(seed >> 144);
        return thiefGenX;
    }
    
    address thief = river.randomBearOwner(seed >> 144);                                       
    if (thief == address(0x0)) return _msgSender();
    return thief;
  }

  /** READ */


  function setWhitelistContract(address contract_address, bool status) public onlyOwner{
      whitelistedContracts[contract_address] = status;
  }

  function getTokenTraits(uint256 tokenId) public view returns (ManBear memory) {
  
      if (tx.origin != msg.sender) {
          require(whitelistedContracts[msg.sender], "You're not allowed to call this function");
      }

      return tokenTraits[tokenId];
  }

  function setRiver(address _river, address _oldRiver) external onlyOwner {
    river = IRiver(_river);
    oldRiver = IRiverOld(_oldRiver); 
    getRandomChainlink();
  }

  function setSalmon(address erc20Address) public onlyOwner {
    salmon = ISalmon(erc20Address);
  }
  
  // Set Base URL
  function setURI(string memory _newBaseURI) external onlyOwner {
		  baseURI = _newBaseURI;
  }

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


  /** RENDER */

  function setBaseURI(string memory newUri) public onlyOwner {
      baseURI = newUri;
  }


  function _baseURI() internal view virtual override returns (string memory) {
      return baseURI;
  }


  function getTokenIds(address _owner) public view returns (uint256[] memory _tokensOfOwner) {
        _tokensOfOwner = new uint256[](balanceOf(_owner));
        for (uint256 i;i<balanceOf(_owner);i++){
            _tokensOfOwner[i] = tokenOfOwnerByIndex(_owner, i);
        }
  }


      
  /** RANDOMNESSSS */

  function random(uint256 seed) private view returns (uint256) {
    return uint256(keccak256(abi.encodePacked(
      tx.origin,
      blockhash(block.number - 1),
      block.timestamp,
      seed,
      randomNumber
    )));
  }

  function changeLinkFee(uint256 _fee) external onlyOwner {
    // fee = 0.1 * 10 ** 18; // 0.1 LINK (Varies by network)
    fee = _fee;
  }

  function initChainLink() external onlyOwner returns (bytes32 requestId){
    require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");
    return requestRandomness(keyHash, fee);
  }

  function getRandomChainlink() internal returns (bytes32 requestId) {

    if (vrfReqd.current() <= vrfcooldown) {
      vrfReqd.increment();
      return 0x000;
    }

    require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");
    vrfReqd.reset();
    return requestRandomness(keyHash, fee);
  }

  function changeVrfCooldown(uint256 _cooldown) external onlyOwner{
      vrfcooldown = _cooldown;
  }

  function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
      bytes32 reqId = requestId;
      randomNumber = randomness;
  }

  function withdrawLINK() external onlyOwner {
    uint256 tokenSupply = IERC20Upgradeable(linkToken).balanceOf(address(this));
    IERC20Upgradeable(linkToken).transfer(msg.sender, tokenSupply);
  }
  
  function changeLinkAddress(address _newaddress) external onlyOwner{
      linkToken = _newaddress;
  }

  function changeMaxtokens(uint256 _maxTokens) external onlyOwner {

    MAX_TOKENS = _maxTokens;
    
  }

}

File 2 of 22 : VRFConsumerBaseUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";

import "@chainlink/contracts/src/v0.8/VRFRequestIDBase.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constuctor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.)
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request.
 */
abstract contract VRFConsumerBaseUpgradeable is VRFRequestIDBase, Initializable {

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

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

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

  LinkTokenInterface internal LINK;
  address private vrfCoordinator;

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

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

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

File 3 of 22 : ERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;


import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";



/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {
    using AddressUpgradeable for address;

    function __ERC721Enumerable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721Enumerable_init_unchained();
    }

    function __ERC721Enumerable_init_unchained() internal initializer {
    }
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) {
        return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(!_msgSender().isContract(), "Contracts are not allowed big man");
        require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(!_msgSender().isContract(), "Contracts are not allowed big man");
        require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721Upgradeable.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
    uint256[46] private __gap;
}

File 4 of 22 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSetUpgradeable {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 5 of 22 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

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 IERC165Upgradeable {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 6 of 22 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal initializer {
        __ERC165_init_unchained();
    }

    function __ERC165_init_unchained() internal initializer {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }
    uint256[50] private __gap;
}

File 7 of 22 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 8 of 22 : CountersUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Counters.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 9 of 22 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

File 10 of 22 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 22 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 12 of 22 : IERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721EnumerableUpgradeable is IERC721Upgradeable {
    /**
     * @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 22 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @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 22 : IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721ReceiverUpgradeable {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 15 of 22 : ERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    function __ERC721_init(string memory name_, string memory symbol_) internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721_init_unchained(name_, symbol_);
    }

    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
        return
            interfaceId == type(IERC721Upgradeable).interfaceId ||
            interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721Upgradeable.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
    uint256[44] private __gap;
}

File 16 of 22 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 17 of 22 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ReentrancyGuardUpgradeable is Initializable {
    // 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;

    function __ReentrancyGuard_init() internal initializer {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal initializer {
        _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 making 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;
    }
    uint256[49] private __gap;
}

File 18 of 22 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @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.
     */
    function __Pausable_init() internal initializer {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal initializer {
        _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());
    }
    uint256[49] private __gap;
}

File 19 of 22 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}

File 20 of 22 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
    uint256[49] private __gap;
}

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

interface LinkTokenInterface {

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

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

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

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

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

  function increaseApproval(
    address spender,
    uint256 subtractedValue
  ) external;

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

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

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

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

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

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

}

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

contract VRFRequestIDBase {

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

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_mints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"aliases","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newaddress","type":"address"}],"name":"changeLinkAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"changeLinkFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTokens","type":"uint256"}],"name":"changeMaxtokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cooldown","type":"uint256"}],"name":"changeVrfCooldown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getTokenIds","outputs":[{"internalType":"uint256[]","name":"_tokensOfOwner","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenTraits","outputs":[{"components":[{"internalType":"bool","name":"isFisherman","type":"bool"},{"internalType":"uint8[14]","name":"traitarray","type":"uint8[14]"},{"internalType":"uint8","name":"alphaIndex","type":"uint8"}],"internalType":"struct Roar.ManBear","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initChainLink","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_salmon","type":"address"},{"internalType":"uint256","name":"_maxTokens","type":"uint256"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_link","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"linkToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldRiver","outputs":[{"internalType":"contract IRiverOld","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rarities","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"river","outputs":[{"internalType":"contract IRiver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"salmon","outputs":[{"internalType":"contract ISalmon","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_river","type":"address"},{"internalType":"address","name":"_oldRiver","type":"address"}],"name":"setRiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"}],"name":"setSalmon","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contract_address","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setWhitelistContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vrfReqd","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vrfcooldown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawLINK","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50614683806100206000396000f3fe6080604052600436106102e45760003560e01c80636352211e1161019057806399e4d8ef116100dc578063cedb363b11610095578063e985e9c51161006f578063e985e9c5146108b5578063f2fde38b146108fe578063f47c84c51461091e578063fc68f75b1461093557600080fd5b8063cedb363b14610851578063d004b03614610871578063ddca3f431461089e57600080fd5b806399e4d8ef146107a4578063a22cb465146107bb578063adc2112f146107db578063b88d4fde146107f0578063c87b56dd14610810578063cc1dda0f1461083057600080fd5b806383a3af531161014957806394985ddd1161012357806394985ddd1461072257806394e5684714610742578063953a01fc1461076f57806395d89b411461078f57600080fd5b806383a3af53146106c4578063873efeff146106e45780638da5cb5b1461070457600080fd5b80636352211e1461063257806367f68fac146106525780636c0360eb1461066557806370a082311461067a578063715018a61461069a5780637a98a82a146106af57600080fd5b806333df4b2c1161024f5780634f02c42011610208578063568303ca116101e2578063568303ca146105c057806357970e93146105d85780635c975abb146105f95780635e0508661461061257600080fd5b80634f02c420146105715780634f6ccce7146105a057806355f804b31461031e57600080fd5b806333df4b2c1461049d578063358394d8146104cf57806336838391146104ef5780633d955a701461050f57806342842e0e146105305780634cb257001461055057600080fd5b806316c38b3c116102a157806316c38b3c146103e857806318160ddd1461040857806323b872dd1461041d57806324b5b9ec1461043d57806327de8f271461045d5780632f745c591461047d57600080fd5b806301ffc9a7146102e957806302fe53051461031e57806306fdde0314610340578063081812fc14610362578063095ea7b31461039a578063109b1ee6146103ba575b600080fd5b3480156102f557600080fd5b50610309610304366004614039565b610955565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b5061033e610339366004614073565b610980565b005b34801561034c57600080fd5b506103556109cb565b6040516103159190614279565b34801561036e57600080fd5b5061038261037d3660046140bc565b610a5d565b6040516001600160a01b039091168152602001610315565b3480156103a657600080fd5b5061033e6103b5366004613f5e565b610af2565b3480156103c657600080fd5b506103da6103d5366004613f5e565b610c08565b604051908152602001610315565b3480156103f457600080fd5b5061033e610403366004613fdd565b610c3a565b34801561041457600080fd5b5060cb546103da565b34801561042957600080fd5b5061033e610438366004613e6f565b610c7d565b34801561044957600080fd5b5061033e6104583660046140bc565b610cca565b34801561046957600080fd5b506103da6104783660046140bc565b610cfa565b34801561048957600080fd5b506103da610498366004613f5e565b610d5b565b3480156104a957600080fd5b506104bd6104b8366004614017565b610e22565b60405160ff9091168152602001610315565b3480156104db57600080fd5b5061033e6104ea366004613f8a565b610e69565b3480156104fb57600080fd5b506104bd61050a366004614017565b611711565b34801561051b57600080fd5b5061018f54610382906001600160a01b031681565b34801561053c57600080fd5b5061033e61054b366004613e6f565b611722565b34801561055c57600080fd5b5061018e54610382906001600160a01b031681565b34801561057d57600080fd5b506101655461058d9061ffff1681565b60405161ffff9091168152602001610315565b3480156105ac57600080fd5b506103da6105bb3660046140bc565b61173d565b3480156105cc57600080fd5b50610197546103da9081565b3480156105e457600080fd5b5061019554610382906001600160a01b031681565b34801561060557600080fd5b5061012d5460ff16610309565b34801561061e57600080fd5b5061033e61062d366004613e36565b6117f0565b34801561063e57600080fd5b5061038261064d3660046140bc565b611854565b61033e6106603660046140ee565b6118cb565b34801561067157600080fd5b50610355611d64565b34801561068657600080fd5b506103da610695366004613dfc565b611df3565b3480156106a657600080fd5b5061033e611e7a565b3480156106bb57600080fd5b506103da611eb0565b3480156106d057600080fd5b5061033e6106df3660046140bc565b611f90565b3480156106f057600080fd5b5061033e6106ff3660046140bc565b611fc0565b34801561071057600080fd5b5060fb546001600160a01b0316610382565b34801561072e57600080fd5b5061033e61073d366004614017565b611ff0565b34801561074e57600080fd5b5061076261075d3660046140bc565b612052565b604051610315919061443e565b34801561077b57600080fd5b5061033e61078a366004613dfc565b612160565b34801561079b57600080fd5b506103556121ad565b3480156107b057600080fd5b506103da6101965481565b3480156107c757600080fd5b5061033e6107d6366004613f30565b6121bc565b3480156107e757600080fd5b5061033e6121c7565b3480156107fc57600080fd5b5061033e61080b366004613eb0565b6122f4565b34801561081c57600080fd5b5061035561082b3660046140bc565b61232c565b34801561083c57600080fd5b5061019054610382906001600160a01b031681565b34801561085d57600080fd5b5061033e61086c366004613f30565b612407565b34801561087d57600080fd5b5061089161088c366004613dfc565b61245d565b6040516103159190614235565b3480156108aa57600080fd5b506103da6101925481565b3480156108c157600080fd5b506103096108d0366004613e36565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b34801561090a57600080fd5b5061033e610919366004613dfc565b6124fe565b34801561092a57600080fd5b506103da6101645481565b34801561094157600080fd5b5061033e610950366004613dfc565b612596565b60006001600160e01b0319821663780e9d6360e01b148061097a575061097a826125e3565b92915050565b60fb546001600160a01b031633146109b35760405162461bcd60e51b81526004016109aa906143b8565b60405180910390fd5b80516109c790610166906020840190613bb1565b5050565b6060609780546109da906144fe565b80601f0160208091040260200160405190810160405280929190818152602001828054610a06906144fe565b8015610a535780601f10610a2857610100808354040283529160200191610a53565b820191906000526020600020905b815481529060010190602001808311610a3657829003601f168201915b5050505050905090565b6000818152609960205260408120546001600160a01b0316610ad65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109aa565b506000908152609b60205260409020546001600160a01b031690565b6000610afd82611854565b9050806001600160a01b0316836001600160a01b03161415610b6b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109aa565b336001600160a01b0382161480610b875750610b8781336108d0565b610bf95760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109aa565b610c038383612633565b505050565b6101696020528160005260406000208181548110610c2557600080fd5b90600052602060002001600091509150505481565b60fb546001600160a01b03163314610c645760405162461bcd60e51b81526004016109aa906143b8565b8015610c7557610c726126a1565b50565b610c7261273b565b61018f546001600160a01b0316336001600160a01b031614610cbf57610ca333826127b7565b610cbf5760405162461bcd60e51b81526004016109aa906143ed565b610c038383836128ae565b60fb546001600160a01b03163314610cf45760405162461bcd60e51b81526004016109aa906143b8565b61016455565b60006142688211610d16575069043c33c1937564800000919050565b6169788211610d305750690878678326eac9000000919050565b6190888211610d4a5750690cb49b44ba602d800000919050565b506910f0cf064dd592000000919050565b6000610d71335b6001600160a01b03163b151590565b15610d8e5760405162461bcd60e51b81526004016109aa906142de565b610d9783611df3565b8210610df95760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016109aa565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b61016a8260128110610e3357600080fd5b018181548110610e4257600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600054610100900460ff1680610e82575060005460ff16155b610e9e5760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015610ec0576000805461ffff19166101011790555b610f116040518060400160405280600f81526020016e426561722047616d652047656e205960881b815250604051806040016040528060088152602001674245415247454e5960c01b815250612a59565b610f19612ae0565b610f21612b63565b610f29612bca565b610f31612c29565b610f3b8383612c90565b7faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44561019155671bc16d674ec800006101925561019580546001600160a01b038085166001600160a01b03199283161790925561012c61019655610190805492881692909116919091179055610165805461ffff19166129021790556101648490556040805161012081018252601f815260316020820152603391810191909152604560608201526071608082015260bb60a082015260cc60c082015260cf60e082015260e161010082015261016a6000611019929101906009613c35565b506040805160e08101825260238152603060208201526043918101919091526073606082015260bd608082015260d060a082015260dd60c08201526110639061016b906007613c35565b506040805160a081018252603b815260616020820152608891810191909152609f606082015260c5608082015261109f9061016c906005613c35565b506040805160a0810182526055815260716020820152608391810191909152608f606082015260a960808201526110db9061016d906005613c35565b506040805160808101825260ff80825260208201819052918101829052606081019190915261110f9061016e906004613c35565b506040805160c08101825260228152603b602082015260769181019190915260a4606082015260c5608082015260de60a08201526111529061016f906006613c35565b5060408051608081018252603b8152606f602082015260919181019190915260c5606082015261118790610170906004613c35565b506040805160808101825260398152605d602082015260a39181019190915260c760608201526111bc90610171906004613c35565b50604080516020810190915260ff81526111db90610172906001613c35565b50604080516101208101825260088152600760208201526006918101919091526005606082015260046080820152600360a0820152600260c0820152600160e082015260006101008201526112359061017c906009613c35565b506040805160e08101825260068152600560208201526004918101919091526003606082015260026080820152600160a0820152600060c082015261127f9061017d906007613c35565b506040805160a081018252600481526003602082015260029181019190915260016060820152600060808201526112bb9061017e906005613c35565b506040805160a081018252600481526003602082015260029181019190915260016060820152600060808201526112f79061017f906005613c35565b506040805160808101825260038152600260208201526001918101919091526000606082015261132c90610180906004613c35565b506040805160c08101825260058152600460208201526003918101919091526002606082015260016080820152600060a082015261136f90610181906006613c35565b50604080516080810182526003815260026020820152600191810191909152600060608201526113a490610182906004613c35565b50604080516080810182526003815260026020820152600191810191909152600060608201526113d990610183906004613c35565b506040805160208101909152600081526113f890610184906001613c35565b506040805160a08101825260ff8082526020820181905291810182905260608101829052608081019190915261143390610173906005613c35565b5060408051610140810182526027815260336020820152603b9181019190915260436060820152607d6080820152608360a082015260bd60c082015260c560e082015260cc61010082015260d96101208201526114959061017490600a613c35565b5060408051610160810182526033815260366020820152603981830152606081019190915260486080820152605a60a082015260c260c082015260c760e082015260ca61010082015260cf61012082015260d46101408201526114fd9061017590600b613c35565b506040805160c08101825260308152603c6020820152606091810182905260a091810182905260c4608082015260d09181019190915261154290610176906006613c35565b5060408051608081018252603381526066602082015260999181019190915260cc606082015261157790610177906004613c35565b506040805160a081018252600081526001602082015260029181019190915260036060820152600460808201526115b390610185906005613c35565b50604080516101408101825260098152600860208201526007918101919091526006606082015260056080820152600460a0820152600360c0820152600260e0820152600161010082015260006101208201526116159061018690600a613c35565b506040805161016081018252600a8152600960208201526008918101919091526007606082015260066080820152600560a0820152600460c0820152600360e082015260026101008201526001610120820152600061014082015261167f9061018790600b613c35565b506040805160c08101825260058152600460208201526003918101919091526002606082015260016080820152600060a08201526116c290610188906006613c35565b50604080516080810182526003815260026020820152600191810191909152600060608201526116f790610189906004613c35565b50801561170a576000805461ff00191690555b5050505050565b61017c8260128110610e3357600080fd5b610c03838383604051806020016040528060008152506122f4565b600061174833610d62565b156117655760405162461bcd60e51b81526004016109aa906142de565b60cb5482106117cb5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016109aa565b60cb82815481106117de576117de6145e8565b90600052602060002001549050919050565b60fb546001600160a01b0316331461181a5760405162461bcd60e51b81526004016109aa906143b8565b61018f80546001600160a01b038085166001600160a01b03199283161790925561018e805492841692909116919091179055610c03612d35565b6000818152609960205260408120546001600160a01b03168061097a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109aa565b61012d5460ff16156119125760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109aa565b600260015414156119655760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109aa565b60026001553361197481610d62565b156119915760405162461bcd60e51b81526004016109aa906142de565b326001600160a01b038216146119d45760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b60448201526064016109aa565b61016454610165546119eb90859061ffff1661448f565b1115611a2d5760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b60448201526064016109aa565b600083118015611a3e5750600a8311155b611a805760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b60448201526064016109aa565b3415611a8b57600080fd5b611a93612d35565b5060008083611ab057604080516000815260208101909152611af4565b8467ffffffffffffffff811115611ac957611ac96145fe565b604051908082528060200260200182016040528015611af2578160200160208202803683370190505b505b90506000805b86811015611c7d57610165805461ffff16906000611b1783614533565b82546101009290920a61ffff81810219909316918316021790915561016554611b41925016612e08565b91506000611b4e83612e71565b90506000611b5b84612f43565b9050871580611b7c5750866001600160a01b0316816001600160a01b031614155b15611b995761016554611b9490829061ffff166130bc565b611bee565b61018f5461016554611bb8916001600160a01b03169061ffff166130bc565b61016554855161ffff90911690869085908110611bd757611bd76145e8565b602002602001019061ffff16908161ffff16815250505b61016554611bff9061ffff16610cfa565b611c09908761448f565b6101655461ffff166000908152610167602090815260409091208451815460ff1916901515178155908401519197508391611c4a906001830190600e613cd6565b50604091909101516002909101805460ff191660ff90921691909117905550819050611c7581614555565b915050611afa565b508215611cec5761019054604051632770a7eb60e21b81526001600160a01b0386811660048301526024820186905290911690639dc29fac90604401600060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050505b8415611d585761018f54604051638a46fe7b60e01b81526001600160a01b0390911690638a46fe7b90611d2590879086906004016141ab565b600060405180830381600087803b158015611d3f57600080fd5b505af1158015611d53573d6000803e3d6000fd5b505050505b50506001805550505050565b6101668054611d72906144fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611d9e906144fe565b8015611deb5780601f10611dc057610100808354040283529160200191611deb565b820191906000526020600020905b815481529060010190602001808311611dce57829003601f168201915b505050505081565b60006001600160a01b038216611e5e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109aa565b506001600160a01b03166000908152609a602052604090205490565b60fb546001600160a01b03163314611ea45760405162461bcd60e51b81526004016109aa906143b8565b611eae60006130d6565b565b60fb546000906001600160a01b03163314611edd5760405162461bcd60e51b81526004016109aa906143b8565b61019254610160546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611f2557600080fd5b505afa158015611f39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5d91906140d5565b1015611f7b5760405162461bcd60e51b81526004016109aa9061431f565b611f8b6101915461019254613128565b905090565b60fb546001600160a01b03163314611fba5760405162461bcd60e51b81526004016109aa906143b8565b61019655565b60fb546001600160a01b03163314611fea5760405162461bcd60e51b81526004016109aa906143b8565b61019255565b610161546001600160a01b0316331461204b5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016109aa565b6101945550565b61205a613d29565b3233146120d257336000908152610163602052604090205460ff166120d25760405162461bcd60e51b815260206004820152602860248201527f596f75277265206e6f7420616c6c6f77656420746f2063616c6c207468697320604482015267333ab731ba34b7b760c11b60648201526084016109aa565b6000828152610167602090815260408083208151606081018352815460ff161515815282516101c08101938490529094919385019290916001850191600e918390855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411612115575050509284525050506002919091015460ff1660209091015292915050565b60fb546001600160a01b0316331461218a5760405162461bcd60e51b81526004016109aa906143b8565b61019080546001600160a01b0319166001600160a01b0392909216919091179055565b6060609880546109da906144fe565b6109c733838361328a565b60fb546001600160a01b031633146121f15760405162461bcd60e51b81526004016109aa906143b8565b610195546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561223657600080fd5b505afa15801561224a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226e91906140d5565b6101955460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b1580156122bc57600080fd5b505af11580156122d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c79190613ffa565b6122fe33836127b7565b61231a5760405162461bcd60e51b81526004016109aa906143ed565b61232684848484613359565b50505050565b6000818152609960205260409020546060906001600160a01b03166123ab5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109aa565b60006123b561338c565b905060008151116123d55760405180602001604052806000815250612400565b806123df8461339c565b6040516020016123f092919061413f565b6040516020818303038152906040525b9392505050565b60fb546001600160a01b031633146124315760405162461bcd60e51b81526004016109aa906143b8565b6001600160a01b0391909116600090815261016360205260409020805460ff1916911515919091179055565b606061246882611df3565b67ffffffffffffffff811115612480576124806145fe565b6040519080825280602002602001820160405280156124a9578160200160208202803683370190505b50905060005b6124b883611df3565b8110156124f8576124c98382610d5b565b8282815181106124db576124db6145e8565b6020908102919091010152806124f081614555565b9150506124af565b50919050565b60fb546001600160a01b031633146125285760405162461bcd60e51b81526004016109aa906143b8565b6001600160a01b03811661258d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109aa565b610c72816130d6565b60fb546001600160a01b031633146125c05760405162461bcd60e51b81526004016109aa906143b8565b61019580546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061261457506001600160e01b03198216635b5e139f60e01b145b8061097a57506301ffc9a760e01b6001600160e01b031983161461097a565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061266882611854565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61012d5460ff16156126e85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109aa565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861271e3390565b6040516001600160a01b03909116815260200160405180910390a1565b61012d5460ff166127855760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109aa565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361271e565b6000818152609960205260408120546001600160a01b03166128305760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109aa565b600061283b83611854565b9050806001600160a01b0316846001600160a01b031614806128765750836001600160a01b031661286b84610a5d565b6001600160a01b0316145b806128a657506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166128c182611854565b6001600160a01b0316146129295760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016109aa565b6001600160a01b03821661298b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109aa565b61299683838361349a565b6129a1600082612633565b6001600160a01b0383166000908152609a602052604081208054600192906129ca9084906144bb565b90915550506001600160a01b0382166000908152609a602052604081208054600192906129f890849061448f565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff1680612a72575060005460ff16155b612a8e5760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612ab0576000805461ffff19166101011790555b612ab8613552565b612ac0613552565b612aca83836135bc565b8015610c03576000805461ff0019169055505050565b600054610100900460ff1680612af9575060005460ff16155b612b155760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612b37576000805461ffff19166101011790555b612b3f613552565b612b47613552565b612b4f613552565b8015610c72576000805461ff001916905550565b600054610100900460ff1680612b7c575060005460ff16155b612b985760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612bba576000805461ffff19166101011790555b612bc2613552565b612b4f613651565b600054610100900460ff1680612be3575060005460ff16155b612bff5760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612c21576000805461ffff19166101011790555b612b4f6136b1565b600054610100900460ff1680612c42575060005460ff16155b612c5e5760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612c80576000805461ffff19166101011790555b612c88613552565b612b4f613720565b600054610100900460ff1680612ca9575060005460ff16155b612cc55760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612ce7576000805461ffff19166101011790555b61016180546001600160a01b038086166001600160a01b031992831617909255610160805492851692909116919091179055600061015f558015610c03576000805461ff0019169055505050565b600061019654612d456101975490565b11612d5f57612d5961019780546001019055565b50600090565b61019254610160546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015612da757600080fd5b505afa158015612dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddf91906140d5565b1015612dfd5760405162461bcd60e51b81526004016109aa9061431f565b600061019755611f7b565b600032612e166001436144bb565b6101945460405160609390931b6bffffffffffffffffffffffff191660208401529040603483015242605483015260748201849052609482015260b40160408051601f19818403018152919052805160209091012092915050565b612e79613d29565b612e88600a61ffff8416614570565b1515815260208101516000908190526101775460409390931c92612eac9084614584565b905061016a600d018160ff1681548110612ec857612ec86145e8565b60009182526020918290209181049091015460ff601f9092166101000a900416600884901c1015612f005760ff166040820152919050565b610189805460ff8316908110612f1857612f186145e8565b60009182526020918290209181049091015460ff601f9092166101000a900416604083015250919050565b60003233148015612f5a5750612f5833610d62565b155b612f765760405162461bcd60e51b81526004016109aa906142de565b612f85600a60f584901c614570565b15612f90573361097a565b612f9982612e08565b600116600114156130255761018e5460405163e0898f3160e01b8152609084901c60048201526000916001600160a01b03169063e0898f319060240160206040518083038186803b158015612fed57600080fd5b505afa158015613001573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124009190613e19565b61018f5460405163e0898f3160e01b8152609084901c60048201526000916001600160a01b03169063e0898f319060240160206040518083038186803b15801561306e57600080fd5b505afa158015613082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130a69190613e19565b90506001600160a01b03811661097a5733612400565b6109c7828260405180602001604052806000815250613796565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610160546101615461015f546040516000936001600160a01b0390811693634000aea093911691869161316991899190602001918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161319693929190614205565b602060405180830381600087803b1580156131b057600080fd5b505af11580156131c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e89190613ffa565b5061015f546000848152610162602081815260408084205481518084018a90528083019690965230606087015260808087018290528251808803909101815260a090960190915284519482019490942092879052529061324990600161448f565b600085815261016260205260409020556128a68482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b816001600160a01b0316836001600160a01b031614156132ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109aa565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6133648484846128ae565b613370848484846137c9565b6123265760405162461bcd60e51b81526004016109aa9061428c565b606061016680546109da906144fe565b6060816133c05750506040805180820190915260018152600360fc1b602082015290565b8160005b81156133ea57806133d481614555565b91506133e39050600a836144a7565b91506133c4565b60008167ffffffffffffffff811115613405576134056145fe565b6040519080825280601f01601f19166020018201604052801561342f576020820181803683370190505b5090505b84156128a6576134446001836144bb565b9150613451600a86614570565b61345c90603061448f565b60f81b818381518110613471576134716145e8565b60200101906001600160f81b031916908160001a905350613493600a866144a7565b9450613433565b6001600160a01b0383166134f5576134f08160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b613518565b816001600160a01b0316836001600160a01b0316146135185761351883826138d3565b6001600160a01b03821661352f57610c0381613970565b826001600160a01b0316826001600160a01b031614610c0357610c038282613a1f565b600054610100900460ff168061356b575060005460ff16155b6135875760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612b4f576000805461ffff19166101011790558015610c72576000805461ff001916905550565b600054610100900460ff16806135d5575060005460ff16155b6135f15760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015613613576000805461ffff19166101011790555b8251613626906097906020860190613bb1565b50815161363a906098906020850190613bb1565b508015610c03576000805461ff0019169055505050565b600054610100900460ff168061366a575060005460ff16155b6136865760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff161580156136a8576000805461ffff19166101011790555b612b4f336130d6565b600054610100900460ff16806136ca575060005460ff16155b6136e65760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015613708576000805461ffff19166101011790555b600180558015610c72576000805461ff001916905550565b600054610100900460ff1680613739575060005460ff16155b6137555760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015613777576000805461ffff19166101011790555b61012d805460ff191690558015610c72576000805461ff001916905550565b6137a08383613a63565b6137ad60008484846137c9565b610c035760405162461bcd60e51b81526004016109aa9061428c565b60006001600160a01b0384163b156138cb57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061380d90339089908890889060040161416e565b602060405180830381600087803b15801561382757600080fd5b505af1925050508015613857575060408051601f3d908101601f1916820190925261385491810190614056565b60015b6138b1573d808015613885576040519150601f19603f3d011682016040523d82523d6000602084013e61388a565b606091505b5080516138a95760405162461bcd60e51b81526004016109aa9061428c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128a6565b5060016128a6565b600060016138e084611df3565b6138ea91906144bb565b600083815260ca602052604090205490915080821461393d576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb54600090613982906001906144bb565b600083815260cc602052604081205460cb80549394509092849081106139aa576139aa6145e8565b906000526020600020015490508060cb83815481106139cb576139cb6145e8565b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb805480613a0357613a036145d2565b6001900381819060005260206000200160009055905550505050565b6000613a2a83611df3565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b6001600160a01b038216613ab95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109aa565b6000818152609960205260409020546001600160a01b031615613b1e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109aa565b613b2a6000838361349a565b6001600160a01b0382166000908152609a60205260408120805460019290613b5390849061448f565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054613bbd906144fe565b90600052602060002090601f016020900481019282613bdf5760008555613c25565b82601f10613bf857805160ff1916838001178555613c25565b82800160010185558215613c25579182015b82811115613c25578251825591602001919060010190613c0a565b50613c31929150613d52565b5090565b82805482825590600052602060002090601f01602090048101928215613c255791602002820160005b83821115613c9c57835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613c5e565b8015613cc95782816101000a81549060ff0219169055600101602081600001049283019260010302613c9c565b5050613c31929150613d52565b600183019183908215613c2557916020028201600083821115613c9c57835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613c5e565b6040518060600160405280600015158152602001613d45613d67565b8152600060209091015290565b5b80821115613c315760008155600101613d53565b604051806101c00160405280600e906020820280368337509192915050565b600067ffffffffffffffff80841115613da157613da16145fe565b604051601f8501601f19908116603f01168101908282118183101715613dc957613dc96145fe565b81604052809350858152868686011115613de257600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215613e0e57600080fd5b813561240081614614565b600060208284031215613e2b57600080fd5b815161240081614614565b60008060408385031215613e4957600080fd5b8235613e5481614614565b91506020830135613e6481614614565b809150509250929050565b600080600060608486031215613e8457600080fd5b8335613e8f81614614565b92506020840135613e9f81614614565b929592945050506040919091013590565b60008060008060808587031215613ec657600080fd5b8435613ed181614614565b93506020850135613ee181614614565b925060408501359150606085013567ffffffffffffffff811115613f0457600080fd5b8501601f81018713613f1557600080fd5b613f2487823560208401613d86565b91505092959194509250565b60008060408385031215613f4357600080fd5b8235613f4e81614614565b91506020830135613e6481614629565b60008060408385031215613f7157600080fd5b8235613f7c81614614565b946020939093013593505050565b60008060008060808587031215613fa057600080fd5b8435613fab81614614565b9350602085013592506040850135613fc281614614565b91506060850135613fd281614614565b939692955090935050565b600060208284031215613fef57600080fd5b813561240081614629565b60006020828403121561400c57600080fd5b815161240081614629565b6000806040838503121561402a57600080fd5b50508035926020909101359150565b60006020828403121561404b57600080fd5b813561240081614637565b60006020828403121561406857600080fd5b815161240081614637565b60006020828403121561408557600080fd5b813567ffffffffffffffff81111561409c57600080fd5b8201601f810184136140ad57600080fd5b6128a684823560208401613d86565b6000602082840312156140ce57600080fd5b5035919050565b6000602082840312156140e757600080fd5b5051919050565b6000806040838503121561410157600080fd5b823591506020830135613e6481614629565b6000815180845261412b8160208601602086016144d2565b601f01601f19169290920160200192915050565b600083516141518184602088016144d2565b8351908301906141658183602088016144d2565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906141a190830184614113565b9695505050505050565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b818110156141f857845161ffff16835293830193918301916001016141d8565b5090979650505050505050565b60018060a01b038416815282602082015260606040820152600061422c6060830184614113565b95945050505050565b6020808252825182820181905260009190848201906040850190845b8181101561426d57835183529284019291840191600101614251565b50909695505050505050565b6020815260006124006020830184614113565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526021908201527f436f6e74726163747320617265206e6f7420616c6c6f77656420626967206d616040820152603760f91b606082015260800190565b6020808252602b908201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060408201526a1dda5d1a0819985d58d95d60aa1b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b8151151581526020808301516102008301919081840160005b600e81101561447757825160ff1682529183019190830190600101614457565b5050505060ff6040840151166101e083015292915050565b600082198211156144a2576144a26145a6565b500190565b6000826144b6576144b66145bc565b500490565b6000828210156144cd576144cd6145a6565b500390565b60005b838110156144ed5781810151838201526020016144d5565b838111156123265750506000910152565b600181811c9082168061451257607f821691505b602082108114156124f857634e487b7160e01b600052602260045260246000fd5b600061ffff8083168181141561454b5761454b6145a6565b6001019392505050565b6000600019821415614569576145696145a6565b5060010190565b60008261457f5761457f6145bc565b500690565b600060ff831680614597576145976145bc565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c7257600080fd5b8015158114610c7257600080fd5b6001600160e01b031981168114610c7257600080fdfea26469706673582212206add09eac6e3011cf9f8fb5482bbd27104a86e5328b6a15935f889445c92767264736f6c63430008070033

Deployed Bytecode

0x6080604052600436106102e45760003560e01c80636352211e1161019057806399e4d8ef116100dc578063cedb363b11610095578063e985e9c51161006f578063e985e9c5146108b5578063f2fde38b146108fe578063f47c84c51461091e578063fc68f75b1461093557600080fd5b8063cedb363b14610851578063d004b03614610871578063ddca3f431461089e57600080fd5b806399e4d8ef146107a4578063a22cb465146107bb578063adc2112f146107db578063b88d4fde146107f0578063c87b56dd14610810578063cc1dda0f1461083057600080fd5b806383a3af531161014957806394985ddd1161012357806394985ddd1461072257806394e5684714610742578063953a01fc1461076f57806395d89b411461078f57600080fd5b806383a3af53146106c4578063873efeff146106e45780638da5cb5b1461070457600080fd5b80636352211e1461063257806367f68fac146106525780636c0360eb1461066557806370a082311461067a578063715018a61461069a5780637a98a82a146106af57600080fd5b806333df4b2c1161024f5780634f02c42011610208578063568303ca116101e2578063568303ca146105c057806357970e93146105d85780635c975abb146105f95780635e0508661461061257600080fd5b80634f02c420146105715780634f6ccce7146105a057806355f804b31461031e57600080fd5b806333df4b2c1461049d578063358394d8146104cf57806336838391146104ef5780633d955a701461050f57806342842e0e146105305780634cb257001461055057600080fd5b806316c38b3c116102a157806316c38b3c146103e857806318160ddd1461040857806323b872dd1461041d57806324b5b9ec1461043d57806327de8f271461045d5780632f745c591461047d57600080fd5b806301ffc9a7146102e957806302fe53051461031e57806306fdde0314610340578063081812fc14610362578063095ea7b31461039a578063109b1ee6146103ba575b600080fd5b3480156102f557600080fd5b50610309610304366004614039565b610955565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b5061033e610339366004614073565b610980565b005b34801561034c57600080fd5b506103556109cb565b6040516103159190614279565b34801561036e57600080fd5b5061038261037d3660046140bc565b610a5d565b6040516001600160a01b039091168152602001610315565b3480156103a657600080fd5b5061033e6103b5366004613f5e565b610af2565b3480156103c657600080fd5b506103da6103d5366004613f5e565b610c08565b604051908152602001610315565b3480156103f457600080fd5b5061033e610403366004613fdd565b610c3a565b34801561041457600080fd5b5060cb546103da565b34801561042957600080fd5b5061033e610438366004613e6f565b610c7d565b34801561044957600080fd5b5061033e6104583660046140bc565b610cca565b34801561046957600080fd5b506103da6104783660046140bc565b610cfa565b34801561048957600080fd5b506103da610498366004613f5e565b610d5b565b3480156104a957600080fd5b506104bd6104b8366004614017565b610e22565b60405160ff9091168152602001610315565b3480156104db57600080fd5b5061033e6104ea366004613f8a565b610e69565b3480156104fb57600080fd5b506104bd61050a366004614017565b611711565b34801561051b57600080fd5b5061018f54610382906001600160a01b031681565b34801561053c57600080fd5b5061033e61054b366004613e6f565b611722565b34801561055c57600080fd5b5061018e54610382906001600160a01b031681565b34801561057d57600080fd5b506101655461058d9061ffff1681565b60405161ffff9091168152602001610315565b3480156105ac57600080fd5b506103da6105bb3660046140bc565b61173d565b3480156105cc57600080fd5b50610197546103da9081565b3480156105e457600080fd5b5061019554610382906001600160a01b031681565b34801561060557600080fd5b5061012d5460ff16610309565b34801561061e57600080fd5b5061033e61062d366004613e36565b6117f0565b34801561063e57600080fd5b5061038261064d3660046140bc565b611854565b61033e6106603660046140ee565b6118cb565b34801561067157600080fd5b50610355611d64565b34801561068657600080fd5b506103da610695366004613dfc565b611df3565b3480156106a657600080fd5b5061033e611e7a565b3480156106bb57600080fd5b506103da611eb0565b3480156106d057600080fd5b5061033e6106df3660046140bc565b611f90565b3480156106f057600080fd5b5061033e6106ff3660046140bc565b611fc0565b34801561071057600080fd5b5060fb546001600160a01b0316610382565b34801561072e57600080fd5b5061033e61073d366004614017565b611ff0565b34801561074e57600080fd5b5061076261075d3660046140bc565b612052565b604051610315919061443e565b34801561077b57600080fd5b5061033e61078a366004613dfc565b612160565b34801561079b57600080fd5b506103556121ad565b3480156107b057600080fd5b506103da6101965481565b3480156107c757600080fd5b5061033e6107d6366004613f30565b6121bc565b3480156107e757600080fd5b5061033e6121c7565b3480156107fc57600080fd5b5061033e61080b366004613eb0565b6122f4565b34801561081c57600080fd5b5061035561082b3660046140bc565b61232c565b34801561083c57600080fd5b5061019054610382906001600160a01b031681565b34801561085d57600080fd5b5061033e61086c366004613f30565b612407565b34801561087d57600080fd5b5061089161088c366004613dfc565b61245d565b6040516103159190614235565b3480156108aa57600080fd5b506103da6101925481565b3480156108c157600080fd5b506103096108d0366004613e36565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b34801561090a57600080fd5b5061033e610919366004613dfc565b6124fe565b34801561092a57600080fd5b506103da6101645481565b34801561094157600080fd5b5061033e610950366004613dfc565b612596565b60006001600160e01b0319821663780e9d6360e01b148061097a575061097a826125e3565b92915050565b60fb546001600160a01b031633146109b35760405162461bcd60e51b81526004016109aa906143b8565b60405180910390fd5b80516109c790610166906020840190613bb1565b5050565b6060609780546109da906144fe565b80601f0160208091040260200160405190810160405280929190818152602001828054610a06906144fe565b8015610a535780601f10610a2857610100808354040283529160200191610a53565b820191906000526020600020905b815481529060010190602001808311610a3657829003601f168201915b5050505050905090565b6000818152609960205260408120546001600160a01b0316610ad65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109aa565b506000908152609b60205260409020546001600160a01b031690565b6000610afd82611854565b9050806001600160a01b0316836001600160a01b03161415610b6b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109aa565b336001600160a01b0382161480610b875750610b8781336108d0565b610bf95760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109aa565b610c038383612633565b505050565b6101696020528160005260406000208181548110610c2557600080fd5b90600052602060002001600091509150505481565b60fb546001600160a01b03163314610c645760405162461bcd60e51b81526004016109aa906143b8565b8015610c7557610c726126a1565b50565b610c7261273b565b61018f546001600160a01b0316336001600160a01b031614610cbf57610ca333826127b7565b610cbf5760405162461bcd60e51b81526004016109aa906143ed565b610c038383836128ae565b60fb546001600160a01b03163314610cf45760405162461bcd60e51b81526004016109aa906143b8565b61016455565b60006142688211610d16575069043c33c1937564800000919050565b6169788211610d305750690878678326eac9000000919050565b6190888211610d4a5750690cb49b44ba602d800000919050565b506910f0cf064dd592000000919050565b6000610d71335b6001600160a01b03163b151590565b15610d8e5760405162461bcd60e51b81526004016109aa906142de565b610d9783611df3565b8210610df95760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016109aa565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b61016a8260128110610e3357600080fd5b018181548110610e4257600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600054610100900460ff1680610e82575060005460ff16155b610e9e5760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015610ec0576000805461ffff19166101011790555b610f116040518060400160405280600f81526020016e426561722047616d652047656e205960881b815250604051806040016040528060088152602001674245415247454e5960c01b815250612a59565b610f19612ae0565b610f21612b63565b610f29612bca565b610f31612c29565b610f3b8383612c90565b7faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44561019155671bc16d674ec800006101925561019580546001600160a01b038085166001600160a01b03199283161790925561012c61019655610190805492881692909116919091179055610165805461ffff19166129021790556101648490556040805161012081018252601f815260316020820152603391810191909152604560608201526071608082015260bb60a082015260cc60c082015260cf60e082015260e161010082015261016a6000611019929101906009613c35565b506040805160e08101825260238152603060208201526043918101919091526073606082015260bd608082015260d060a082015260dd60c08201526110639061016b906007613c35565b506040805160a081018252603b815260616020820152608891810191909152609f606082015260c5608082015261109f9061016c906005613c35565b506040805160a0810182526055815260716020820152608391810191909152608f606082015260a960808201526110db9061016d906005613c35565b506040805160808101825260ff80825260208201819052918101829052606081019190915261110f9061016e906004613c35565b506040805160c08101825260228152603b602082015260769181019190915260a4606082015260c5608082015260de60a08201526111529061016f906006613c35565b5060408051608081018252603b8152606f602082015260919181019190915260c5606082015261118790610170906004613c35565b506040805160808101825260398152605d602082015260a39181019190915260c760608201526111bc90610171906004613c35565b50604080516020810190915260ff81526111db90610172906001613c35565b50604080516101208101825260088152600760208201526006918101919091526005606082015260046080820152600360a0820152600260c0820152600160e082015260006101008201526112359061017c906009613c35565b506040805160e08101825260068152600560208201526004918101919091526003606082015260026080820152600160a0820152600060c082015261127f9061017d906007613c35565b506040805160a081018252600481526003602082015260029181019190915260016060820152600060808201526112bb9061017e906005613c35565b506040805160a081018252600481526003602082015260029181019190915260016060820152600060808201526112f79061017f906005613c35565b506040805160808101825260038152600260208201526001918101919091526000606082015261132c90610180906004613c35565b506040805160c08101825260058152600460208201526003918101919091526002606082015260016080820152600060a082015261136f90610181906006613c35565b50604080516080810182526003815260026020820152600191810191909152600060608201526113a490610182906004613c35565b50604080516080810182526003815260026020820152600191810191909152600060608201526113d990610183906004613c35565b506040805160208101909152600081526113f890610184906001613c35565b506040805160a08101825260ff8082526020820181905291810182905260608101829052608081019190915261143390610173906005613c35565b5060408051610140810182526027815260336020820152603b9181019190915260436060820152607d6080820152608360a082015260bd60c082015260c560e082015260cc61010082015260d96101208201526114959061017490600a613c35565b5060408051610160810182526033815260366020820152603981830152606081019190915260486080820152605a60a082015260c260c082015260c760e082015260ca61010082015260cf61012082015260d46101408201526114fd9061017590600b613c35565b506040805160c08101825260308152603c6020820152606091810182905260a091810182905260c4608082015260d09181019190915261154290610176906006613c35565b5060408051608081018252603381526066602082015260999181019190915260cc606082015261157790610177906004613c35565b506040805160a081018252600081526001602082015260029181019190915260036060820152600460808201526115b390610185906005613c35565b50604080516101408101825260098152600860208201526007918101919091526006606082015260056080820152600460a0820152600360c0820152600260e0820152600161010082015260006101208201526116159061018690600a613c35565b506040805161016081018252600a8152600960208201526008918101919091526007606082015260066080820152600560a0820152600460c0820152600360e082015260026101008201526001610120820152600061014082015261167f9061018790600b613c35565b506040805160c08101825260058152600460208201526003918101919091526002606082015260016080820152600060a08201526116c290610188906006613c35565b50604080516080810182526003815260026020820152600191810191909152600060608201526116f790610189906004613c35565b50801561170a576000805461ff00191690555b5050505050565b61017c8260128110610e3357600080fd5b610c03838383604051806020016040528060008152506122f4565b600061174833610d62565b156117655760405162461bcd60e51b81526004016109aa906142de565b60cb5482106117cb5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016109aa565b60cb82815481106117de576117de6145e8565b90600052602060002001549050919050565b60fb546001600160a01b0316331461181a5760405162461bcd60e51b81526004016109aa906143b8565b61018f80546001600160a01b038085166001600160a01b03199283161790925561018e805492841692909116919091179055610c03612d35565b6000818152609960205260408120546001600160a01b03168061097a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109aa565b61012d5460ff16156119125760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109aa565b600260015414156119655760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109aa565b60026001553361197481610d62565b156119915760405162461bcd60e51b81526004016109aa906142de565b326001600160a01b038216146119d45760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b60448201526064016109aa565b61016454610165546119eb90859061ffff1661448f565b1115611a2d5760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b60448201526064016109aa565b600083118015611a3e5750600a8311155b611a805760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b60448201526064016109aa565b3415611a8b57600080fd5b611a93612d35565b5060008083611ab057604080516000815260208101909152611af4565b8467ffffffffffffffff811115611ac957611ac96145fe565b604051908082528060200260200182016040528015611af2578160200160208202803683370190505b505b90506000805b86811015611c7d57610165805461ffff16906000611b1783614533565b82546101009290920a61ffff81810219909316918316021790915561016554611b41925016612e08565b91506000611b4e83612e71565b90506000611b5b84612f43565b9050871580611b7c5750866001600160a01b0316816001600160a01b031614155b15611b995761016554611b9490829061ffff166130bc565b611bee565b61018f5461016554611bb8916001600160a01b03169061ffff166130bc565b61016554855161ffff90911690869085908110611bd757611bd76145e8565b602002602001019061ffff16908161ffff16815250505b61016554611bff9061ffff16610cfa565b611c09908761448f565b6101655461ffff166000908152610167602090815260409091208451815460ff1916901515178155908401519197508391611c4a906001830190600e613cd6565b50604091909101516002909101805460ff191660ff90921691909117905550819050611c7581614555565b915050611afa565b508215611cec5761019054604051632770a7eb60e21b81526001600160a01b0386811660048301526024820186905290911690639dc29fac90604401600060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050505b8415611d585761018f54604051638a46fe7b60e01b81526001600160a01b0390911690638a46fe7b90611d2590879086906004016141ab565b600060405180830381600087803b158015611d3f57600080fd5b505af1158015611d53573d6000803e3d6000fd5b505050505b50506001805550505050565b6101668054611d72906144fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611d9e906144fe565b8015611deb5780601f10611dc057610100808354040283529160200191611deb565b820191906000526020600020905b815481529060010190602001808311611dce57829003601f168201915b505050505081565b60006001600160a01b038216611e5e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109aa565b506001600160a01b03166000908152609a602052604090205490565b60fb546001600160a01b03163314611ea45760405162461bcd60e51b81526004016109aa906143b8565b611eae60006130d6565b565b60fb546000906001600160a01b03163314611edd5760405162461bcd60e51b81526004016109aa906143b8565b61019254610160546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611f2557600080fd5b505afa158015611f39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5d91906140d5565b1015611f7b5760405162461bcd60e51b81526004016109aa9061431f565b611f8b6101915461019254613128565b905090565b60fb546001600160a01b03163314611fba5760405162461bcd60e51b81526004016109aa906143b8565b61019655565b60fb546001600160a01b03163314611fea5760405162461bcd60e51b81526004016109aa906143b8565b61019255565b610161546001600160a01b0316331461204b5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016109aa565b6101945550565b61205a613d29565b3233146120d257336000908152610163602052604090205460ff166120d25760405162461bcd60e51b815260206004820152602860248201527f596f75277265206e6f7420616c6c6f77656420746f2063616c6c207468697320604482015267333ab731ba34b7b760c11b60648201526084016109aa565b6000828152610167602090815260408083208151606081018352815460ff161515815282516101c08101938490529094919385019290916001850191600e918390855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411612115575050509284525050506002919091015460ff1660209091015292915050565b60fb546001600160a01b0316331461218a5760405162461bcd60e51b81526004016109aa906143b8565b61019080546001600160a01b0319166001600160a01b0392909216919091179055565b6060609880546109da906144fe565b6109c733838361328a565b60fb546001600160a01b031633146121f15760405162461bcd60e51b81526004016109aa906143b8565b610195546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561223657600080fd5b505afa15801561224a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226e91906140d5565b6101955460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b1580156122bc57600080fd5b505af11580156122d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c79190613ffa565b6122fe33836127b7565b61231a5760405162461bcd60e51b81526004016109aa906143ed565b61232684848484613359565b50505050565b6000818152609960205260409020546060906001600160a01b03166123ab5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109aa565b60006123b561338c565b905060008151116123d55760405180602001604052806000815250612400565b806123df8461339c565b6040516020016123f092919061413f565b6040516020818303038152906040525b9392505050565b60fb546001600160a01b031633146124315760405162461bcd60e51b81526004016109aa906143b8565b6001600160a01b0391909116600090815261016360205260409020805460ff1916911515919091179055565b606061246882611df3565b67ffffffffffffffff811115612480576124806145fe565b6040519080825280602002602001820160405280156124a9578160200160208202803683370190505b50905060005b6124b883611df3565b8110156124f8576124c98382610d5b565b8282815181106124db576124db6145e8565b6020908102919091010152806124f081614555565b9150506124af565b50919050565b60fb546001600160a01b031633146125285760405162461bcd60e51b81526004016109aa906143b8565b6001600160a01b03811661258d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109aa565b610c72816130d6565b60fb546001600160a01b031633146125c05760405162461bcd60e51b81526004016109aa906143b8565b61019580546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061261457506001600160e01b03198216635b5e139f60e01b145b8061097a57506301ffc9a760e01b6001600160e01b031983161461097a565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061266882611854565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61012d5460ff16156126e85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109aa565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861271e3390565b6040516001600160a01b03909116815260200160405180910390a1565b61012d5460ff166127855760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109aa565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361271e565b6000818152609960205260408120546001600160a01b03166128305760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109aa565b600061283b83611854565b9050806001600160a01b0316846001600160a01b031614806128765750836001600160a01b031661286b84610a5d565b6001600160a01b0316145b806128a657506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166128c182611854565b6001600160a01b0316146129295760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016109aa565b6001600160a01b03821661298b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109aa565b61299683838361349a565b6129a1600082612633565b6001600160a01b0383166000908152609a602052604081208054600192906129ca9084906144bb565b90915550506001600160a01b0382166000908152609a602052604081208054600192906129f890849061448f565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff1680612a72575060005460ff16155b612a8e5760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612ab0576000805461ffff19166101011790555b612ab8613552565b612ac0613552565b612aca83836135bc565b8015610c03576000805461ff0019169055505050565b600054610100900460ff1680612af9575060005460ff16155b612b155760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612b37576000805461ffff19166101011790555b612b3f613552565b612b47613552565b612b4f613552565b8015610c72576000805461ff001916905550565b600054610100900460ff1680612b7c575060005460ff16155b612b985760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612bba576000805461ffff19166101011790555b612bc2613552565b612b4f613651565b600054610100900460ff1680612be3575060005460ff16155b612bff5760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612c21576000805461ffff19166101011790555b612b4f6136b1565b600054610100900460ff1680612c42575060005460ff16155b612c5e5760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612c80576000805461ffff19166101011790555b612c88613552565b612b4f613720565b600054610100900460ff1680612ca9575060005460ff16155b612cc55760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612ce7576000805461ffff19166101011790555b61016180546001600160a01b038086166001600160a01b031992831617909255610160805492851692909116919091179055600061015f558015610c03576000805461ff0019169055505050565b600061019654612d456101975490565b11612d5f57612d5961019780546001019055565b50600090565b61019254610160546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015612da757600080fd5b505afa158015612dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddf91906140d5565b1015612dfd5760405162461bcd60e51b81526004016109aa9061431f565b600061019755611f7b565b600032612e166001436144bb565b6101945460405160609390931b6bffffffffffffffffffffffff191660208401529040603483015242605483015260748201849052609482015260b40160408051601f19818403018152919052805160209091012092915050565b612e79613d29565b612e88600a61ffff8416614570565b1515815260208101516000908190526101775460409390931c92612eac9084614584565b905061016a600d018160ff1681548110612ec857612ec86145e8565b60009182526020918290209181049091015460ff601f9092166101000a900416600884901c1015612f005760ff166040820152919050565b610189805460ff8316908110612f1857612f186145e8565b60009182526020918290209181049091015460ff601f9092166101000a900416604083015250919050565b60003233148015612f5a5750612f5833610d62565b155b612f765760405162461bcd60e51b81526004016109aa906142de565b612f85600a60f584901c614570565b15612f90573361097a565b612f9982612e08565b600116600114156130255761018e5460405163e0898f3160e01b8152609084901c60048201526000916001600160a01b03169063e0898f319060240160206040518083038186803b158015612fed57600080fd5b505afa158015613001573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124009190613e19565b61018f5460405163e0898f3160e01b8152609084901c60048201526000916001600160a01b03169063e0898f319060240160206040518083038186803b15801561306e57600080fd5b505afa158015613082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130a69190613e19565b90506001600160a01b03811661097a5733612400565b6109c7828260405180602001604052806000815250613796565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610160546101615461015f546040516000936001600160a01b0390811693634000aea093911691869161316991899190602001918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161319693929190614205565b602060405180830381600087803b1580156131b057600080fd5b505af11580156131c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e89190613ffa565b5061015f546000848152610162602081815260408084205481518084018a90528083019690965230606087015260808087018290528251808803909101815260a090960190915284519482019490942092879052529061324990600161448f565b600085815261016260205260409020556128a68482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b816001600160a01b0316836001600160a01b031614156132ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109aa565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6133648484846128ae565b613370848484846137c9565b6123265760405162461bcd60e51b81526004016109aa9061428c565b606061016680546109da906144fe565b6060816133c05750506040805180820190915260018152600360fc1b602082015290565b8160005b81156133ea57806133d481614555565b91506133e39050600a836144a7565b91506133c4565b60008167ffffffffffffffff811115613405576134056145fe565b6040519080825280601f01601f19166020018201604052801561342f576020820181803683370190505b5090505b84156128a6576134446001836144bb565b9150613451600a86614570565b61345c90603061448f565b60f81b818381518110613471576134716145e8565b60200101906001600160f81b031916908160001a905350613493600a866144a7565b9450613433565b6001600160a01b0383166134f5576134f08160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b613518565b816001600160a01b0316836001600160a01b0316146135185761351883826138d3565b6001600160a01b03821661352f57610c0381613970565b826001600160a01b0316826001600160a01b031614610c0357610c038282613a1f565b600054610100900460ff168061356b575060005460ff16155b6135875760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015612b4f576000805461ffff19166101011790558015610c72576000805461ff001916905550565b600054610100900460ff16806135d5575060005460ff16155b6135f15760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015613613576000805461ffff19166101011790555b8251613626906097906020860190613bb1565b50815161363a906098906020850190613bb1565b508015610c03576000805461ff0019169055505050565b600054610100900460ff168061366a575060005460ff16155b6136865760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff161580156136a8576000805461ffff19166101011790555b612b4f336130d6565b600054610100900460ff16806136ca575060005460ff16155b6136e65760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015613708576000805461ffff19166101011790555b600180558015610c72576000805461ff001916905550565b600054610100900460ff1680613739575060005460ff16155b6137555760405162461bcd60e51b81526004016109aa9061436a565b600054610100900460ff16158015613777576000805461ffff19166101011790555b61012d805460ff191690558015610c72576000805461ff001916905550565b6137a08383613a63565b6137ad60008484846137c9565b610c035760405162461bcd60e51b81526004016109aa9061428c565b60006001600160a01b0384163b156138cb57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061380d90339089908890889060040161416e565b602060405180830381600087803b15801561382757600080fd5b505af1925050508015613857575060408051601f3d908101601f1916820190925261385491810190614056565b60015b6138b1573d808015613885576040519150601f19603f3d011682016040523d82523d6000602084013e61388a565b606091505b5080516138a95760405162461bcd60e51b81526004016109aa9061428c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128a6565b5060016128a6565b600060016138e084611df3565b6138ea91906144bb565b600083815260ca602052604090205490915080821461393d576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb54600090613982906001906144bb565b600083815260cc602052604081205460cb80549394509092849081106139aa576139aa6145e8565b906000526020600020015490508060cb83815481106139cb576139cb6145e8565b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb805480613a0357613a036145d2565b6001900381819060005260206000200160009055905550505050565b6000613a2a83611df3565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b6001600160a01b038216613ab95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109aa565b6000818152609960205260409020546001600160a01b031615613b1e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109aa565b613b2a6000838361349a565b6001600160a01b0382166000908152609a60205260408120805460019290613b5390849061448f565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054613bbd906144fe565b90600052602060002090601f016020900481019282613bdf5760008555613c25565b82601f10613bf857805160ff1916838001178555613c25565b82800160010185558215613c25579182015b82811115613c25578251825591602001919060010190613c0a565b50613c31929150613d52565b5090565b82805482825590600052602060002090601f01602090048101928215613c255791602002820160005b83821115613c9c57835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613c5e565b8015613cc95782816101000a81549060ff0219169055600101602081600001049283019260010302613c9c565b5050613c31929150613d52565b600183019183908215613c2557916020028201600083821115613c9c57835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613c5e565b6040518060600160405280600015158152602001613d45613d67565b8152600060209091015290565b5b80821115613c315760008155600101613d53565b604051806101c00160405280600e906020820280368337509192915050565b600067ffffffffffffffff80841115613da157613da16145fe565b604051601f8501601f19908116603f01168101908282118183101715613dc957613dc96145fe565b81604052809350858152868686011115613de257600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215613e0e57600080fd5b813561240081614614565b600060208284031215613e2b57600080fd5b815161240081614614565b60008060408385031215613e4957600080fd5b8235613e5481614614565b91506020830135613e6481614614565b809150509250929050565b600080600060608486031215613e8457600080fd5b8335613e8f81614614565b92506020840135613e9f81614614565b929592945050506040919091013590565b60008060008060808587031215613ec657600080fd5b8435613ed181614614565b93506020850135613ee181614614565b925060408501359150606085013567ffffffffffffffff811115613f0457600080fd5b8501601f81018713613f1557600080fd5b613f2487823560208401613d86565b91505092959194509250565b60008060408385031215613f4357600080fd5b8235613f4e81614614565b91506020830135613e6481614629565b60008060408385031215613f7157600080fd5b8235613f7c81614614565b946020939093013593505050565b60008060008060808587031215613fa057600080fd5b8435613fab81614614565b9350602085013592506040850135613fc281614614565b91506060850135613fd281614614565b939692955090935050565b600060208284031215613fef57600080fd5b813561240081614629565b60006020828403121561400c57600080fd5b815161240081614629565b6000806040838503121561402a57600080fd5b50508035926020909101359150565b60006020828403121561404b57600080fd5b813561240081614637565b60006020828403121561406857600080fd5b815161240081614637565b60006020828403121561408557600080fd5b813567ffffffffffffffff81111561409c57600080fd5b8201601f810184136140ad57600080fd5b6128a684823560208401613d86565b6000602082840312156140ce57600080fd5b5035919050565b6000602082840312156140e757600080fd5b5051919050565b6000806040838503121561410157600080fd5b823591506020830135613e6481614629565b6000815180845261412b8160208601602086016144d2565b601f01601f19169290920160200192915050565b600083516141518184602088016144d2565b8351908301906141658183602088016144d2565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906141a190830184614113565b9695505050505050565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b818110156141f857845161ffff16835293830193918301916001016141d8565b5090979650505050505050565b60018060a01b038416815282602082015260606040820152600061422c6060830184614113565b95945050505050565b6020808252825182820181905260009190848201906040850190845b8181101561426d57835183529284019291840191600101614251565b50909695505050505050565b6020815260006124006020830184614113565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526021908201527f436f6e74726163747320617265206e6f7420616c6c6f77656420626967206d616040820152603760f91b606082015260800190565b6020808252602b908201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060408201526a1dda5d1a0819985d58d95d60aa1b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b8151151581526020808301516102008301919081840160005b600e81101561447757825160ff1682529183019190830190600101614457565b5050505060ff6040840151166101e083015292915050565b600082198211156144a2576144a26145a6565b500190565b6000826144b6576144b66145bc565b500490565b6000828210156144cd576144cd6145a6565b500390565b60005b838110156144ed5781810151838201526020016144d5565b838111156123265750506000910152565b600181811c9082168061451257607f821691505b602082108114156124f857634e487b7160e01b600052602260045260246000fd5b600061ffff8083168181141561454b5761454b6145a6565b6001019392505050565b6000600019821415614569576145696145a6565b5060010190565b60008261457f5761457f6145bc565b500690565b600060ff831680614597576145976145bc565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c7257600080fd5b8015158114610c7257600080fd5b6001600160e01b031981168114610c7257600080fdfea26469706673582212206add09eac6e3011cf9f8fb5482bbd27104a86e5328b6a15935f889445c92767264736f6c63430008070033

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.