Contract 0x44F01563Dbcb67170a071Ea014Af58d2032eFF61

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x0e2a68e9b37a342988612a71ec4e51ceddc60915e7021e9a544fd580207e0c33Safe Transfer Fr...264217712022-03-27 12:03:4459 days 16 hrs ago0xa25252fe35e98cff49a162a43efe2f9873b325f8 IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.002682342835 30.954991004
0x40b88da3e5fa31a557cdefd727c926109c57fa1a24e69e11855dfb582351ede0Safe Transfer Fr...264217632022-03-27 12:03:2859 days 16 hrs ago0xa25252fe35e98cff49a162a43efe2f9873b325f8 IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.00269054964 31.049699847
0x4b74aa89e43b00c3fbcb01e22b6e9447a40cd4b5b641e2abbdc9693126d5d235Safe Transfer Fr...233767492022-01-05 16:36:34140 days 11 hrs ago0x9a188c9b9fa408d47a97b90f5973170f81d2c196 IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0330905500
0x74947549f72dce3885f472d37bb0d13e25ae73f021487e6c9c51caf61445b81fSet Approval For...195249632021-09-26 5:59:51241 days 22 hrs ago0xb85737d0d9c81e4cfaa6453374d08bea87e1c705 IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.00029064211
0xb0398c6d2baa106e44064179388f2b33013ce0ec7b7b237cc5f10a0e568f6d67Set Approval For...195249622021-09-26 5:59:47241 days 22 hrs ago0xb85737d0d9c81e4cfaa6453374d08bea87e1c705 IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0000463221
0x51c58c7121fcf6d471f1e412bef603ef8331bc0681cc99daf06a4cd2f5baa044Safe Transfer Fr...191673682021-09-16 9:55:37251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0003448455
0x1329fe084960e3c16f1a2f0a45cf55ec79d6ef5425c8e31698670afa7a01ba86Safe Transfer Fr...191673682021-09-16 9:55:37251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0003344055
0x1654e4107f5bd7bc37735d49876abeb1af8ee1bcab1ea8310af9f540fdd7d395Safe Transfer Fr...191672402021-09-16 9:49:23251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.00042439655.5
0x3dbd203c22005686d91debbed96d29bcfaf4ed0850d21ee6bd33324eb857e837Safe Transfer Fr...191672092021-09-16 9:47:15251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0003344055
0xa4258894393b5ff212a11154a257861cdfaa02c9db78e76c27b97634a816ecd0Safe Transfer Fr...191672012021-09-16 9:46:43251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0003344055
0xea8a583ad261f5e88aa4277a7464efdabc16b6c7f0b40c6d0f2c3ccede3aa84cSafe Transfer Fr...191671922021-09-16 9:46:07251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0003858755
0x9d0d226939d44fa29bea9a5abb3f6c15039503e13640511e0482ba2ba1223dd7Safe Transfer Fr...191671852021-09-16 9:45:39251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0003204055
0x72947b6a86e2d23f4388699e32816ffccc270b881a8c35efaf6cad5f16edea57Safe Transfer Fr...191671572021-09-16 9:44:03251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0003858755
0x6c53472b8b26cd4e6b446e71e49ddaf8617c85781f5cf85807b305edd598e089Safe Transfer Fr...191670782021-09-16 9:41:21251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0003858755
0xd70093ad8aa63ee06a6a495b888a4bb0f8ee5f958790086172923024b1ef5739Safe Transfer Fr...191669722021-09-16 9:37:41251 days 18 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0003858755
0xd494091a28e091854fa39befd1b2ece62c8810f6be872a21aec9817682974c11Safe Transfer Fr...191667592021-09-16 9:30:23251 days 19 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.00084892511
0x850809a9df351e0792de9c01d941c3849cce66ac80ab494a2b3e3440205de722Safe Transfer Fr...191667432021-09-16 9:29:51251 days 19 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.00061748
0x9bf286d0c526d41d2f896d6544f3d33e5ad2fa5f62b28267406c36a4e1d22f28Safe Transfer Fr...191667092021-09-16 9:28:39251 days 19 hrs ago0x1ded4219a88b13199ccd8e713dd6de50eec86cbc IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0005518488
0xfe3234ae18439320f5a3b4ffc7be5a6fb7a882ad696315533fb62dab53ed4144Safe Transfer Fr...191639422021-09-16 7:38:45251 days 20 hrs ago0xcbf2d9f5a4fd40451bc8471556914a1e6ea7d8d4 IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0004473797046.485549711
0xcd7654285fcdf76c5891118370b2ae1dc26e4dfdb4ec24857d272cce26cd9dc6Safe Transfer Fr...191463022021-09-15 19:43:10252 days 8 hrs ago0xf1b30855994a95e7e2024aa44d986dc20fa6f617 IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0004828677
0xd789b91603f344123bc070f0b5f1560e24e4203b768d7ff1149f860169ec91c3Airdrop191446492021-09-15 18:36:23252 days 10 hrs ago0x2eed1e3c0c4c68dfd0c06debbe2e1911dc456a0b IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.00066259221
0xfc80c66ce01240be75504311b0a9575b79c32469c0168c5595ac8ff3103bb297Airdrop191446492021-09-15 18:36:23252 days 10 hrs ago0x2eed1e3c0c4c68dfd0c06debbe2e1911dc456a0b IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.0006623421
0x367e0579fdef2b36ffefc0004eac0e1b37ca991cd477343adef6116e536a62bbAirdrop191446482021-09-15 18:36:21252 days 10 hrs ago0x2eed1e3c0c4c68dfd0c06debbe2e1911dc456a0b IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.00066259221
0x2661656621f03941abdc49c5a69b274d5c8b0e8583567820b803e4544cff0d18Airdrop191446482021-09-15 18:36:21252 days 10 hrs ago0x2eed1e3c0c4c68dfd0c06debbe2e1911dc456a0b IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.00066259221
0xd71b495c1be0aad899e9fcabc29fb2e2eedff461f1750f0ba33442da51eaf8d4Airdrop191446482021-09-15 18:36:21252 days 10 hrs ago0x2eed1e3c0c4c68dfd0c06debbe2e1911dc456a0b IN  0x44f01563dbcb67170a071ea014af58d2032eff610 MATIC0.00066259221
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
BittyBotsMatic

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 50 runs

Other Settings:
default evmVersion
File 1 of 18 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

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

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

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

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

  LinkTokenInterface immutable internal LINK;
  address immutable private vrfCoordinator;

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

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

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

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

contract VRFRequestIDBase {

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

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

File 3 of 18 : 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 4 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 5 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 6 of 18 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.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 ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings 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.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).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 = ERC721.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 {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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 = ERC721.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 = ERC721.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(ERC721.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(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).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 {}
}

File 7 of 18 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 18 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 IERC721Receiver {
    /**
     * @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 9 of 18 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.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 ERC721Enumerable is ERC721, IERC721Enumerable {
    // 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(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.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(index < ERC721Enumerable.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 = ERC721.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 = ERC721.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();
    }
}

File 10 of 18 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 11 of 18 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @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 18 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private 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 13 of 18 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 14 of 18 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    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 15 of 18 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.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 ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 16 of 18 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 17 of 18 : BittyBotsMatic.sol
// contracts/BittyBots.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.7;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";

import "./UIntArrays.sol";

/**
 * 
 * ╔══╦╦══╦══╦═╦╦══╦═╦══╦══╗
 * ║╔╗╠╬╗╔╩╗╔╩╗║║╔╗║║╠╗╔╣══╣
 * ║╔╗║║║║─║║╔╩╗║╔╗║║║║║╠══║
 * ╚══╩╝╚╝─╚╝╚══╩══╩═╝╚╝╚══╝
 *
 * This contract was written by solazy.eth (twitter.com/_solazy). 
 * https://bittybots.io
 * © BittyBots NFT LLC. All rights reserved 
 */

contract BittyBotsMatic is ERC721Enumerable, VRFConsumerBase, Ownable  {
    // Generation Related Variables
    struct BittyBot {
        uint helmet;
        uint body;
        uint face;
        uint arms;
        uint engine;
        uint botType;
        uint accessories;
        uint setModifier;
        uint combinedCount;
        uint powerClass;
        uint power;
    }

    mapping(bytes32 => uint) private hashToTokenId;
    mapping(uint => uint) private bittyBots;
    mapping(uint256 => uint256[]) public combinations;

    uint public constant NUM_TRAITS = 7;
    uint public constant NUM_CORE_TRAITS = 6;
    uint public constant NUM_MODELS = 16;
    uint public combinedId = 20000;

    uint public constant TRAIT_INDEX_HELMET = 0;
    uint public constant TRAIT_INDEX_BODY = 1;
    uint public constant TRAIT_INDEX_FACE = 2;
    uint public constant TRAIT_INDEX_ARMS = 3;
    uint public constant TRAIT_INDEX_ENGINE = 4;
    uint public constant TRAIT_INDEX_TYPE = 5;
    uint public constant TRAIT_INDEX_ACCESSORIES = 6;

    uint[NUM_TRAITS] private traitSizes;
    uint[NUM_TRAITS] private traitCounts;
    uint[NUM_TRAITS] private traitRemaining;
    uint public specialBotRemaining;
    
    uint private fallbackModelProbabilities;
    uint private fallbackEngineProbabilities;

    bytes32[NUM_TRAITS] public traitCategories;
    bytes32[][NUM_TRAITS] public traitNames;

    event BittyBotMinted(
        address indexed owner,
        uint tokenId,
        uint[] traits, 
        uint setModifier,
        uint combinedCount,
        uint powerClass,
        uint power
    );

    // ERC721 Sales Related Variables
    uint public constant TOKEN_LIMIT = 20000;
    uint private constant RESERVE_LIMIT = 500;
    uint private constant MAX_CHUBBIES = 10000;
    uint internal constant PRICE = 100 ether;

    bool public isSaleActive = false;

    uint public numSold = 82; // Mainnet results
    uint internal randomResult;

    string private _baseTokenURI;

    // Withdraw Addresses
    address payable private solazy;
    address payable private kixboy;

    // ChainLink
    address private VRFCoordinator = 0x8C7382F9D8f56b33781fE506E897a4F1e2d17255;
    address private linkToken = 0x326C977E6efc84E512bB9C30f76E30c160eD06FB;
    bytes32 internal keyHash = 0x6e75b569a01ef56d18cab6a8e71e6600d6ce853834d4a5748b720d06f878b3a4;
    uint256 internal linkFee = 1 * 10**14; // 0.0001 LINK

    constructor() 
        ERC721("BittyBots","BITTY") 
        VRFConsumerBase(VRFCoordinator, linkToken) 
    {
        traitSizes = [NUM_MODELS, NUM_MODELS, NUM_MODELS, NUM_MODELS, 10, 4, 7];

        uint[] memory modelDistribution = new uint[](traitSizes[TRAIT_INDEX_HELMET]);
        uint[] memory engineDistribution = new uint[](traitSizes[TRAIT_INDEX_ENGINE]);
        uint[] memory typeDistribution = new uint[](traitSizes[TRAIT_INDEX_TYPE]);
        uint[] memory accessoryDistribution = new uint[](traitSizes[TRAIT_INDEX_ACCESSORIES]);
        uint[] memory specialModelDistribution = new uint[](traitSizes[TRAIT_INDEX_HELMET]);

        traitCounts[TRAIT_INDEX_HELMET] = UIntArrays.packedUintFromArray(modelDistribution);
        traitCounts[TRAIT_INDEX_BODY] = UIntArrays.packedUintFromArray(modelDistribution);
        traitCounts[TRAIT_INDEX_FACE] = UIntArrays.packedUintFromArray(modelDistribution);
        traitCounts[TRAIT_INDEX_ARMS] = UIntArrays.packedUintFromArray(modelDistribution);
        traitCounts[TRAIT_INDEX_ENGINE] = UIntArrays.packedUintFromArray(engineDistribution);
        traitCounts[TRAIT_INDEX_TYPE] = UIntArrays.packedUintFromArray(typeDistribution);
        traitCounts[TRAIT_INDEX_ACCESSORIES] = UIntArrays.packedUintFromArray(accessoryDistribution);

        modelDistribution[0] = 4; 
        for (uint i = 1; i < 13; i++) {
            modelDistribution[i] = 1600; 
        }
        modelDistribution[13] = 360; 
        modelDistribution[14] = 240;
        modelDistribution[15] = 150; 
        specialModelDistribution[0] = 1;
        for (uint i = 1; i < specialModelDistribution.length; i++) {
            specialModelDistribution[i] = 3; 
        }
        engineDistribution[0] = 4800;
        engineDistribution[1] = 4000;
        engineDistribution[2] = 3200;
        engineDistribution[3] = 2400;
        engineDistribution[4] = 1600;
        engineDistribution[5] = 1600;
        engineDistribution[6] = 1200;
        engineDistribution[7] = 554;
        engineDistribution[8] = 400;
        engineDistribution[9] = 200;
        typeDistribution[0] = 19954;
        typeDistribution[1] = 16;
        typeDistribution[2] = 15;
        typeDistribution[3] = 15;
        accessoryDistribution[0] = 19334;
        accessoryDistribution[1] = 200;
        accessoryDistribution[2] = 200;
        accessoryDistribution[3] = 100;
        accessoryDistribution[4] = 100;
        accessoryDistribution[5] = 10;
        accessoryDistribution[6] = 10;

        traitRemaining[TRAIT_INDEX_HELMET] = UIntArrays.packedUintFromArray(modelDistribution);
        traitRemaining[TRAIT_INDEX_BODY] = UIntArrays.packedUintFromArray(modelDistribution);
        traitRemaining[TRAIT_INDEX_FACE] = UIntArrays.packedUintFromArray(modelDistribution);
        traitRemaining[TRAIT_INDEX_ARMS] = UIntArrays.packedUintFromArray(modelDistribution);
        traitRemaining[TRAIT_INDEX_ENGINE] = UIntArrays.packedUintFromArray(engineDistribution);
        traitRemaining[TRAIT_INDEX_TYPE] = UIntArrays.packedUintFromArray(typeDistribution);
        traitRemaining[TRAIT_INDEX_ACCESSORIES] = UIntArrays.packedUintFromArray(accessoryDistribution);
        specialBotRemaining = UIntArrays.packedUintFromArray(specialModelDistribution);

        fallbackModelProbabilities = UIntArrays.packedUintFromArray(modelDistribution);
        fallbackEngineProbabilities = UIntArrays.packedUintFromArray(engineDistribution);

        traitCategories = [
            bytes32("Helmet"),
            bytes32("Body"),
            bytes32("Face"),
            bytes32("Arms"),
            bytes32("Engine"),
            bytes32("Type"), 
            bytes32("Accessory")
        ];

        bytes32[NUM_MODELS] memory modelNames = [
            bytes32("MXX Torva"),
            bytes32("M01 Ava"),
            bytes32("M02 Shadow King"),
            bytes32("M03 Eni"),
            bytes32("M04 Ultra 7.1"),
            bytes32("M05 Titan"),
            bytes32("M06 Solar Phantom"),
            bytes32("M07 Cyberkat"),
            bytes32("M08 Ziggy"),
            bytes32("M09 Bakken"),
            bytes32("M10 Supaiku"),
            bytes32("M11 Neo"),
            bytes32("M12 Leapor"),
            bytes32("M13 Jupiter"),
            bytes32("M14 Mercury"),
            bytes32("M15 Morpheus")
        ];

        traitNames[TRAIT_INDEX_HELMET] = modelNames;
        traitNames[TRAIT_INDEX_BODY] = modelNames;
        traitNames[TRAIT_INDEX_ARMS] = modelNames;
        traitNames[TRAIT_INDEX_FACE] = modelNames;
        traitNames[TRAIT_INDEX_ENGINE] = [
            bytes32("Love"),
            bytes32("Fire"),
            bytes32("Starshine"),
            bytes32("Luna"),
            bytes32("Solaris"),
            bytes32("Diamond"),
            bytes32("Death"),
            bytes32("Lightning"), // lightning effect
            bytes32("Variable"), // glitch effect
            bytes32("Harmony"), // shiny effect
            bytes32("Error"), // glitchbot
            bytes32("Solid Gold"), // goldbot
            bytes32("Divinity") // godbot
        ];
        traitNames[TRAIT_INDEX_TYPE] = [
            bytes32("Classic"),
            bytes32("Glitch"),
            bytes32("Gold"),
            bytes32("God")
        ];
        traitNames[TRAIT_INDEX_ACCESSORIES] = [
            bytes32("None"),
            bytes32("Bomb"),
            bytes32("Exios Gem"),
            bytes32("Tuera Beam"),
            bytes32("Galactic Visor"),
            bytes32("BB1"),
            bytes32("Hacker Mode")
        ];
    }

    // BittyBot helpers

    // Packing optimization to save gas
    function setBittyBot(
        uint _tokenId,
        uint[] memory _traits,
        uint _setModifier,
        uint _combinedCount,
        uint _powerClass,
        uint _power
    ) internal {
        uint bittyBot = _traits[0];
        bittyBot |= _traits[1] << 8;
        bittyBot |= _traits[2] << 16;
        bittyBot |= _traits[3] << 24;
        bittyBot |= _traits[4] << 32;
        bittyBot |= _traits[5] << 40;
        bittyBot |= _traits[6] << 48;
        bittyBot |= _setModifier << 56;
        bittyBot |= _combinedCount << 64;
        bittyBot |= _powerClass << 72;
        bittyBot |= _power << 80;

        bittyBots[_tokenId] = bittyBot; 
    }

    function getBittyBot(uint _tokenId) internal view returns (BittyBot memory _bot) {
        uint bittyBot = bittyBots[_tokenId];
        _bot.helmet = uint256(uint8(bittyBot));
        _bot.body = uint256(uint8(bittyBot >> 8));
        _bot.face = uint256(uint8(bittyBot >> 16));
        _bot.arms = uint256(uint8(bittyBot >> 24));
        _bot.engine = uint256(uint8(bittyBot >> 32));
        _bot.botType = uint256(uint8(bittyBot >> 40));
        _bot.accessories = uint256(uint8(bittyBot >> 48));
        _bot.setModifier = uint256(uint8(bittyBot >> 56));
        _bot.combinedCount = uint256(uint8(bittyBot >> 64));
        _bot.powerClass = uint256(uint8(bittyBot >> 72));
        _bot.power = uint256(uint16(bittyBot >> 80));
    }

    function getTraitRemaining() public view returns (uint[][] memory) {
        uint[][] memory results = new uint[][](NUM_TRAITS);

        for (uint i; i < NUM_TRAITS; i++) {
            results[i] = UIntArrays.arrayFromPackedUint(traitRemaining[i], traitSizes[i]);
        }

        return results;
    }

    function getTraitCounts() public view returns (uint[][] memory) {
        uint[][] memory results = new uint[][](NUM_TRAITS);

        for (uint i; i < NUM_TRAITS; i++) {
            results[i] = UIntArrays.arrayFromPackedUint(traitCounts[i], traitSizes[i]);
        }

        return results;
    }

    // Hash is only determined by core traits and type
    function bittyHash(uint[] memory _traits) public pure returns (bytes32) {
        return UIntArrays.hash(_traits, NUM_CORE_TRAITS);
    }

    function isBotAvailable(uint _claimId) public view returns (bool) {
        return bittyBots[_claimId] == 0;
    }

    function isSpecialBot(uint[] memory _traits) public pure returns (bool) {
        return _traits[TRAIT_INDEX_TYPE] > 0;
    }

    function existTraits(uint[] memory _traits) public view returns (bool) {
        return tokenIdFromTraits(_traits) != 0;
    }

    function tokenIdFromTraits(uint[] memory _traits) public view returns (uint) {
        return hashToTokenId[bittyHash(_traits)];
    }

    function traitsForTokenId(uint _tokenId) public view returns (
        uint[] memory _traits, 
        uint _setModifier, 
        uint _combinedCount,
        uint _powerClass,
        uint _power
    ) {
        (_traits, _setModifier, _combinedCount, _powerClass, _power) = traitsFromBot(getBittyBot(_tokenId));
    }

    function traitsFromBot(BittyBot memory _bot) internal pure returns (
        uint[] memory _traits, 
        uint _setModifier, 
        uint _combinedCount, 
        uint _powerClass, 
        uint _power
    ) {
        _traits = new uint[](NUM_TRAITS);
        _traits[TRAIT_INDEX_HELMET] = _bot.helmet;
        _traits[TRAIT_INDEX_BODY] = _bot.body;
        _traits[TRAIT_INDEX_FACE] = _bot.face;
        _traits[TRAIT_INDEX_ARMS] = _bot.arms;
        _traits[TRAIT_INDEX_ENGINE] = _bot.engine;
        _traits[TRAIT_INDEX_TYPE] = _bot.botType;
        _traits[TRAIT_INDEX_ACCESSORIES] = _bot.accessories;

        _setModifier = _bot.setModifier;
        _combinedCount = _bot.combinedCount;
        _powerClass = _bot.powerClass;
        _power = _bot.power;
    }

    function strConcat(string memory _a, string memory _b) internal pure returns(string memory) {
        return string(abi.encodePacked(bytes(_a), bytes(_b)));
    }

    function bytes32ToString(bytes32 _bytes32) internal pure returns (string memory) {
        uint i = 0;
        while(i < 32 && _bytes32[i] != 0) {
            i++;
        }
        bytes memory bytesArray = new bytes(i);
        for (i = 0; i < 32 && _bytes32[i] != 0; i++) {
            bytesArray[i] = _bytes32[i];
        }
        return string(bytesArray);
    }

    function _mintBot(address _sendTo, uint _tokenId) internal {
        // 1. Try to get random traits from remaining
        //uint dna = uint(keccak256(abi.encodePacked(msg.sender, _tokenId, block.difficulty, block.timestamp)));
        getRandomNumber();
        uint dna = randomResult;
        uint[] memory traits = randomTraits(dna);
        
        // 2. Try reroll with fixed probabillity model if we hit a duplicate (0.0002% of happening)
        if (existTraits(traits)) {
            uint offset = 0;
            do {
                traits = randomFallbackTraits(dna, offset);
                offset += 1;
                require(offset < 5, "Rerolled traits but failed");
            } while (existTraits(traits));
        }
        
        hashToTokenId[bittyHash(traits)] = _tokenId;
        uint setModifier = setModifierForParts(traits);
        uint power = estimatePowerForBot(traits, new uint[](0), setModifier);
        uint powerClass = powerClassForPower(power);
        setBittyBot(
            _tokenId,
            traits,
            setModifier,
            0,
            powerClass,
            power
        );

        // 3. Update info maps with special treatments for special bots
        if (isSpecialBot(traits)) {
            traitRemaining[TRAIT_INDEX_TYPE] = UIntArrays.decrementPackedUint(traitRemaining[TRAIT_INDEX_TYPE], traits[TRAIT_INDEX_TYPE], 1);
            traitCounts[TRAIT_INDEX_TYPE] = UIntArrays.incrementPackedUint(traitCounts[TRAIT_INDEX_TYPE], traits[TRAIT_INDEX_TYPE], 1);
            specialBotRemaining = UIntArrays.decrementPackedUint(specialBotRemaining, traits[TRAIT_INDEX_HELMET], 1);
        } else {
            for (uint i = 0; i < traits.length; i++) {
                traitRemaining[i] = UIntArrays.decrementPackedUint(traitRemaining[i], traits[i], 1);
                traitCounts[i] = UIntArrays.incrementPackedUint(traitCounts[i], traits[i], 1);
            }
            combinations[_tokenId].push(_tokenId);
        }
        
        _safeMint(_sendTo, _tokenId);
        emit BittyBotMinted(_sendTo, _tokenId, traits, setModifier, 0, powerClass, power);
    }

    function randomTraits(uint _dna) internal view returns (uint[] memory) {
        uint[] memory traits = new uint[](NUM_TRAITS);
        for (uint i = 0; i < traitRemaining.length; i++) {
            traits[i] = UIntArrays.randomIndexFromWeightedArray(UIntArrays.arrayFromPackedUint(traitRemaining[i], traitSizes[i]),
                                                                uint(keccak256(abi.encodePacked(_dna, i + 1))));
        }

        // Special Bot Treatment
        if (isSpecialBot(traits)) {
            uint modelIndex = UIntArrays.randomIndexFromWeightedArray(UIntArrays.arrayFromPackedUint(specialBotRemaining, traitSizes[TRAIT_INDEX_HELMET]),  
                                                                      uint(keccak256(abi.encodePacked(_dna))));
            for (uint i = 0; i < TRAIT_INDEX_TYPE; i++) {
                traits[i] = modelIndex;
            }
            traits[TRAIT_INDEX_ENGINE] = traits[TRAIT_INDEX_TYPE] + 9;
            traits[TRAIT_INDEX_ACCESSORIES] = 0;
        }

        return traits;
    }

    function randomFallbackTraits(uint _dna, uint _offset) internal view returns (uint[] memory) {
        uint[] memory traits = new uint[](NUM_TRAITS);

        for (uint i = 0; i < 4; i++) {
            traits[i] = UIntArrays.randomIndexFromWeightedArray(UIntArrays.arrayFromPackedUint(fallbackModelProbabilities, traitSizes[i]), 
                                                                uint(keccak256(abi.encodePacked(_dna, _offset * i))));
        }
        
        traits[TRAIT_INDEX_ENGINE] = UIntArrays.randomIndexFromWeightedArray(UIntArrays.arrayFromPackedUint(fallbackEngineProbabilities, traitSizes[TRAIT_INDEX_ENGINE]), 
                                                                             uint(keccak256(abi.encodePacked(_dna, _offset * TRAIT_INDEX_ENGINE))));
        return traits;
    }

    function metadata(uint _tokenId) public view returns (string memory resultString) {
        if (_exists(_tokenId) == false) {
            return '{}';
        }
        resultString = '{';
        (
            uint[] memory traits, 
            uint setModifier, 
            uint combinedCount, 
            uint powerClass, 
            uint power
        ) = traitsForTokenId(_tokenId);

        for (uint i = 0; i < traits.length; i++) {
            if (i > 0) {
                resultString = strConcat(resultString, ', ');
            }
            resultString = strConcat(resultString, '"');
            resultString = strConcat(resultString, bytes32ToString(traitCategories[i]));
            resultString = strConcat(resultString, '": "');
            resultString = strConcat(resultString, bytes32ToString(traitNames[i][traits[i]]));
            resultString = strConcat(resultString, '"');
        }

        resultString = strConcat(resultString, ', ');

        string[] memory valueCategories = new string[](4);
        valueCategories[0] = 'Full Set';
        valueCategories[1] = 'Combined';
        valueCategories[2] = 'Power Class';
        valueCategories[3] = 'Power';
        uint[] memory values = new uint[](4);
        values[0] = setModifier;
        values[1] = combinedCount;
        values[2] = powerClass;
        values[3] = power;

        for (uint i = 0; i < valueCategories.length; i++) {
            if (i > 0) {
                resultString = strConcat(resultString, ', ');
            }
            resultString = strConcat(resultString, '"');
            resultString = strConcat(resultString, valueCategories[i]);
            resultString = strConcat(resultString, '": ');
            resultString = strConcat(resultString, Strings.toString(values[i]));
        }

        resultString = strConcat(resultString, '}');

        return resultString;
    }

    // COMBINE
    function isSelectedTraitsEligible(uint[] memory _selectedTraits, uint[] memory _selectedBots) public view returns (bool) {
        uint[] memory traits;

        for (uint traitIndex = 0; traitIndex < _selectedTraits.length; traitIndex++) {
            bool traitCheck = false;
            for (uint botIndex = 0; botIndex < _selectedBots.length; botIndex++) {
                (traits, , , , ) = traitsForTokenId(_selectedBots[botIndex]);

                if (traits[traitIndex] == _selectedTraits[traitIndex]) {
                    traitCheck = true;
                    break;
                }
            }
            if (traitCheck == false) {
                return false;
            }
        }

        return true;
    }

    function combine(uint[] memory _selectedTraits, uint[] memory _selectedBots) external payable {
        // 1. check if bot already exists and not in selected bot
        require(_selectedTraits.length == NUM_TRAITS, "Malformed traits");
        require(_selectedBots.length < 6, "Cannot combine more than 5 bots");

        // 2. check traits is in selected bots
        require(isSelectedTraitsEligible(_selectedTraits, _selectedBots), "Traits not in bots");

        // 3. burn selected bots
        uint[] memory selectedBotTraits;
        uint[] memory traitsToDeduct = new uint[](NUM_TRAITS);
        uint maxCombinedCount = 0;
        uint combinedCount;
        uint selectedPowerClass;

        combinations[combinedId].push(combinedId);
        for (uint i = 0; i < _selectedBots.length; i++) {
            require(_exists(_selectedBots[i]), "Selected bot doesn't exist");
            (selectedBotTraits, , combinedCount, selectedPowerClass, ) = traitsForTokenId(_selectedBots[i]);
            require(selectedBotTraits[TRAIT_INDEX_TYPE] == 0, "Special bots cannot be combined");

            if (combinedCount > maxCombinedCount) {
                maxCombinedCount = combinedCount;
            }

            for (uint j = 0; j < combinations[_selectedBots[i]].length; j++) {
                combinations[combinedId].push(combinations[_selectedBots[i]][j]);
            }

            for (uint j = 0; j < NUM_TRAITS; j++) {
                traitsToDeduct[j] = UIntArrays.incrementPackedUint(traitsToDeduct[j], selectedBotTraits[j], 1);
            }

            // remove hash so that the traits are freed
            delete hashToTokenId[bittyHash(selectedBotTraits)];

            _burn(_selectedBots[i]);
        }
        uint newCombinedCount = maxCombinedCount + 1;
        require(existTraits(_selectedTraits) == false, "Traits already exist");
        require(newCombinedCount < 4, "Cannot combine more than 3 times");

        // Combine Fee
        uint combineFee = 0;
        if (newCombinedCount > 1) {
            if (newCombinedCount == 2) {
                combineFee = PRICE;
            } else if (newCombinedCount == 3) {
                combineFee = 2 * PRICE;
            }
            require(msg.value >= combineFee, "Ether value sent is below the combine fee");
        }

        // 4. mint new bot with selected traits
        _safeMint(msg.sender, combinedId);

        hashToTokenId[bittyHash(_selectedTraits)] = combinedId;
        uint setModifier = setModifierForParts(_selectedTraits);
        uint power = estimatePowerForBot(_selectedTraits, _selectedBots, setModifier);
        uint powerClass = powerClassForPower(power);
        setBittyBot(
            combinedId,
            _selectedTraits,
            setModifier,
            newCombinedCount,
            powerClass,
            power
        );

        // Update Trait Count in one sitting to avoid expensive storage hit
        for (uint i = 0; i < NUM_TRAITS; i++) {
            traitsToDeduct[i] = UIntArrays.decrementPackedUint(traitsToDeduct[i], _selectedTraits[i], 1);
            traitCounts[i] -= traitsToDeduct[i];
        }

        emit BittyBotMinted(msg.sender, combinedId, _selectedTraits, setModifier, newCombinedCount, powerClass, power);
        combinedId++;
    }

    function powerForPart(uint _traitCategory, uint _traitIndex) public pure returns (uint) {
        if (_traitCategory == TRAIT_INDEX_HELMET ||
            _traitCategory == TRAIT_INDEX_FACE ||
            _traitCategory == TRAIT_INDEX_ARMS ||
            _traitCategory == TRAIT_INDEX_BODY) {
            if (_traitIndex == 0) {
                return 300;
            } else if (_traitIndex < 13) {
                return 40;
            } else if (_traitIndex < 15) {
                return 80;
            }
            return 150;
        } else if (_traitCategory == TRAIT_INDEX_ENGINE) {
            return 4 * _traitIndex ** 2 + 6 * _traitIndex + 10;
        } else if (_traitCategory == TRAIT_INDEX_ACCESSORIES) {
            if (_traitIndex == 0) {
                return 0;
            } else if (_traitIndex < 3){
                return 100;
            } else if (_traitIndex < 5){
                return 200;
            } else if (_traitIndex < 7){
                return 400;
            }
        }

        return 0;
    }

    function setModifierForParts(uint[] memory _traits) public pure returns (uint count) {
        for (uint i = 0; i < 4; i++) {
            uint currentCount = 0;
            for (uint j = 0; j < 4; j++) {
                if (_traits[i] == _traits[j]) {
                    currentCount++;
                }
            }
            if (currentCount > count) {
                count = currentCount;
            }
        }
        return count;
    }

    function powerClassForPower(uint _power) public pure returns (uint) {
        if (_power < 300) {
            return 1;
        } else if (_power < 500) {
            return 2;
        } else if (_power < 800) {
            return 3;
        } else if (_power < 1000) {
            return 4;
        } else if (_power < 1200) {
            return 5;
        } else if (_power < 1400) {
            return 6;
        } else if (_power < 1600) {
            return 7;
        } else if (_power < 1800) {
            return 8;
        } else if (_power < 2000) {
            return 9;
        } else {
            return 10;
        }
    }

    function estimatePowerForBot(uint[] memory _selectedTraits, uint[] memory _selectedBots, uint _setModifier) public view returns (uint power) {
        if (_selectedTraits[TRAIT_INDEX_TYPE] == 1) {
            return 1400;
        } else if (_selectedTraits[TRAIT_INDEX_TYPE] == 2) {
            return 1600;
        } else if (_selectedTraits[TRAIT_INDEX_TYPE] == 3) {
            return 1800;
        }

        // get power of bots
        BittyBot memory bot;
        for (uint i = 0; i < _selectedBots.length; i++) {
            bot = getBittyBot(_selectedBots[i]);
            power += bot.power / 4;
        }

        // get power for parts
        for (uint i = 0; i < _selectedTraits.length; i++) {
            power += powerForPart(i, _selectedTraits[i]);
        }

        return (_setModifier > 1) ? power * (1 << (_setModifier - 2) + 10) / 10 : power;
    }

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

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

    // Sales related functions
    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }

    function setBaseURI(string memory baseURI) public onlyOwner {
        _baseTokenURI = baseURI;
    }
    
    function tokensOfOwner(address _owner) public view returns(uint[] memory) {
        uint tokenCount = balanceOf(_owner);
        uint[] memory result = new uint[](tokenCount);
        for (uint index = 0; index < tokenCount; index++) {
            result[index] = tokenOfOwnerByIndex(_owner, index);
        }
        return result;
    }

    function buy(uint _numBuy) external payable {
        uint startIndex = MAX_CHUBBIES + RESERVE_LIMIT + numSold;
        require(isSaleActive, "Sale is not active");
        require(startIndex + _numBuy < TOKEN_LIMIT, "Exceeded 20000 limit");
        require(_numBuy < 11, "You can buy maximum 10 bots");
        require(msg.value >= PRICE * _numBuy, "Ether value sent is below the price");

        for (uint i = 0; i < _numBuy; i++) {
            _mintBot(msg.sender, startIndex + i);
        }
        numSold += _numBuy;
    }

    function airdrop(address _sendTo, uint _numAirdrop) public onlyOwner {
        uint startIndex = MAX_CHUBBIES + RESERVE_LIMIT + numSold;
        for (uint i = 0; i < _numAirdrop; i++) {
            _mintBot(_sendTo, startIndex + i);
        }
        numSold += _numAirdrop;
    }

    // Note: This should only be used for minting existing bots on Ethereum Mainnet
    function mintSpecificBot(address _sendTo, uint _tokenId, uint[] memory _traits) public onlyOwner {
        hashToTokenId[bittyHash(_traits)] = _tokenId;
        uint setModifier = setModifierForParts(_traits);
        uint power = estimatePowerForBot(_traits, new uint[](0), setModifier);
        uint powerClass = powerClassForPower(power);
        setBittyBot(
            _tokenId,
            _traits,
            setModifier,
            0,
            powerClass,
            power
        );

        if (isSpecialBot(_traits)) {
            traitRemaining[TRAIT_INDEX_TYPE] = UIntArrays.decrementPackedUint(traitRemaining[TRAIT_INDEX_TYPE], _traits[TRAIT_INDEX_TYPE], 1);
            traitCounts[TRAIT_INDEX_TYPE] = UIntArrays.incrementPackedUint(traitCounts[TRAIT_INDEX_TYPE], _traits[TRAIT_INDEX_TYPE], 1);
            specialBotRemaining = UIntArrays.decrementPackedUint(specialBotRemaining, _traits[TRAIT_INDEX_HELMET], 1);
        } else {
            for (uint i = 0; i < _traits.length; i++) {
                traitRemaining[i] = UIntArrays.decrementPackedUint(traitRemaining[i], _traits[i], 1);
                traitCounts[i] = UIntArrays.incrementPackedUint(traitCounts[i], _traits[i], 1);
            }
            combinations[_tokenId].push(_tokenId);
        }
        
        _safeMint(_sendTo, _tokenId);
        emit BittyBotMinted(_sendTo, _tokenId, _traits, setModifier, 0, powerClass, power);
    }

    function setWithdrawAddresses(address payable _solazy, address payable _kixboy) public onlyOwner {
        solazy = _solazy;
        kixboy = _kixboy;
    }
    
    function startSale() public onlyOwner {
        isSaleActive = true;
    }

    function stopSale() public onlyOwner {
        isSaleActive = false;
    }
    
    function withdraw() public {
        require(msg.sender == kixboy || msg.sender == solazy || msg.sender == owner(), "Invalid sender");
        uint halfBalance = address(this).balance / 2;
        kixboy.transfer(halfBalance);
        solazy.transfer(address(this).balance);
    }

    function withdrawTokens(IERC20 token) public {
        require(address(token) != address(0));
        require(msg.sender == kixboy || msg.sender == solazy || msg.sender == owner(), "Invalid sender");
        uint halfBalance = token.balanceOf(address(this)) / 2;
        token.transfer(kixboy, halfBalance);
        token.transfer(solazy, halfBalance);
    }

    function reserveMint(address _sendTo, uint _tokenId) public {
        require(msg.sender == kixboy || msg.sender == solazy || msg.sender == owner(), "Invalid sender");
        require(isBotAvailable(_tokenId), "Invalid token id");
        _mintBot(_sendTo, _tokenId);
    }

    function reserveBulkMint(address _sendTo, uint _numReserve) public {
        require(msg.sender == kixboy || msg.sender == solazy || msg.sender == owner(), "Invalid sender");
        uint numReserved = 0;
        for (uint i = MAX_CHUBBIES; i < MAX_CHUBBIES + RESERVE_LIMIT; i++) {
            if (isBotAvailable(i)) {
                _mintBot(_sendTo, i);
                numReserved++;
            }
            if (numReserved == _numReserve) {
                return;
            }
        }
    }
}

File 18 of 18 : UIntArrays.sol
// contracts/UIntArrays.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.7;


library UIntArrays {
    function sum(uint[] memory _array) public pure returns (uint result) {
        result = 0;
        for (uint i = 0; i < _array.length; i++){
            result += _array[i];
        }
    }

    function randomIndexFromWeightedArray(uint[] memory _weightedArray, uint _randomNumber) public pure returns (uint) {
        uint totalSumWeight = sum(_weightedArray);
        require(totalSumWeight > 0, "Array has no weight");
        uint randomSumWeight = _randomNumber % totalSumWeight;
        uint currentSumWeight = 0;

        for (uint i = 0; i < _weightedArray.length; i++) {
            currentSumWeight += _weightedArray[i];
            if (randomSumWeight < currentSumWeight) {
                return i;
            }
        }

        return _weightedArray.length - 1;
    } 

    function hash(uint[] memory _array, uint _endIndex) public pure returns (bytes32) {
        bytes memory encoded;
        for (uint i = 0; i < _endIndex; i++) {
            encoded = abi.encode(encoded, _array[i]);
        }

        return keccak256(encoded);
    }

    function arrayFromPackedUint(uint _packed, uint _size) public pure returns (uint[] memory) {
        uint[] memory array = new uint[](_size);

        for (uint i = 0; i < _size; i++) {
            array[i] = uint256(uint16(_packed >> (i * 16)));
        }

        return array;
    }

    function packedUintFromArray(uint[] memory _array) public pure returns (uint _packed) {
        require(_array.length < 17, "pack array > 16");
        for (uint i = 0; i < _array.length; i++) {
            _packed |= _array[i] << (i * 16);
        }
    }

    function elementFromPackedUint(uint _packed, uint _index) public pure returns (uint) {
        return uint256(uint16(_packed >> (_index * 16)));
    }

    function decrementPackedUint(uint _packed, uint _index, uint _number) public pure returns (uint result) {
        result = _packed & ~(((1 << 16) - 1) << (_index * 16));
        result |= (elementFromPackedUint(_packed, _index) - _number) << (_index * 16);
    }

    function incrementPackedUint(uint _packed, uint _index, uint _number) public pure returns (uint result) {
        result = _packed & ~(((1 << 16) - 1) << (_index * 16));
        result |= (elementFromPackedUint(_packed, _index) + _number) << (_index * 16);
    }

    function mergeArrays(uint[] memory _array1, uint[] memory _array2, bool _isPositive) public pure returns (uint[] memory) {
        for (uint i = 0; i < _array1.length; i++) {
            if (_isPositive) {
                _array1[i] += _array2[i];
            } else {
                _array1[i] -= _array2[i];
            }
            
        }
        return _array1;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 50
  },
  "evmVersion": "london",
  "libraries": {
    "/contracts/UIntArrays.sol": {
      "UIntArrays": "0xCB2DC9E2f1a1522F9205232f15f680c476cA9920"
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"traits","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"setModifier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"combinedCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"powerClass","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"power","type":"uint256"}],"name":"BittyBotMinted","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":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"},{"inputs":[],"name":"NUM_CORE_TRAITS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NUM_MODELS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NUM_TRAITS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_ACCESSORIES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_ARMS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_BODY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_ENGINE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_FACE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_HELMET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_TYPE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sendTo","type":"address"},{"internalType":"uint256","name":"_numAirdrop","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"bittyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numBuy","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"combinations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_selectedTraits","type":"uint256[]"},{"internalType":"uint256[]","name":"_selectedBots","type":"uint256[]"}],"name":"combine","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"combinedId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_selectedTraits","type":"uint256[]"},{"internalType":"uint256[]","name":"_selectedBots","type":"uint256[]"},{"internalType":"uint256","name":"_setModifier","type":"uint256"}],"name":"estimatePowerForBot","outputs":[{"internalType":"uint256","name":"power","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"existTraits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRandomNumber","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTraitCounts","outputs":[{"internalType":"uint256[][]","name":"","type":"uint256[][]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTraitRemaining","outputs":[{"internalType":"uint256[][]","name":"","type":"uint256[][]"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"_claimId","type":"uint256"}],"name":"isBotAvailable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_selectedTraits","type":"uint256[]"},{"internalType":"uint256[]","name":"_selectedBots","type":"uint256[]"}],"name":"isSelectedTraitsEligible","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"isSpecialBot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"metadata","outputs":[{"internalType":"string","name":"resultString","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sendTo","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"mintSpecificBot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_power","type":"uint256"}],"name":"powerClassForPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_traitCategory","type":"uint256"},{"internalType":"uint256","name":"_traitIndex","type":"uint256"}],"name":"powerForPart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sendTo","type":"address"},{"internalType":"uint256","name":"_numReserve","type":"uint256"}],"name":"reserveBulkMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sendTo","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"reserveMint","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"setModifierForParts","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address payable","name":"_solazy","type":"address"},{"internalType":"address payable","name":"_kixboy","type":"address"}],"name":"setWithdrawAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"specialBotRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopSale","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":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"tokenIdFromTraits","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":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"traitCategories","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"traitNames","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"traitsForTokenId","outputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"},{"internalType":"uint256","name":"_setModifier","type":"uint256"},{"internalType":"uint256","name":"_combinedCount","type":"uint256"},{"internalType":"uint256","name":"_powerClass","type":"uint256"},{"internalType":"uint256","name":"_power","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":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052614e20600f556036805460ff191690556052603755603c80546001600160a01b0319908116738c7382f9d8f56b33781fe506e897a4f1e2d1725517909155603d805490911673326c977e6efc84e512bb9c30f76e30c160ed06fb1790557f6e75b569a01ef56d18cab6a8e71e6600d6ce853834d4a5748b720d06f878b3a4603e55655af3107a4000603f553480156200009c57600080fd5b50603c54603d5460408051808201825260098152684269747479426f747360b81b602080830191825283518085019094526005845264424954545960d81b9084015281516001600160a01b03958616959094169391929162000101916000916200151e565b508051620001179060019060208401906200151e565b5050506001600160601b0319606092831b811660a052911b16608052620001456200013f3390565b620014cc565b6040518060e0016040528060108152602001601081526020016010815260200160108152602001600a8152602001600481526020016007815250601090600762000191929190620015ad565b506010546000906001600160401b03811115620001b257620001b26200170e565b604051908082528060200260200182016040528015620001dc578160200160208202803683370190505b50905060006010600401546001600160401b038111156200020157620002016200170e565b6040519080825280602002602001820160405280156200022b578160200160208202803683370190505b50905060006010600501546001600160401b038111156200025057620002506200170e565b6040519080825280602002602001820160405280156200027a578160200160208202803683370190505b50905060006010600601546001600160401b038111156200029f576200029f6200170e565b604051908082528060200260200182016040528015620002c9578160200160208202803683370190505b509050600060108101546001600160401b03811115620002ed57620002ed6200170e565b60405190808252806020026020018201604052801562000317578160200160208202803683370190505b5060405163036fe36760e01b815290915073cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe36790620003549088906004016200164b565b60206040518083038186803b1580156200036d57600080fd5b505af415801562000382573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003a8919062001631565b60175560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe36790620003e49088906004016200164b565b60206040518083038186803b158015620003fd57600080fd5b505af415801562000412573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000438919062001631565b60185560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe36790620004749088906004016200164b565b60206040518083038186803b1580156200048d57600080fd5b505af4158015620004a2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004c8919062001631565b60195560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe36790620005049088906004016200164b565b60206040518083038186803b1580156200051d57600080fd5b505af415801562000532573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000558919062001631565b601a5560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe36790620005949087906004016200164b565b60206040518083038186803b158015620005ad57600080fd5b505af4158015620005c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005e8919062001631565b601b5560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe36790620006249086906004016200164b565b60206040518083038186803b1580156200063d57600080fd5b505af415801562000652573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000678919062001631565b601c5560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe36790620006b49085906004016200164b565b60206040518083038186803b158015620006cd57600080fd5b505af4158015620006e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000708919062001631565b601d5584516004908690600090620007245762000724620016f8565b602090810291909101015260015b600d8110156200077457610640868281518110620007545762000754620016f8565b6020908102919091010152806200076b81620016ce565b91505062000732565b5061016885600d815181106200078e576200078e620016f8565b60200260200101818152505060f085600e81518110620007b257620007b2620016f8565b602002602001018181525050609685600f81518110620007d657620007d6620016f8565b602002602001018181525050600181600081518110620007fa57620007fa620016f8565b602090810291909101015260015b815181101562000849576003828281518110620008295762000829620016f8565b6020908102919091010152806200084081620016ce565b91505062000808565b506112c084600081518110620008635762000863620016f8565b602002602001018181525050610fa084600181518110620008885762000888620016f8565b602002602001018181525050610c8084600281518110620008ad57620008ad620016f8565b60200260200101818152505061096084600381518110620008d257620008d2620016f8565b60200260200101818152505061064084600481518110620008f757620008f7620016f8565b602002602001018181525050610640846005815181106200091c576200091c620016f8565b6020026020010181815250506104b084600681518110620009415762000941620016f8565b60200260200101818152505061022a84600781518110620009665762000966620016f8565b602002602001018181525050610190846008815181106200098b576200098b620016f8565b60200260200101818152505060c884600981518110620009af57620009af620016f8565b602002602001018181525050614df283600081518110620009d457620009d4620016f8565b602002602001018181525050601083600181518110620009f857620009f8620016f8565b602002602001018181525050600f8360028151811062000a1c5762000a1c620016f8565b602002602001018181525050600f8360038151811062000a405762000a40620016f8565b602002602001018181525050614b868260008151811062000a655762000a65620016f8565b60200260200101818152505060c88260018151811062000a895762000a89620016f8565b60200260200101818152505060c88260028151811062000aad5762000aad620016f8565b60200260200101818152505060648260038151811062000ad15762000ad1620016f8565b60200260200101818152505060648260048151811062000af55762000af5620016f8565b602002602001018181525050600a8260058151811062000b195762000b19620016f8565b602002602001018181525050600a8260068151811062000b3d5762000b3d620016f8565b602090810291909101015260405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe3679062000b819088906004016200164b565b60206040518083038186803b15801562000b9a57600080fd5b505af415801562000baf573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bd5919062001631565b601e5560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe3679062000c119088906004016200164b565b60206040518083038186803b15801562000c2a57600080fd5b505af415801562000c3f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c65919062001631565b601f5560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe3679062000ca19088906004016200164b565b60206040518083038186803b15801562000cba57600080fd5b505af415801562000ccf573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cf5919062001631565b60205560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe3679062000d319088906004016200164b565b60206040518083038186803b15801562000d4a57600080fd5b505af415801562000d5f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d85919062001631565b60215560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe3679062000dc19087906004016200164b565b60206040518083038186803b15801562000dda57600080fd5b505af415801562000def573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e15919062001631565b60225560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe3679062000e519086906004016200164b565b60206040518083038186803b15801562000e6a57600080fd5b505af415801562000e7f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ea5919062001631565b60235560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe3679062000ee19085906004016200164b565b60206040518083038186803b15801562000efa57600080fd5b505af415801562000f0f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f35919062001631565b60245560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe3679062000f719084906004016200164b565b60206040518083038186803b15801562000f8a57600080fd5b505af415801562000f9f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000fc5919062001631565b60255560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe36790620010019088906004016200164b565b60206040518083038186803b1580156200101a57600080fd5b505af41580156200102f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001055919062001631565b60265560405163036fe36760e01b815273cb2dc9e2f1a1522f9205232f15f680c476ca99209063036fe36790620010919087906004016200164b565b60206040518083038186803b158015620010aa57600080fd5b505af4158015620010bf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010e5919062001631565b6027556040805160e0810182526512195b1b595d60d21b815263426f647960e01b6020820152634661636560e01b918101919091526341726d7360e01b606082015265456e67696e6560d01b6080820152635479706560e01b60a0820152684163636573736f727960b81b60c082015262001165906028906007620015ad565b506040805161020081018252684d585820546f72766160b81b8152664d30312041766160c81b60208201526e4d303220536861646f77204b696e6760881b91810191909152664d303320456e6960c81b60608201526c4d303420556c74726120372e3160981b60808201526826981a902a34ba30b760b91b60a0820152704d303620536f6c6172205068616e746f6d60781b60c08201526b134c0dc810de58995c9ad85d60a21b60e0820152684d3038205a6967677960b81b6101008201526926981c902130b5b5b2b760b11b6101208201526a4d31302053757061696b7560a81b610140820152664d3131204e656f60c81b61016082015269269899102632b0b837b960b11b6101808201526a26989990253ab834ba32b960a91b6101a08201526a4d3134204d65726375727960a81b6101c08201526b4d3135204d6f72706865757360a01b6101e0820152620012c1602f826010620015dd565b50620012d16030826010620015dd565b50620012e16032826010620015dd565b50620012f16031826010620015dd565b50604080516101a081018252634c6f766560e01b8152634669726560e01b602082015268537461727368696e6560b81b91810191909152634c756e6160e01b606082015266536f6c6172697360c81b608082015266111a585b5bdb9960ca1b60a082015264088cac2e8d60db1b60c0820152684c696768746e696e6760b81b60e0820152675661726961626c6560c01b610100820152664861726d6f6e7960c81b6101208201526422b93937b960d91b6101408201526914dbdb1a590811dbdb1960b21b61016082015267446976696e69747960c01b610180820152620013dd90603390600d620015dd565b506040805160808101825266436c617373696360c81b81526508ed8d2e8c6d60d31b60208201526311dbdb1960e21b918101919091526211dbd960ea1b60608201526200142f906034906004620015dd565b506040805160e081018252634e6f6e6560e01b8152632137b6b160e11b6020820152684578696f732047656d60b81b91810191909152695475657261204265616d60b01b60608201526d23b0b630b1ba34b1902b34b9b7b960911b60808201526242423160e81b60a08201526a4861636b6572204d6f646560a81b60c0820152620014bf906035906007620015dd565b5050505050505062001724565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200152c9062001691565b90600052602060002090601f0160209004810192826200155057600085556200159b565b82601f106200156b57805160ff19168380011785556200159b565b828001600101855582156200159b579182015b828111156200159b5782518255916020019190600101906200157e565b50620015a99291506200161a565b5090565b82600781019282156200159b57916020028201828111156200159b5782518255916020019190600101906200157e565b8280548282559060005260206000209081019282156200159b57916020028201828111156200159b5782518255916020019190600101906200157e565b5b80821115620015a957600081556001016200161b565b6000602082840312156200164457600080fd5b5051919050565b6020808252825182820181905260009190848201906040850190845b81811015620016855783518352928401929184019160010162001667565b50909695505050505050565b600181811c90821680620016a657607f821691505b60208210811415620016c857634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415620016f157634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c615fdb6200175e6000396000818161261e0152614458015260008181612e6601526144290152615fdb6000f3fe6080604052600436106103595760003560e01c80637564dd8f116101bd578063a95e5ddf116100f8578063d4a1515a1161009b578063d4a1515a146109ea578063d96a094a14610a0a578063dbdff2c114610a1d578063e3684e3914610a32578063e36b0b3714610a52578063e985e9c514610a67578063f2fde38b14610a87578063f309455a14610aa7578063f9086c3c14610abd57600080fd5b8063a95e5ddf1461090a578063ada544c51461091f578063b0ea180214610935578063b26c128b14610955578063b66a0e5d14610975578063b88d4fde1461098a578063beeeb228146109aa578063c87b56dd146109ca57600080fd5b80638c3301a9116101605780638c3301a9146108365780638da5cb5b1461084b57806394985ddd1461086057806395d89b411461088057806396bc59c71461089557806396f0fe8e146108b55780639aa362d0146108ca578063a22cb465146108ea57600080fd5b80637564dd8f146107155780637abd00b1146107355780637abf8786146107665780637ef6f656146107945780638462151c146107b4578063865dfcd9146107e1578063891f42b8146108015780638ba4cc3c1461081657600080fd5b806342842e0e116102985780635c472bc71161023b5780635c472bc71461063e5780635e1b93a3146106535780636113f9e4146106295780636352211e1461067357806368f1ea141461069357806369d81781146106a95780636d1f7e30146106cb57806370a08231146106e0578063715018a61461070057600080fd5b806342842e0e14610567578063454836ad1461058757806349df728c1461059c5780634f6ccce7146105bc57806355e7d642146105dc57806355f804b3146105ef578063564566a81461060f578063565d77041461062957600080fd5b806323b872dd1161030057806323b872dd1461047d578063289a35301461049d5780632f461383146104bd5780632f745c59146104dd578063362f24c0146104fd57806339bec9881461051d5780633ccfd60b146105325780633f5b52781461054757600080fd5b806301ffc9a71461035e578063031bd4c414610393578063052b3d77146103b757806306fdde03146103d7578063081812fc146103f9578063095ea7b31461042657806311f3653f1461044857806318160ddd14610468575b600080fd5b34801561036a57600080fd5b5061037e610379366004615865565b610ad2565b60405190151581526020015b60405180910390f35b34801561039f57600080fd5b506103a9614e2081565b60405190815260200161038a565b3480156103c357600080fd5b506103a96103d2366004615843565b610afd565b3480156103e357600080fd5b506103ec610b2e565b60405161038a9190615b24565b34801561040557600080fd5b506104196104143660046158e7565b610bc0565b60405161038a9190615996565b34801561043257600080fd5b506104466104413660046155ef565b610c4d565b005b34801561045457600080fd5b5061037e610463366004615673565b610d5e565b34801561047457600080fd5b506008546103a9565b34801561048957600080fd5b50610446610498366004615501565b610d84565b3480156104a957600080fd5b506104466104b836600461561b565b610db5565b3480156104c957600080fd5b506103a96104d8366004615673565b6112af565b3480156104e957600080fd5b506103a96104f83660046155ef565b61133c565b34801561050957600080fd5b506103a9610518366004615673565b6113d2565b34801561052957600080fd5b506103a9600281565b34801561053e57600080fd5b5061044661146c565b34801561055357600080fd5b506103a96105623660046158e7565b611554565b34801561057357600080fd5b50610446610582366004615501565b611600565b34801561059357600080fd5b506103a9600781565b3480156105a857600080fd5b506104466105b73660046154ab565b61161b565b3480156105c857600080fd5b506103a96105d73660046158e7565b611828565b6104466105ea36600461573e565b6118bb565b3480156105fb57600080fd5b5061044661060a36600461589f565b612067565b34801561061b57600080fd5b5060365461037e9060ff1681565b34801561063557600080fd5b506103a9600681565b34801561064a57600080fd5b506103a9600381565b34801561065f57600080fd5b506103a961066e366004615843565b6120a9565b34801561067f57600080fd5b5061041961068e3660046158e7565b6121a4565b34801561069f57600080fd5b506103a960255481565b3480156106b557600080fd5b506106be61221b565b60405161038a9190615a30565b3480156106d757600080fd5b506103a9600581565b3480156106ec57600080fd5b506103a96106fb3660046154ab565b612347565b34801561070c57600080fd5b506104466123ce565b34801561072157600080fd5b506103a96107303660046158e7565b612409565b34801561074157600080fd5b506107556107503660046158e7565b612420565b60405161038a959493929190615aed565b34801561077257600080fd5b5061037e6107813660046158e7565b6000908152600d60205260409020541590565b3480156107a057600080fd5b506104466107af3660046154c8565b61244b565b3480156107c057600080fd5b506107d46107cf3660046154ab565b6124a8565b60405161038a9190615a92565b3480156107ed57600080fd5b506103a96107fc366004615843565b612549565b34801561080d57600080fd5b506103a9601081565b34801561082257600080fd5b506104466108313660046155ef565b612568565b34801561084257600080fd5b506103a9600481565b34801561085757600080fd5b50610419612604565b34801561086c57600080fd5b5061044661087b366004615843565b612613565b34801561088c57600080fd5b506103ec612691565b3480156108a157600080fd5b506103a96108b0366004615673565b6126a0565b3480156108c157600080fd5b506103a9600081565b3480156108d657600080fd5b506103a96108e53660046157a1565b6126c5565b3480156108f657600080fd5b506104466109053660046155c1565b61284b565b34801561091657600080fd5b506103a9600181565b34801561092b57600080fd5b506103a9600f5481565b34801561094157600080fd5b506104466109503660046155ef565b61290c565b34801561096157600080fd5b5061037e61097036600461573e565b6129c7565b34801561098157600080fd5b50610446612a88565b34801561099657600080fd5b506104466109a5366004615542565b612ac6565b3480156109b657600080fd5b5061037e6109c5366004615673565b612afe565b3480156109d657600080fd5b506103ec6109e53660046158e7565b612b11565b3480156109f657600080fd5b50610446610a053660046155ef565b612bdb565b610446610a183660046158e7565b612ca3565b348015610a2957600080fd5b506103a9612e5f565b348015610a3e57600080fd5b506103ec610a4d3660046158e7565b612f75565b348015610a5e57600080fd5b5061044661341e565b348015610a7357600080fd5b5061037e610a823660046154c8565b613459565b348015610a9357600080fd5b50610446610aa23660046154ab565b613487565b348015610ab357600080fd5b506103a960375481565b348015610ac957600080fd5b506106be613527565b60006001600160e01b0319821663780e9d6360e01b1480610af75750610af782613653565b92915050565b600e6020528160005260406000208181548110610b1957600080fd5b90600052602060002001600091509150505481565b606060008054610b3d90615e5a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6990615e5a565b8015610bb65780601f10610b8b57610100808354040283529160200191610bb6565b820191906000526020600020905b815481529060010190602001808311610b9957829003601f168201915b5050505050905090565b6000610bcb826136a3565b610c315760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c58826121a4565b9050806001600160a01b0316836001600160a01b03161415610cc65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610c28565b336001600160a01b0382161480610ce25750610ce28133613459565b610d4f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610c28565b610d5983836136c0565b505050565b60008082600581518110610d7457610d74615f00565b6020026020010151119050919050565b610d8e338261372e565b610daa5760405162461bcd60e51b8152600401610c2890615be6565b610d598383836137f8565b33610dbe612604565b6001600160a01b031614610de45760405162461bcd60e51b8152600401610c2890615bb1565b81600c6000610df2846112af565b8152602001908152602001600020819055506000610e0f826113d2565b90506000610e4983825b604051908082528060200260200182016040528015610e42578160200160208202803683370190505b50846126c5565b90506000610e5682611554565b9050610e6785858560008587613991565b610e7084610d5e565b156110865773cb2dc9e2f1a1522f9205232f15f680c476ca9920631fcd6ae2601e6005015486600581518110610ea857610ea8615f00565b602002602001015160016040518463ffffffff1660e01b8152600401610ed093929190615c75565b60206040518083038186803b158015610ee857600080fd5b505af4158015610efc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f20919061582a565b601e6005015573cb2dc9e2f1a1522f9205232f15f680c476ca992063b59cd4d760176005015486600581518110610f5957610f59615f00565b602002602001015160016040518463ffffffff1660e01b8152600401610f8193929190615c75565b60206040518083038186803b158015610f9957600080fd5b505af4158015610fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd1919061582a565b601c55602554845173cb2dc9e2f1a1522f9205232f15f680c476ca992091631fcd6ae291879060009061100657611006615f00565b602002602001015160016040518463ffffffff1660e01b815260040161102e93929190615c75565b60206040518083038186803b15801561104657600080fd5b505af415801561105a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107e919061582a565b602555611263565b60005b84518110156112405773cb2dc9e2f1a1522f9205232f15f680c476ca9920631fcd6ae2601e83600781106110bf576110bf615f00565b01548784815181106110d3576110d3615f00565b602002602001015160016040518463ffffffff1660e01b81526004016110fb93929190615c75565b60206040518083038186803b15801561111357600080fd5b505af4158015611127573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114b919061582a565b601e826007811061115e5761115e615f00565b015573cb2dc9e2f1a1522f9205232f15f680c476ca992063b59cd4d76017836007811061118d5761118d615f00565b01548784815181106111a1576111a1615f00565b602002602001015160016040518463ffffffff1660e01b81526004016111c993929190615c75565b60206040518083038186803b1580156111e157600080fd5b505af41580156111f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611219919061582a565b6017826007811061122c5761122c615f00565b01558061123881615e8f565b915050611089565b506000858152600e60209081526040822080546001810182559083529120018590555b61126d8686613aba565b856001600160a01b0316600080516020615f668339815191528686866000868860405161129f96959493929190615c37565b60405180910390a2505050505050565b60405163c91286fd60e01b815260009073cb2dc9e2f1a1522f9205232f15f680c476ca99209063c91286fd906112ec908590600690600401615aa5565b60206040518083038186803b15801561130457600080fd5b505af4158015611318573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af7919061582a565b600061134783612347565b82106113a95760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c28565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6000805b6004811015611466576000805b6004811015611446578481815181106113fe576113fe615f00565b602002602001015185848151811061141857611418615f00565b60200260200101511415611434578161143081615e8f565b9250505b8061143e81615e8f565b9150506113e3565b5082811115611453578092505b508061145e81615e8f565b9150506113d6565b50919050565b603b546001600160a01b031633148061148f5750603a546001600160a01b031633145b806114b2575061149d612604565b6001600160a01b0316336001600160a01b0316145b6114ce5760405162461bcd60e51b8152600401610c2890615b89565b60006114db600247615cf6565b603b546040519192506001600160a01b03169082156108fc029083906000818181858888f19350505050158015611516573d6000803e3d6000fd5b50603a546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611550573d6000803e3d6000fd5b5050565b600061012c82101561156857506001919050565b6101f482101561157a57506002919050565b61032082101561158c57506003919050565b6103e882101561159e57506004919050565b6104b08210156115b057506005919050565b6105788210156115c257506006919050565b6106408210156115d457506007919050565b6107088210156115e657506008919050565b6107d08210156115f857506009919050565b50600a919050565b610d5983838360405180602001604052806000815250612ac6565b6001600160a01b03811661162e57600080fd5b603b546001600160a01b03163314806116515750603a546001600160a01b031633145b80611674575061165f612604565b6001600160a01b0316336001600160a01b0316145b6116905760405162461bcd60e51b8152600401610c2890615b89565b60006002826001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016116c09190615996565b60206040518083038186803b1580156116d857600080fd5b505afa1580156116ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611710919061582a565b61171a9190615cf6565b603b5460405163a9059cbb60e01b81529192506001600160a01b038085169263a9059cbb9261174f92169085906004016159aa565b602060405180830381600087803b15801561176957600080fd5b505af115801561177d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a1919061580d565b50603a5460405163a9059cbb60e01b81526001600160a01b038481169263a9059cbb926117d6929091169085906004016159aa565b602060405180830381600087803b1580156117f057600080fd5b505af1158015611804573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d59919061580d565b600061183360085490565b82106118965760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c28565b600882815481106118a9576118a9615f00565b90600052602060002001549050919050565b60078251146118ff5760405162461bcd60e51b815260206004820152601060248201526f4d616c666f726d65642074726169747360801b6044820152606401610c28565b60068151106119505760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f7420636f6d62696e65206d6f7265207468616e203520626f7473006044820152606401610c28565b61195a82826129c7565b61199b5760405162461bcd60e51b8152602060048201526012602482015271547261697473206e6f7420696e20626f747360701b6044820152606401610c28565b6040805160078082526101008201909252606091600091906020820160e08036833701905050600f546000818152600e602090815260408220805460018101825590835290822001919091559091508080805b8651811015611d1157611a19878281518110611a0c57611a0c615f00565b60200260200101516136a3565b611a625760405162461bcd60e51b815260206004820152601a60248201527914d95b1958dd195908189bdd08191bd95cdb89dd08195e1a5cdd60321b6044820152606401610c28565b611a84878281518110611a7757611a77615f00565b6020026020010151612420565b50835193995090955093508791600591508110611aa357611aa3615f00565b6020026020010151600014611afa5760405162461bcd60e51b815260206004820152601f60248201527f5370656369616c20626f74732063616e6e6f7420626520636f6d62696e6564006044820152606401610c28565b83831115611b06578293505b60005b600e6000898481518110611b1f57611b1f615f00565b6020026020010151815260200190815260200160002080549050811015611bc357600e6000600f548152602001908152602001600020600e60008a8581518110611b6b57611b6b615f00565b602002602001015181526020019081526020016000208281548110611b9257611b92615f00565b6000918252602080832090910154835460018101855593835291209091015580611bbb81615e8f565b915050611b09565b5060005b6007811015611cbd5773cb2dc9e2f1a1522f9205232f15f680c476ca992063b59cd4d7878381518110611bfc57611bfc615f00565b6020026020010151898481518110611c1657611c16615f00565b602002602001015160016040518463ffffffff1660e01b8152600401611c3e93929190615c75565b60206040518083038186803b158015611c5657600080fd5b505af4158015611c6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8e919061582a565b868281518110611ca057611ca0615f00565b602090810291909101015280611cb581615e8f565b915050611bc7565b50600c6000611ccb886112af565b815260200190815260200160002060009055611cff878281518110611cf257611cf2615f00565b6020026020010151613ad4565b80611d0981615e8f565b9150506119ee565b506000611d1f846001615cde565b9050611d2a88612afe565b15611d6e5760405162461bcd60e51b8152602060048201526014602482015273151c985a5d1cc8185b1c9958591e48195e1a5cdd60621b6044820152606401610c28565b60048110611dbe5760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f7420636f6d62696e65206d6f7265207468616e20332074696d65736044820152606401610c28565b60006001821115611e64578160021415611de2575068056bc75e2d63100000611e02565b8160031415611e0257611dff68056bc75e2d631000006002615df8565b90505b80341015611e645760405162461bcd60e51b815260206004820152602960248201527f45746865722076616c75652073656e742069732062656c6f772074686520636f6044820152686d62696e652066656560b81b6064820152608401610c28565b611e7033600f54613aba565b600f54600c6000611e808c6112af565b8152602001908152602001600020819055506000611e9d8a6113d2565b90506000611eac8b8b846126c5565b90506000611eb982611554565b9050611ecb600f548d85888587613991565b60005b60078110156120085773cb2dc9e2f1a1522f9205232f15f680c476ca9920631fcd6ae28b8381518110611f0357611f03615f00565b60200260200101518f8481518110611f1d57611f1d615f00565b602002602001015160016040518463ffffffff1660e01b8152600401611f4593929190615c75565b60206040518083038186803b158015611f5d57600080fd5b505af4158015611f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f95919061582a565b8a8281518110611fa757611fa7615f00565b602002602001018181525050898181518110611fc557611fc5615f00565b602002602001015160178260078110611fe057611fe0615f00565b016000828254611ff09190615e17565b9091555081905061200081615e8f565b915050611ece565b50336001600160a01b0316600080516020615f66833981519152600f548e8689868860405161203c96959493929190615c37565b60405180910390a2600f805490600061205483615e8f565b9190505550505050505050505050505050565b33612070612604565b6001600160a01b0316146120965760405162461bcd60e51b8152600401610c2890615bb1565b80516115509060399060208401906152ef565b60008215806120b85750600283145b806120c35750600383145b806120ce5750600183145b1561210b57816120e1575061012c610af7565b600d8210156120f257506028610af7565b600f82101561210357506050610af7565b506096610af7565b60048314156121515761211f826006615df8565b61212a600284615d4d565b612135906004615df8565b61213f9190615cde565b61214a90600a615cde565b9050610af7565b600683141561219b578161216757506000610af7565b600382101561217857506064610af7565b6005821015612189575060c8610af7565b600782101561219b5750610190610af7565b50600092915050565b6000818152600260205260408120546001600160a01b031680610af75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610c28565b604080516007808252610100820190925260609160009190816020015b606081526020019060019003908161223857905050905060005b60078110156114665773cb2dc9e2f1a1522f9205232f15f680c476ca9920638d4c873a601e836007811061228857612288615f00565b01546010846007811061229d5761229d615f00565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b1580156122db57600080fd5b505af41580156122ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261231791908101906156a7565b82828151811061232957612329615f00565b6020026020010181905250808061233f90615e8f565b915050612252565b60006001600160a01b0382166123b25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610c28565b506001600160a01b031660009081526003602052604090205490565b336123d7612604565b6001600160a01b0316146123fd5760405162461bcd60e51b8152600401610c2890615bb1565b6124076000613b69565b565b6028816007811061241957600080fd5b0154905081565b606060008060008061243961243487613bbb565b613c59565b939a9299509097509550909350915050565b33612454612604565b6001600160a01b03161461247a5760405162461bcd60e51b8152600401610c2890615bb1565b603a80546001600160a01b039384166001600160a01b031991821617909155603b8054929093169116179055565b606060006124b583612347565b90506000816001600160401b038111156124d1576124d1615f16565b6040519080825280602002602001820160405280156124fa578160200160208202803683370190505b50905060005b8281101561254157612512858261133c565b82828151811061252457612524615f00565b60209081029190910101528061253981615e8f565b915050612500565b509392505050565b602f826007811061255957600080fd5b018181548110610b1957600080fd5b33612571612604565b6001600160a01b0316146125975760405162461bcd60e51b8152600401610c2890615bb1565b6037546000906125ab6101f4612710615cde565b6125b59190615cde565b905060005b828110156125e7576125d5846125d08385615cde565b613da7565b806125df81615e8f565b9150506125ba565b5081603760008282546125fa9190615cde565b9091555050505050565b600b546001600160a01b031690565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461268b5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610c28565b60385550565b606060018054610b3d90615e5a565b6000600c60006126af846112af565b8152602001908152602001600020549050919050565b6000836005815181106126da576126da615f00565b6020026020010151600114156126f35750610578612844565b8360058151811061270657612706615f00565b60200260200101516002141561271f5750610640612844565b8360058151811061273257612732615f00565b60200260200101516003141561274b5750610708612844565b612753615373565b60005b84518110156127b35761278185828151811061277457612774615f00565b6020026020010151613bbb565b915060048261014001516127959190615cf6565b61279f9084615cde565b9250806127ab81615e8f565b915050612756565b5060005b8551811015612801576127e3818783815181106127d6576127d6615f00565b60200260200101516120a9565b6127ed9084615cde565b9250806127f981615e8f565b9150506127b7565b50600183116128105781612840565b600a61281d600285615e17565b61282890600a615cde565b612836906001901b84615df8565b6128409190615cf6565b9150505b9392505050565b6001600160a01b0382163314156128a05760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610c28565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b603b546001600160a01b031633148061292f5750603a546001600160a01b031633145b80612952575061293d612604565b6001600160a01b0316336001600160a01b0316145b61296e5760405162461bcd60e51b8152600401610c2890615b89565b6000818152600d6020526040902054156129bd5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081d1bdad95b881a5960821b6044820152606401610c28565b6115508282613da7565b6000606060005b8451811015612a7d576000805b8551811015612a58576129f9868281518110611a7757611a77615f00565b50508951929650899286925082109050612a1557612a15615f00565b6020026020010151848481518110612a2f57612a2f615f00565b60200260200101511415612a465760019150612a58565b80612a5081615e8f565b9150506129db565b5080612a6a5760009350505050610af7565b5080612a7581615e8f565b9150506129ce565b506001949350505050565b33612a91612604565b6001600160a01b031614612ab75760405162461bcd60e51b8152600401610c2890615bb1565b6036805460ff19166001179055565b612ad0338361372e565b612aec5760405162461bcd60e51b8152600401610c2890615be6565b612af8848484846142e6565b50505050565b6000612b09826126a0565b151592915050565b6060612b1c826136a3565b612b805760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c28565b6000612b8a614319565b90506000815111612baa5760405180602001604052806000815250612844565b80612bb484614328565b604051602001612bc5929190615967565b6040516020818303038152906040529392505050565b603b546001600160a01b0316331480612bfe5750603a546001600160a01b031633145b80612c215750612c0c612604565b6001600160a01b0316336001600160a01b0316145b612c3d5760405162461bcd60e51b8152600401610c2890615b89565b60006127105b612c516101f4612710615cde565b811015612af8576000818152600d6020526040902054612c8357612c758482613da7565b81612c7f81615e8f565b9250505b82821415612c915750505050565b80612c9b81615e8f565b915050612c43565b603754600090612cb76101f4612710615cde565b612cc19190615cde565b60365490915060ff16612d0b5760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610c28565b614e20612d188383615cde565b10612d5c5760405162461bcd60e51b8152602060048201526014602482015273115e18d959591959080c8c0c0c0c081b1a5b5a5d60621b6044820152606401610c28565b600b8210612daa5760405162461bcd60e51b815260206004820152601b60248201527a596f752063616e20627579206d6178696d756d20313020626f747360281b6044820152606401610c28565b612dbd8268056bc75e2d63100000615df8565b341015612e185760405162461bcd60e51b815260206004820152602360248201527f45746865722076616c75652073656e742069732062656c6f772074686520707260448201526269636560e81b6064820152608401610c28565b60005b82811015612e4357612e31336125d08385615cde565b80612e3b81615e8f565b915050612e1b565b508160376000828254612e569190615cde565b90915550505050565b6000603f547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401612eb09190615996565b60206040518083038186803b158015612ec857600080fd5b505afa158015612edc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f00919061582a565b1015612f625760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060448201526a1dda5d1a0819985d58d95d60aa1b6064820152608401610c28565b612f70603e54603f54614425565b905090565b6060612f80826136a3565b612fa25750506040805180820190915260028152617b7d60f01b602082015290565b506040805180820190915260018152607b60f81b6020820152600080808080612fca87612420565b9450945094509450945060005b855181101561311057801561300d5761300a8760405180604001604052806002815260200161016160f51b8152506145b0565b96505b61303087604051806040016040528060018152602001601160f91b8152506145b0565b9650613058876130536028846007811061304c5761304c615f00565b01546145dc565b6145b0565b96506130808760405180604001604052806004815260200163111d101160e11b8152506145b0565b96506130d787613053602f846007811061309c5761309c615f00565b018985815181106130af576130af615f00565b6020026020010151815481106130c7576130c7615f00565b90600052602060002001546145dc565b96506130fc87604051806040016040528060018152602001601160f91b8152506145b0565b96508061310881615e8f565b915050612fd7565b506131358660405180604001604052806002815260200161016160f51b8152506145b0565b60408051600480825260a0820190925291975060009190816020015b606081526020019060019003908161315157905050905060405180604001604052806008815260200167119d5b1b0814d95d60c21b8152508160008151811061319c5761319c615f00565b60200260200101819052506040518060400160405280600881526020016710dbdb589a5b995960c21b815250816001815181106131db576131db615f00565b60200260200101819052506040518060400160405280600b81526020016a506f77657220436c61737360a81b8152508160028151811061321d5761321d615f00565b6020026020010181905250604051806040016040528060058152602001642837bbb2b960d91b8152508160038151811061325957613259615f00565b602090810291909101015260408051600480825260a08201909252600091816020016020820280368337019050509050858160008151811061329d5761329d615f00565b60200260200101818152505084816001815181106132bd576132bd615f00565b60200260200101818152505083816002815181106132dd576132dd615f00565b60200260200101818152505082816003815181106132fd576132fd615f00565b60200260200101818152505060005b82518110156133ed5780156133425761333f8960405180604001604052806002815260200161016160f51b8152506145b0565b98505b61336589604051806040016040528060018152602001601160f91b8152506145b0565b985061338a8984838151811061337d5761337d615f00565b60200260200101516145b0565b98506133b189604051806040016040528060038152602001620111d160ed1b8152506145b0565b98506133d9896130538484815181106133cc576133cc615f00565b6020026020010151614328565b9850806133e581615e8f565b91505061330c565b5061341188604051806040016040528060018152602001607d60f81b8152506145b0565b9998505050505050505050565b33613427612604565b6001600160a01b03161461344d5760405162461bcd60e51b8152600401610c2890615bb1565b6036805460ff19169055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b33613490612604565b6001600160a01b0316146134b65760405162461bcd60e51b8152600401610c2890615bb1565b6001600160a01b03811661351b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c28565b61352481613b69565b50565b604080516007808252610100820190925260609160009190816020015b606081526020019060019003908161354457905050905060005b60078110156114665773cb2dc9e2f1a1522f9205232f15f680c476ca9920638d4c873a6017836007811061359457613594615f00565b0154601084600781106135a9576135a9615f00565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b1580156135e757600080fd5b505af41580156135fb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261362391908101906156a7565b82828151811061363557613635615f00565b6020026020010181905250808061364b90615e8f565b91505061355e565b60006001600160e01b031982166380ac58cd60e01b148061368457506001600160e01b03198216635b5e139f60e01b145b80610af757506301ffc9a760e01b6001600160e01b0319831614610af7565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906136f5826121a4565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000613739826136a3565b61379a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c28565b60006137a5836121a4565b9050806001600160a01b0316846001600160a01b031614806137e05750836001600160a01b03166137d584610bc0565b6001600160a01b0316145b806137f057506137f08185613459565b949350505050565b826001600160a01b031661380b826121a4565b6001600160a01b0316146138735760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610c28565b6001600160a01b0382166138d55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c28565b6138e08383836146f6565b6138eb6000826136c0565b6001600160a01b0383166000908152600360205260408120805460019290613914908490615e17565b90915550506001600160a01b0382166000908152600360205260408120805460019290613942908490615cde565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b038681169182179092559151849391871691600080516020615f8683398151915291a4505050565b6000856000815181106139a6576139a6615f00565b602002602001015190506008866001815181106139c5576139c5615f00565b6020026020010151901b811790506010866002815181106139e8576139e8615f00565b6020026020010151901b81179050601886600381518110613a0b57613a0b615f00565b6020026020010151901b81179050602086600481518110613a2e57613a2e615f00565b6020026020010151901b81179050602886600581518110613a5157613a51615f00565b6020026020010151901b81179050603086600681518110613a7457613a74615f00565b6020908102919091018101516000998a52600d90915260409889902060509490941b60489590951b9590981b60389690961b97901b179590951792909217171790915550565b6115508282604051806020016040528060008152506147ae565b6000613adf826121a4565b9050613aed816000846146f6565b613af86000836136c0565b6001600160a01b0381166000908152600360205260408120805460019290613b21908490615e17565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b03841690600080516020615f86833981519152908390a45050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b613bc3615373565b6000918252600d60209081526040928390205460ff8082168452600882901c811684840152601082901c811684860152601882901c811660608501529181901c82166080840152602881901c821660a0840152603081901c821660c0840152603881901c821660e08401529283901c8116610100830152604883901c1661012082015260509190911c61ffff1661014082015290565b60408051600780825261010082019092526060916000918291829182916020820160e080368337019050509450856000015185600081518110613c9e57613c9e615f00565b602002602001018181525050856020015185600181518110613cc257613cc2615f00565b602002602001018181525050856040015185600281518110613ce657613ce6615f00565b602002602001018181525050856060015185600381518110613d0a57613d0a615f00565b602002602001018181525050856080015185600481518110613d2e57613d2e615f00565b6020026020010181815250508560a0015185600581518110613d5257613d52615f00565b6020026020010181815250508560c0015185600681518110613d7657613d76615f00565b60209081029190910101525050505060e0820151610100830151610120840151610140909401519294919390929091565b613daf612e5f565b506038546000613dbe826147e1565b9050613dc981612afe565b15613e465760005b613ddb8382614bd5565b9150613de8600182615cde565b905060058110613e375760405162461bcd60e51b815260206004820152601a60248201527914995c9bdb1b1959081d1c985a5d1cc8189d5d0819985a5b195960321b6044820152606401610c28565b613e4082612afe565b613dd157505b82600c6000613e54846112af565b8152602001908152602001600020819055506000613e71826113d2565b90506000613e7f8382610e19565b90506000613e8c82611554565b9050613e9d86858560008587613991565b613ea684610d5e565b156140bc5773cb2dc9e2f1a1522f9205232f15f680c476ca9920631fcd6ae2601e6005015486600581518110613ede57613ede615f00565b602002602001015160016040518463ffffffff1660e01b8152600401613f0693929190615c75565b60206040518083038186803b158015613f1e57600080fd5b505af4158015613f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f56919061582a565b601e6005015573cb2dc9e2f1a1522f9205232f15f680c476ca992063b59cd4d760176005015486600581518110613f8f57613f8f615f00565b602002602001015160016040518463ffffffff1660e01b8152600401613fb793929190615c75565b60206040518083038186803b158015613fcf57600080fd5b505af4158015613fe3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614007919061582a565b601c55602554845173cb2dc9e2f1a1522f9205232f15f680c476ca992091631fcd6ae291879060009061403c5761403c615f00565b602002602001015160016040518463ffffffff1660e01b815260040161406493929190615c75565b60206040518083038186803b15801561407c57600080fd5b505af4158015614090573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140b4919061582a565b602555614299565b60005b84518110156142765773cb2dc9e2f1a1522f9205232f15f680c476ca9920631fcd6ae2601e83600781106140f5576140f5615f00565b015487848151811061410957614109615f00565b602002602001015160016040518463ffffffff1660e01b815260040161413193929190615c75565b60206040518083038186803b15801561414957600080fd5b505af415801561415d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614181919061582a565b601e826007811061419457614194615f00565b015573cb2dc9e2f1a1522f9205232f15f680c476ca992063b59cd4d7601783600781106141c3576141c3615f00565b01548784815181106141d7576141d7615f00565b602002602001015160016040518463ffffffff1660e01b81526004016141ff93929190615c75565b60206040518083038186803b15801561421757600080fd5b505af415801561422b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061424f919061582a565b6017826007811061426257614262615f00565b01558061426e81615e8f565b9150506140bf565b506000868152600e60209081526040822080546001810182559083529120018690555b6142a38787613aba565b866001600160a01b0316600080516020615f66833981519152878686600086886040516142d596959493929190615c37565b60405180910390a250505050505050565b6142f18484846137f8565b6142fd84848484614f30565b612af85760405162461bcd60e51b8152600401610c2890615b37565b606060398054610b3d90615e5a565b60608161434c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115614376578061436081615e8f565b915061436f9050600a83615cf6565b9150614350565b6000816001600160401b0381111561439057614390615f16565b6040519080825280601f01601f1916602001820160405280156143ba576020820181803683370190505b5090505b84156137f0576143cf600183615e17565b91506143dc600a86615eaa565b6143e7906030615cde565b60f81b8183815181106143fc576143fc615f00565b60200101906001600160f81b031916908160001a90535061441e600a86615cf6565b94506143be565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001614495929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016144c293929190615a00565b602060405180830381600087803b1580156144dc57600080fd5b505af11580156144f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614514919061580d565b506000838152600a6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052614570906001615cde565b6000858152600a60205260409020556137f08482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b606082826040516020016145c5929190615967565b604051602081830303815290604052905092915050565b606060005b60208110801561460f57508281602081106145fe576145fe615f00565b1a60f81b6001600160f81b03191615155b15614626578061461e81615e8f565b9150506145e1565b6000816001600160401b0381111561464057614640615f16565b6040519080825280601f01601f19166020018201604052801561466a576020820181803683370190505b509050600091505b6020821080156146a0575083826020811061468f5761468f615f00565b1a60f81b6001600160f81b03191615155b15612844578382602081106146b7576146b7615f00565b1a60f81b8183815181106146cd576146cd615f00565b60200101906001600160f81b031916908160001a905350816146ee81615e8f565b925050614672565b6001600160a01b0383166147515761474c81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b614774565b816001600160a01b0316836001600160a01b031614614774576147748382615032565b6001600160a01b03821661478b57610d59816150cf565b826001600160a01b0316826001600160a01b031614610d5957610d59828261517e565b6147b883836151c2565b6147c56000848484614f30565b610d595760405162461bcd60e51b8152600401610c2890615b37565b6040805160078082526101008201909252606091600091906020820160e08036833701905050905060005b60078110156149bf5773cb2dc9e2f1a1522f9205232f15f680c476ca992063b7207e5673cb2dc9e2f1a1522f9205232f15f680c476ca9920638d4c873a601e856007811061485c5761485c615f00565b01546010866007811061487157614871615f00565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b1580156148af57600080fd5b505af41580156148c3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526148eb91908101906156a7565b866148f7856001615cde565b60408051602081019390935282015260600160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b1682526149409291600401615aa5565b60206040518083038186803b15801561495857600080fd5b505af415801561496c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614990919061582a565b8282815181106149a2576149a2615f00565b6020908102919091010152806149b781615e8f565b91505061480c565b506149c981610d5e565b15610af757600073cb2dc9e2f1a1522f9205232f15f680c476ca992063b7207e5673cb2dc9e2f1a1522f9205232f15f680c476ca9920638d4c873a6025546010600060078110614a1b57614a1b615f00565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b158015614a5957600080fd5b505af4158015614a6d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614a9591908101906156a7565b60408051602081018990520160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252614ad89291600401615aa5565b60206040518083038186803b158015614af057600080fd5b505af4158015614b04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b28919061582a565b905060005b6005811015614b665781838281518110614b4957614b49615f00565b602090810291909101015280614b5e81615e8f565b915050614b2d565b5081600581518110614b7a57614b7a615f00565b60200260200101516009614b8e9190615cde565b82600481518110614ba157614ba1615f00565b602002602001018181525050600082600681518110614bc257614bc2615f00565b6020026020010181815250505092915050565b6040805160078082526101008201909252606091600091906020820160e08036833701905050905060005b6004811015614da05773cb2dc9e2f1a1522f9205232f15f680c476ca992063b7207e5673cb2dc9e2f1a1522f9205232f15f680c476ca9920638d4c873a60265460108660078110614c5357614c53615f00565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b158015614c9157600080fd5b505af4158015614ca5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614ccd91908101906156a7565b87614cd88589615df8565b60408051602081019390935282015260600160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252614d219291600401615aa5565b60206040518083038186803b158015614d3957600080fd5b505af4158015614d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d71919061582a565b828281518110614d8357614d83615f00565b602090810291909101015280614d9881615e8f565b915050614c00565b5073cb2dc9e2f1a1522f9205232f15f680c476ca992063b7207e5673cb2dc9e2f1a1522f9205232f15f680c476ca9920638d4c873a6027546010600460078110614dec57614dec615f00565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b158015614e2a57600080fd5b505af4158015614e3e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614e6691908101906156a7565b86614e72600488615df8565b60408051602081019390935282015260600160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252614ebb9291600401615aa5565b60206040518083038186803b158015614ed357600080fd5b505af4158015614ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614f0b919061582a565b81600481518110614f1e57614f1e615f00565b60209081029190910101529392505050565b60006001600160a01b0384163b15612a7d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614f749033908990889088906004016159c3565b602060405180830381600087803b158015614f8e57600080fd5b505af1925050508015614fbe575060408051601f3d908101601f19168201909252614fbb91810190615882565b60015b615018573d808015614fec576040519150601f19603f3d011682016040523d82523d6000602084013e614ff1565b606091505b5080516150105760405162461bcd60e51b8152600401610c2890615b37565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506137f0565b6000600161503f84612347565b6150499190615e17565b60008381526007602052604090205490915080821461509c576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906150e190600190615e17565b6000838152600960205260408120546008805493945090928490811061510957615109615f00565b90600052602060002001549050806008838154811061512a5761512a615f00565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061516257615162615eea565b6001900381819060005260206000200160009055905550505050565b600061518983612347565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166152185760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c28565b615221816136a3565b1561526e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c28565b61527a600083836146f6565b6001600160a01b03821660009081526003602052604081208054600192906152a3908490615cde565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020615f86833981519152908290a45050565b8280546152fb90615e5a565b90600052602060002090601f01602090048101928261531d5760008555615363565b82601f1061533657805160ff1916838001178555615363565b82800160010185558215615363579182015b82811115615363578251825591602001919060010190615348565b5061536f9291506153cd565b5090565b60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b8082111561536f57600081556001016153ce565b60006001600160401b038311156153fb576153fb615f16565b61540e601f8401601f1916602001615c8b565b905082815283838301111561542257600080fd5b828260208301376000602084830101529392505050565b600082601f83011261544a57600080fd5b8135602061545f61545a83615cbb565b615c8b565b80838252828201915082860187848660051b890101111561547f57600080fd5b60005b8581101561549e57813584529284019290840190600101615482565b5090979650505050505050565b6000602082840312156154bd57600080fd5b813561284481615f2c565b600080604083850312156154db57600080fd5b82356154e681615f2c565b915060208301356154f681615f2c565b809150509250929050565b60008060006060848603121561551657600080fd5b833561552181615f2c565b9250602084013561553181615f2c565b929592945050506040919091013590565b6000806000806080858703121561555857600080fd5b843561556381615f2c565b9350602085013561557381615f2c565b92506040850135915060608501356001600160401b0381111561559557600080fd5b8501601f810187136155a657600080fd5b6155b5878235602084016153e2565b91505092959194509250565b600080604083850312156155d457600080fd5b82356155df81615f2c565b915060208301356154f681615f41565b6000806040838503121561560257600080fd5b823561560d81615f2c565b946020939093013593505050565b60008060006060848603121561563057600080fd5b833561563b81615f2c565b92506020840135915060408401356001600160401b0381111561565d57600080fd5b61566986828701615439565b9150509250925092565b60006020828403121561568557600080fd5b81356001600160401b0381111561569b57600080fd5b6137f084828501615439565b600060208083850312156156ba57600080fd5b82516001600160401b038111156156d057600080fd5b8301601f810185136156e157600080fd5b80516156ef61545a82615cbb565b80828252848201915084840188868560051b870101111561570f57600080fd5b600094505b83851015615732578051835260019490940193918501918501615714565b50979650505050505050565b6000806040838503121561575157600080fd5b82356001600160401b038082111561576857600080fd5b61577486838701615439565b9350602085013591508082111561578a57600080fd5b5061579785828601615439565b9150509250929050565b6000806000606084860312156157b657600080fd5b83356001600160401b03808211156157cd57600080fd5b6157d987838801615439565b945060208601359150808211156157ef57600080fd5b506157fc86828701615439565b925050604084013590509250925092565b60006020828403121561581f57600080fd5b815161284481615f41565b60006020828403121561583c57600080fd5b5051919050565b6000806040838503121561585657600080fd5b50508035926020909101359150565b60006020828403121561587757600080fd5b813561284481615f4f565b60006020828403121561589457600080fd5b815161284481615f4f565b6000602082840312156158b157600080fd5b81356001600160401b038111156158c757600080fd5b8201601f810184136158d857600080fd5b6137f0848235602084016153e2565b6000602082840312156158f957600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561593057815187529582019590820190600101615914565b509495945050505050565b60008151808452615953816020860160208601615e2e565b601f01601f19169290920160200192915050565b60008351615979818460208801615e2e565b83519083019061598d818360208801615e2e565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906159f69083018461593b565b9695505050505050565b60018060a01b0384168152826020820152606060408201526000615a27606083018461593b565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015615a8557603f19888603018452615a73858351615900565b94509285019290850190600101615a57565b5092979650505050505050565b6020815260006128446020830184615900565b604080825283519082018190526000906020906060840190828701845b82811015615ade57815184529284019290840190600101615ac2565b50505092019290925292915050565b60a081526000615b0060a0830188615900565b90508560208301528460408301528360608301528260808301529695505050505050565b602081526000612844602083018461593b565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252600e908201526d24b73b30b634b21039b2b73232b960911b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b86815260c060208201526000615c5060c0830188615900565b90508560408301528460608301528360808301528260a0830152979650505050505050565b9283526020830191909152604082015260600190565b604051601f8201601f191681016001600160401b0381118282101715615cb357615cb3615f16565b604052919050565b60006001600160401b03821115615cd457615cd4615f16565b5060051b60200190565b60008219821115615cf157615cf1615ebe565b500190565b600082615d0557615d05615ed4565b500490565b600181815b80851115615d45578160001904821115615d2b57615d2b615ebe565b80851615615d3857918102915b93841c9390800290615d0f565b509250929050565b600061284460ff841683600082615d6657506001610af7565b81615d7357506000610af7565b8160018114615d895760028114615d9357615daf565b6001915050610af7565b60ff841115615da457615da4615ebe565b50506001821b610af7565b5060208310610133831016604e8410600b8410161715615dd2575081810a610af7565b615ddc8383615d0a565b8060001904821115615df057615df0615ebe565b029392505050565b6000816000190483118215151615615e1257615e12615ebe565b500290565b600082821015615e2957615e29615ebe565b500390565b60005b83811015615e49578181015183820152602001615e31565b83811115612af85750506000910152565b600181811c90821680615e6e57607f821691505b6020821081141561146657634e487b7160e01b600052602260045260246000fd5b6000600019821415615ea357615ea3615ebe565b5060010190565b600082615eb957615eb9615ed4565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461352457600080fd5b801515811461352457600080fd5b6001600160e01b03198116811461352457600080fdfedd1826b4d2aad5a77901aba82ea092344d3b1f4e0d3a2b91521ebe4ade7b0c34ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d12ed9ccad8e50cc46e4e76bd13eec3b16f197ade0945914d0b4637f7815326364736f6c63430008070033

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