Address Details
contract

0x1EC3366D384ee7996F2F70B67A65C5d54Ce96040

Contract Name
Attestations
Creator
0xe1207b–0408ee at 0xe96c6e–e7cd58
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
19291114
This contract has been partially verified via Sourcify. View contract in Sourcify repository
Contract name:
Attestations




Optimization enabled
false
Compiler version
v0.5.13+commit.5b0b510c




EVM Version
istanbul




Verified at
2022-03-28T08:53:04.984308Z

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/identity/Attestations.sol

pragma solidity ^0.5.13;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/utils/SafeCast.sol";

import "./interfaces/IAttestations.sol";
import "../common/interfaces/IAccounts.sol";
import "../common/interfaces/ICeloVersionedContract.sol";

import "../common/Initializable.sol";
import "../common/UsingRegistry.sol";
import "../common/Signatures.sol";
import "../common/UsingPrecompiles.sol";
import "../common/libraries/ReentrancyGuard.sol";

/**
 * @title Contract mapping identifiers to accounts
 */
contract Attestations is
  IAttestations,
  ICeloVersionedContract,
  Ownable,
  Initializable,
  UsingRegistry,
  ReentrancyGuard,
  UsingPrecompiles
{
  using SafeMath for uint256;
  using SafeCast for uint256;

  enum AttestationStatus { None, Incomplete, Complete }

  struct Attestation {
    AttestationStatus status;
    // For outstanding attestations, this is the block number of the request.
    // For completed attestations, this is the block number of the attestation completion.
    uint32 blockNumber;
    // The token with which attestation request fees were paid.
    address attestationRequestFeeToken;
  }

  // Stores attestations state for a single (identifier, account address) pair.
  struct AttestedAddress {
    // Total number of requested attestations.
    uint32 requested;
    // Total number of completed attestations.
    uint32 completed;
    // List of selected issuers responsible for attestations. The length of this list
    // might be smaller than `requested` (which represents the total number of requested
    // attestations) if users are not calling `selectIssuers` on unselected requests.
    address[] selectedIssuers;
    // State of each attestation keyed by issuer.
    mapping(address => Attestation) issuedAttestations;
  }

  struct UnselectedRequest {
    // The block at which the attestations were requested.
    uint32 blockNumber;
    // The number of attestations that were requested.
    uint32 attestationsRequested;
    // The token with which attestation request fees were paid in this request.
    address attestationRequestFeeToken;
  }

  struct IdentifierState {
    // All account addresses associated with this identifier.
    address[] accounts;
    // Keeps the state of attestations for account addresses for this identifier.
    mapping(address => AttestedAddress) attestations;
    // Temporarily stores attestation requests for which issuers should be selected by the account.
    mapping(address => UnselectedRequest) unselectedRequests;
  }

  mapping(bytes32 => IdentifierState) identifiers;

  // The duration in blocks in which an attestation can be completed from the block in which the
  // attestation was requested.
  uint256 public attestationExpiryBlocks;

  // The duration to wait until selectIssuers can be called for an attestation request.
  uint256 public selectIssuersWaitBlocks;

  // Limit the maximum number of attestations that can be requested
  uint256 public maxAttestations;

  // The fees that are associated with attestations for a particular token.
  mapping(address => uint256) public attestationRequestFees;

  // Maps a token and attestation issuer to the amount that they're owed.
  mapping(address => mapping(address => uint256)) public pendingWithdrawals;

  // Attestation transfer approvals, keyed by user and keccak(identifier, from, to)
  mapping(address => mapping(bytes32 => bool)) public transferApprovals;

  event AttestationsRequested(
    bytes32 indexed identifier,
    address indexed account,
    uint256 attestationsRequested,
    address attestationRequestFeeToken
  );

  event AttestationIssuerSelected(
    bytes32 indexed identifier,
    address indexed account,
    address indexed issuer,
    address attestationRequestFeeToken
  );

  event AttestationCompleted(
    bytes32 indexed identifier,
    address indexed account,
    address indexed issuer
  );

  event Withdrawal(address indexed account, address indexed token, uint256 amount);
  event AttestationExpiryBlocksSet(uint256 value);
  event AttestationRequestFeeSet(address indexed token, uint256 value);
  event SelectIssuersWaitBlocksSet(uint256 value);
  event MaxAttestationsSet(uint256 value);
  event AttestationsTransferred(
    bytes32 indexed identifier,
    address indexed fromAccount,
    address indexed toAccount
  );
  event TransferApproval(
    address indexed approver,
    bytes32 indexed indentifier,
    address from,
    address to,
    bool approved
  );

  /**
   * @notice Sets initialized == true on implementation contracts
   * @param test Set to true to skip implementation initialization
   */
  constructor(bool test) public Initializable(test) {}

  /**
   * @notice Used in place of the constructor to allow the contract to be upgradable via proxy.
   * @param registryAddress The address of the registry core smart contract.
   * @param _attestationExpiryBlocks The new limit on blocks allowed to come between requesting
   * an attestation and completing it.
   * @param _selectIssuersWaitBlocks The wait period in blocks to call selectIssuers on attestation
   * requests.
   * @param attestationRequestFeeTokens The address of tokens that fees should be payable in.
   * @param attestationRequestFeeValues The corresponding fee values.
   */
  function initialize(
    address registryAddress,
    uint256 _attestationExpiryBlocks,
    uint256 _selectIssuersWaitBlocks,
    uint256 _maxAttestations,
    address[] calldata attestationRequestFeeTokens,
    uint256[] calldata attestationRequestFeeValues
  ) external initializer {
    _transferOwnership(msg.sender);
    setRegistry(registryAddress);
    setAttestationExpiryBlocks(_attestationExpiryBlocks);
    setSelectIssuersWaitBlocks(_selectIssuersWaitBlocks);
    setMaxAttestations(_maxAttestations);

    require(
      attestationRequestFeeTokens.length > 0 &&
        attestationRequestFeeTokens.length == attestationRequestFeeValues.length,
      "attestationRequestFeeTokens specification was invalid"
    );
    for (uint256 i = 0; i < attestationRequestFeeTokens.length; i = i.add(1)) {
      setAttestationRequestFee(attestationRequestFeeTokens[i], attestationRequestFeeValues[i]);
    }
  }

  /**
   * @notice Returns the storage, major, minor, and patch version of the contract.
   * @return The storage, major, minor, and patch version of the contract.
   */
  function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) {
    return (1, 1, 1, 2);
  }

  /**
   * @notice Commit to the attestation request of a hashed identifier.
   * @param identifier The hash of the identifier to be attested.
   * @param attestationsRequested The number of requested attestations for this request.
   * @param attestationRequestFeeToken The address of the token with which the attestation fee will
   * be paid.
   * @dev Note that if an attestation expires before it is completed, the fee is forfeited. This is
   * to prevent folks from attacking validators by requesting attestations that they do not
   * complete, and to increase the cost of validators attempting to manipulate the attestations
   * protocol.
   */
  function request(
    bytes32 identifier,
    uint256 attestationsRequested,
    address attestationRequestFeeToken
  ) external nonReentrant {
    require(
      attestationRequestFees[attestationRequestFeeToken] > 0,
      "Invalid attestationRequestFeeToken"
    );
    require(
      IERC20(attestationRequestFeeToken).transferFrom(
        msg.sender,
        address(this),
        attestationRequestFees[attestationRequestFeeToken].mul(attestationsRequested)
      ),
      "Transfer of attestation request fees failed"
    );

    require(attestationsRequested > 0, "You have to request at least 1 attestation");
    require(attestationsRequested <= maxAttestations, "Too many attestations requested");

    IdentifierState storage state = identifiers[identifier];

    require(
      state.unselectedRequests[msg.sender].blockNumber == 0 ||
        isAttestationExpired(state.unselectedRequests[msg.sender].blockNumber) ||
        !isAttestationRequestSelectable(state.unselectedRequests[msg.sender].blockNumber),
      "There exists an unexpired, unselected attestation request"
    );

    state.unselectedRequests[msg.sender].blockNumber = block.number.toUint32();
    state.unselectedRequests[msg.sender].attestationsRequested = attestationsRequested.toUint32();
    state.unselectedRequests[msg.sender].attestationRequestFeeToken = attestationRequestFeeToken;

    state.attestations[msg.sender].requested = uint256(state.attestations[msg.sender].requested)
      .add(attestationsRequested)
      .toUint32();

    emit AttestationsRequested(
      identifier,
      msg.sender,
      attestationsRequested,
      attestationRequestFeeToken
    );
  }

  /**
   * @notice Selects the issuers for the most recent attestation request.
   * @param identifier The hash of the identifier to be attested.
   */
  function selectIssuers(bytes32 identifier) external {
    IdentifierState storage state = identifiers[identifier];

    require(
      state.unselectedRequests[msg.sender].blockNumber > 0,
      "No unselected attestation request to select issuers for"
    );

    require(
      !isAttestationExpired(state.unselectedRequests[msg.sender].blockNumber),
      "The attestation request has expired"
    );

    addIncompleteAttestations(identifier);
    delete state.unselectedRequests[msg.sender];
  }

  /**
   * @notice Submit the secret message sent by the issuer to complete the attestation request.
   * @param identifier The hash of the identifier for this attestation.
   * @param v The recovery id of the incoming ECDSA signature.
   * @param r Output value r of the ECDSA signature.
   * @param s Output value s of the ECDSA signature.
   * @dev Throws if there is no matching outstanding attestation request.
   * @dev Throws if the attestation window has passed.
   */
  function complete(bytes32 identifier, uint8 v, bytes32 r, bytes32 s) external {
    address issuer = validateAttestationCode(identifier, msg.sender, v, r, s);

    Attestation storage attestation = identifiers[identifier].attestations[msg.sender]
      .issuedAttestations[issuer];

    address token = attestation.attestationRequestFeeToken;

    // solhint-disable-next-line not-rely-on-time
    attestation.blockNumber = block.number.toUint32();
    attestation.status = AttestationStatus.Complete;
    delete attestation.attestationRequestFeeToken;
    AttestedAddress storage attestedAddress = identifiers[identifier].attestations[msg.sender];
    require(
      attestedAddress.completed < attestedAddress.completed + 1,
      "SafeMath32 integer overflow"
    );
    attestedAddress.completed = attestedAddress.completed + 1;

    pendingWithdrawals[token][issuer] = pendingWithdrawals[token][issuer].add(
      attestationRequestFees[token]
    );

    IdentifierState storage state = identifiers[identifier];
    if (identifiers[identifier].attestations[msg.sender].completed == 1) {
      state.accounts.push(msg.sender);
    }

    emit AttestationCompleted(identifier, msg.sender, issuer);
  }

  /**
   * @notice Revokes an account for an identifier.
   * @param identifier The identifier for which to revoke.
   * @param index The index of the account in the accounts array.
   */
  function revoke(bytes32 identifier, uint256 index) external {
    uint256 numAccounts = identifiers[identifier].accounts.length;
    require(index < numAccounts, "Index is invalid");
    require(
      msg.sender == identifiers[identifier].accounts[index],
      "Index does not match msg.sender"
    );

    uint256 newNumAccounts = numAccounts.sub(1);
    if (index != newNumAccounts) {
      identifiers[identifier].accounts[index] = identifiers[identifier].accounts[newNumAccounts];
    }
    identifiers[identifier].accounts[newNumAccounts] = address(0x0);
    identifiers[identifier].accounts.length = identifiers[identifier].accounts.length.sub(1);
  }

  /**
   * @notice Allows issuers to withdraw accumulated attestation rewards.
   * @param token The address of the token that will be withdrawn.
   * @dev Throws if msg.sender does not have any rewards to withdraw.
   */
  function withdraw(address token) external {
    address issuer = getAccounts().attestationSignerToAccount(msg.sender);
    uint256 value = pendingWithdrawals[token][issuer];
    require(value > 0, "value was negative/zero");
    pendingWithdrawals[token][issuer] = 0;
    require(IERC20(token).transfer(issuer, value), "token transfer failed");
    emit Withdrawal(issuer, token, value);
  }

  /**
   * @notice Returns the unselected attestation request for an identifier/account pair, if any.
   * @param identifier Hash of the identifier.
   * @param account Address of the account.
   * @return [
   *           Block number at which was requested,
   *           Number of unselected requests,
   *           Address of the token with which this attestation request was paid for
   *         ]
   */
  function getUnselectedRequest(bytes32 identifier, address account)
    external
    view
    returns (uint32, uint32, address)
  {
    return (
      identifiers[identifier].unselectedRequests[account].blockNumber,
      identifiers[identifier].unselectedRequests[account].attestationsRequested,
      identifiers[identifier].unselectedRequests[account].attestationRequestFeeToken
    );
  }

  /**
   * @notice Returns selected attestation issuers for a identifier/account pair.
   * @param identifier Hash of the identifier.
   * @param account Address of the account.
   * @return Addresses of the selected attestation issuers.
   */
  function getAttestationIssuers(bytes32 identifier, address account)
    external
    view
    returns (address[] memory)
  {
    return identifiers[identifier].attestations[account].selectedIssuers;
  }

  /**
   * @notice Returns attestation stats for a identifier/account pair.
   * @param identifier Hash of the identifier.
   * @param account Address of the account.
   * @return [Number of completed attestations, Number of total requested attestations]
   */
  function getAttestationStats(bytes32 identifier, address account)
    external
    view
    returns (uint32, uint32)
  {
    return (
      identifiers[identifier].attestations[account].completed,
      identifiers[identifier].attestations[account].requested
    );
  }

  /**
   * @notice Batch lookup function to determine attestation stats for a list of identifiers.
   * @param identifiersToLookup Array of n identifiers.
   * @return [0] Array of number of matching accounts per identifier.
   * @return [1] Array of sum([0]) matching walletAddresses.
   * @return [2] Array of sum([0]) numbers indicating the completions for each account.
   * @return [3] Array of sum([0]) numbers indicating the total number of requested
                 attestations for each account.
   */
  function batchGetAttestationStats(bytes32[] calldata identifiersToLookup)
    external
    view
    returns (uint256[] memory, address[] memory, uint64[] memory, uint64[] memory)
  {
    require(identifiersToLookup.length > 0, "You have to pass at least one identifier");

    uint256[] memory matches;
    address[] memory addresses;

    (matches, addresses) = batchlookupAccountsForIdentifier(identifiersToLookup);

    uint64[] memory completed = new uint64[](addresses.length);
    uint64[] memory total = new uint64[](addresses.length);

    uint256 currentIndex = 0;
    for (uint256 i = 0; i < identifiersToLookup.length; i = i.add(1)) {
      address[] memory addrs = identifiers[identifiersToLookup[i]].accounts;
      for (uint256 matchIndex = 0; matchIndex < matches[i]; matchIndex = matchIndex.add(1)) {
        addresses[currentIndex] = getAccounts().getWalletAddress(addrs[matchIndex]);
        completed[currentIndex] = identifiers[identifiersToLookup[i]]
          .attestations[addrs[matchIndex]]
          .completed;
        total[currentIndex] = identifiers[identifiersToLookup[i]].attestations[addrs[matchIndex]]
          .requested;
        currentIndex = currentIndex.add(1);
      }
    }

    return (matches, addresses, completed, total);
  }

  /**
   * @notice Returns the state of a specific attestation.
   * @param identifier Hash of the identifier.
   * @param account Address of the account.
   * @param issuer Address of the issuer.
   * @return [
   *           Status of the attestation,
   *           Block number of request/completion the attestation,
   *           Address of the token with which this attestation request was paid for
   *         ]
   */
  function getAttestationState(bytes32 identifier, address account, address issuer)
    external
    view
    returns (uint8, uint32, address)
  {
    Attestation storage attestation = identifiers[identifier].attestations[account]
      .issuedAttestations[issuer];
    return (
      uint8(attestation.status),
      attestation.blockNumber,
      attestation.attestationRequestFeeToken
    );

  }

  /**
    * @notice Returns the state of all attestations that are completable
    * @param identifier Hash of the identifier.
    * @param account Address of the account.
    * @return ( blockNumbers[] - Block number of request/completion the attestation,
    *           issuers[] - Address of the issuer,
    *           stringLengths[] - The length of each metadataURL string for each issuer,
    *           stringData - All strings concatenated
    *         )
    */
  function getCompletableAttestations(bytes32 identifier, address account)
    external
    view
    returns (uint32[] memory, address[] memory, uint256[] memory, bytes memory)
  {
    AttestedAddress storage state = identifiers[identifier].attestations[account];
    address[] storage issuers = state.selectedIssuers;

    uint256 num = 0;
    for (uint256 i = 0; i < issuers.length; i = i.add(1)) {
      if (isAttestationCompletable(state.issuedAttestations[issuers[i]])) {
        num = num.add(1);
      }
    }

    uint32[] memory blockNumbers = new uint32[](num);
    address[] memory completableIssuers = new address[](num);

    uint256 pointer = 0;
    for (uint256 i = 0; i < issuers.length; i = i.add(1)) {
      if (isAttestationCompletable(state.issuedAttestations[issuers[i]])) {
        blockNumbers[pointer] = state.issuedAttestations[issuers[i]].blockNumber;
        completableIssuers[pointer] = issuers[i];
        pointer = pointer.add(1);
      }
    }

    uint256[] memory stringLengths;
    bytes memory stringData;
    (stringLengths, stringData) = getAccounts().batchGetMetadataURL(completableIssuers);
    return (blockNumbers, completableIssuers, stringLengths, stringData);
  }

  /**
   * @notice Returns the fee set for a particular token.
   * @param token Address of the attestationRequestFeeToken.
   * @return The fee.
   */
  function getAttestationRequestFee(address token) external view returns (uint256) {
    return attestationRequestFees[token];
  }

  /**
   * @notice Updates the fee  for a particular token.
   * @param token The address of the attestationRequestFeeToken.
   * @param fee The fee in 'token' that is required for each attestation.
   */
  function setAttestationRequestFee(address token, uint256 fee) public onlyOwner {
    require(fee > 0, "You have to specify a fee greater than 0");
    attestationRequestFees[token] = fee;
    emit AttestationRequestFeeSet(token, fee);
  }

  /**
   * @notice Updates 'attestationExpiryBlocks'.
   * @param _attestationExpiryBlocks The new limit on blocks allowed to come between requesting
   * an attestation and completing it.
   */
  function setAttestationExpiryBlocks(uint256 _attestationExpiryBlocks) public onlyOwner {
    require(_attestationExpiryBlocks > 0, "attestationExpiryBlocks has to be greater than 0");
    attestationExpiryBlocks = _attestationExpiryBlocks;
    emit AttestationExpiryBlocksSet(_attestationExpiryBlocks);
  }

  /**
   * @notice Updates 'selectIssuersWaitBlocks'.
   * @param _selectIssuersWaitBlocks The wait period in blocks to call selectIssuers on attestation
   *                                 requests.
   */
  function setSelectIssuersWaitBlocks(uint256 _selectIssuersWaitBlocks) public onlyOwner {
    require(_selectIssuersWaitBlocks > 0, "selectIssuersWaitBlocks has to be greater than 0");
    selectIssuersWaitBlocks = _selectIssuersWaitBlocks;
    emit SelectIssuersWaitBlocksSet(_selectIssuersWaitBlocks);
  }

  /**
   * @notice Updates 'maxAttestations'.
   * @param _maxAttestations Maximum number of attestations that can be requested.
   */
  function setMaxAttestations(uint256 _maxAttestations) public onlyOwner {
    require(_maxAttestations > 0, "maxAttestations has to be greater than 0");
    maxAttestations = _maxAttestations;
    emit MaxAttestationsSet(_maxAttestations);
  }

  /**
   * @notice Query 'maxAttestations'
   * @return Maximum number of attestations that can be requested.
   */
  function getMaxAttestations() external view returns (uint256) {
    return maxAttestations;
  }

  /**
   * @notice Validates the given attestation code.
   * @param identifier The hash of the identifier to be attested.
   * @param account Address of the account. 
   * @param v The recovery id of the incoming ECDSA signature.
   * @param r Output value r of the ECDSA signature.
   * @param s Output value s of the ECDSA signature.
   * @return The issuer of the corresponding attestation.
   * @dev Throws if there is no matching outstanding attestation request.
   * @dev Throws if the attestation window has passed.
   */
  function validateAttestationCode(
    bytes32 identifier,
    address account,
    uint8 v,
    bytes32 r,
    bytes32 s
  ) public view returns (address) {
    bytes32 codehash = keccak256(abi.encodePacked(identifier, account));
    address signer = Signatures.getSignerOfMessageHash(codehash, v, r, s);
    address issuer = getAccounts().attestationSignerToAccount(signer);

    Attestation storage attestation = identifiers[identifier].attestations[account]
      .issuedAttestations[issuer];

    require(
      attestation.status == AttestationStatus.Incomplete,
      "Attestation code does not match any outstanding attestation"
    );
    require(!isAttestationExpired(attestation.blockNumber), "Attestation timed out");

    return issuer;
  }

  function lookupAccountsForIdentifier(bytes32 identifier)
    external
    view
    returns (address[] memory)
  {
    return identifiers[identifier].accounts;
  }

  /**
   * @notice Require that a given identifier/address pair has
   * requested a specific number of attestations.
   * @param identifier Hash of the identifier.
   * @param account Address of the account.
   * @param expected Number of expected attestations
   * @dev It can be used when batching meta-transactions to validate
   * attestation are requested as expected in untrusted scenarios
   */
  function requireNAttestationsRequested(bytes32 identifier, address account, uint32 expected)
    external
    view
  {
    uint256 requested = identifiers[identifier].attestations[account].requested;
    require(requested == expected, "requested attestations does not match expected");
  }

  /**
   * @notice Helper function for batchGetAttestationStats to calculate the
             total number of addresses that have >0 complete attestations for the identifiers.
   * @param identifiersToLookup Array of n identifiers.
   * @return Array of n numbers that indicate the number of matching addresses per identifier
   *         and array of addresses preallocated for total number of matches.
   */
  function batchlookupAccountsForIdentifier(bytes32[] memory identifiersToLookup)
    internal
    view
    returns (uint256[] memory, address[] memory)
  {
    require(identifiersToLookup.length > 0, "You have to pass at least one identifier");
    uint256 totalAddresses = 0;
    uint256[] memory matches = new uint256[](identifiersToLookup.length);

    for (uint256 i = 0; i < identifiersToLookup.length; i = i.add(1)) {
      uint256 count = identifiers[identifiersToLookup[i]].accounts.length;

      totalAddresses = totalAddresses.add(count);
      matches[i] = count;
    }

    return (matches, new address[](totalAddresses));
  }

  /**
   * @notice Adds additional attestations given the current randomness.
   * @param identifier The hash of the identifier to be attested.
   */
  function addIncompleteAttestations(bytes32 identifier) internal {
    AttestedAddress storage state = identifiers[identifier].attestations[msg.sender];
    UnselectedRequest storage unselectedRequest = identifiers[identifier].unselectedRequests[msg
      .sender];

    bytes32 seed = getRandom().getBlockRandomness(
      uint256(unselectedRequest.blockNumber).add(selectIssuersWaitBlocks)
    );
    IAccounts accounts = getAccounts();
    uint256 issuersLength = numberValidatorsInCurrentSet();
    uint256[] memory issuers = new uint256[](issuersLength);
    for (uint256 i = 0; i < issuersLength; i = i.add(1)) issuers[i] = i;

    require(unselectedRequest.attestationsRequested <= issuersLength, "not enough issuers");

    uint256 currentIndex = 0;

    // The length of the list (variable issuersLength) is decremented in each round,
    // so the loop always terminates
    while (currentIndex < unselectedRequest.attestationsRequested) {
      require(issuersLength > 0, "not enough issuers");
      seed = keccak256(abi.encodePacked(seed));
      uint256 idx = uint256(seed) % issuersLength;
      address signer = validatorSignerAddressFromCurrentSet(issuers[idx]);
      address issuer = accounts.signerToAccount(signer);

      Attestation storage attestation = state.issuedAttestations[issuer];

      if (
        attestation.status == AttestationStatus.None &&
        accounts.hasAuthorizedAttestationSigner(issuer)
      ) {
        currentIndex = currentIndex.add(1);
        attestation.status = AttestationStatus.Incomplete;
        attestation.blockNumber = unselectedRequest.blockNumber;
        attestation.attestationRequestFeeToken = unselectedRequest.attestationRequestFeeToken;
        state.selectedIssuers.push(issuer);

        emit AttestationIssuerSelected(
          identifier,
          msg.sender,
          issuer,
          unselectedRequest.attestationRequestFeeToken
        );
      }

      // Remove the validator that was selected from the list,
      // by replacing it by the last element in the list
      issuersLength = issuersLength.sub(1);
      issuers[idx] = issuers[issuersLength];
    }
  }

  /**
   * @notice Update the approval status of allowing an attestation identifier
   * mapping to be transfered from an address to another.  The "to" or "from"
   * addresses must both approve.  If the other has already approved, then the transfer
   * is executed.
   * @param identifier The identifier for this attestation.
   * @param index The index of the account in the accounts array.
   * @param from The current attestation address to which the identifier is mapped.
   * @param to The new address to map to identifier.
   * @param status The approval status
   */
  function approveTransfer(bytes32 identifier, uint256 index, address from, address to, bool status)
    external
  {
    require(
      msg.sender == from || msg.sender == to,
      "Approver must be sender or recipient of transfer"
    );
    bytes32 key = keccak256(abi.encodePacked(identifier, from, to));
    address other = msg.sender == from ? to : from;
    if (status && transferApprovals[other][key]) {
      _transfer(identifier, index, from, to);
      transferApprovals[other][key] = false;
    } else {
      transferApprovals[msg.sender][key] = status;
      emit TransferApproval(msg.sender, identifier, from, to, status);
    }
  }

  /**
   * @notice Transfer an attestation identifier mapping from the sender address to a
   * replacement address.
   * @param identifier The identifier for this attestation.
   * @param index The index of the account in the accounts array.
   * @param from The current attestation address to which the identifier is mapped.
   * @param to The address to replace the sender address in the indentifier mapping.
   * @dev Throws if index is out of bound for account array.
   * @dev Throws if `from` is not in the account array at the given index.
   * @dev Throws if `to` already has attestations
   */
  function _transfer(bytes32 identifier, uint256 index, address from, address to) internal {
    uint256 numAccounts = identifiers[identifier].accounts.length;
    require(index < numAccounts, "Index is invalid");
    require(from == identifiers[identifier].accounts[index], "Index does not match from address");
    require(
      identifiers[identifier].attestations[to].requested == 0,
      "Address tranferring to has already requested attestations"
    );

    identifiers[identifier].accounts[index] = to;
    identifiers[identifier].attestations[to] = identifiers[identifier].attestations[from];
    identifiers[identifier].unselectedRequests[to] = identifiers[identifier]
      .unselectedRequests[from];
    delete identifiers[identifier].attestations[from];
    delete identifiers[identifier].unselectedRequests[from];
    emit AttestationsTransferred(identifier, from, to);
  }

  function isAttestationExpired(uint32 attestationRequestBlock) internal view returns (bool) {
    return block.number >= uint256(attestationRequestBlock).add(attestationExpiryBlocks);
  }

  function isAttestationCompletable(Attestation storage attestation) internal view returns (bool) {
    return (attestation.status == AttestationStatus.Incomplete &&
      !isAttestationExpired(attestation.blockNumber));
  }

  function isAttestationRequestSelectable(uint256 attestationRequestBlock)
    internal
    view
    returns (bool)
  {
    return block.number < attestationRequestBlock.add(getRandom().randomnessBlockRetentionWindow());
  }
}
        

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/Initializable.sol

pragma solidity ^0.5.13;

contract Initializable {
  bool public initialized;

  constructor(bool testingDeployment) public {
    if (!testingDeployment) {
      initialized = true;
    }
  }

  modifier initializer() {
    require(!initialized, "contract already initialized");
    initialized = true;
    _;
  }
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/Signatures.sol

pragma solidity ^0.5.13;

import "openzeppelin-solidity/contracts/cryptography/ECDSA.sol";

library Signatures {
  /**
  * @notice Given a signed address, returns the signer of the address.
  * @param message The address that was signed.
  * @param v The recovery id of the incoming ECDSA signature.
  * @param r Output value r of the ECDSA signature.
  * @param s Output value s of the ECDSA signature.
  */
  function getSignerOfAddress(address message, uint8 v, bytes32 r, bytes32 s)
    public
    pure
    returns (address)
  {
    bytes32 hash = keccak256(abi.encodePacked(message));
    return getSignerOfMessageHash(hash, v, r, s);
  }

  /**
  * @notice Given a message hash, returns the signer of the address.
  * @param messageHash The hash of a message.
  * @param v The recovery id of the incoming ECDSA signature.
  * @param r Output value r of the ECDSA signature.
  * @param s Output value s of the ECDSA signature.
  */
  function getSignerOfMessageHash(bytes32 messageHash, uint8 v, bytes32 r, bytes32 s)
    public
    pure
    returns (address)
  {
    bytes memory signature = new bytes(65);
    // Concatenate (r, s, v) into signature.
    assembly {
      mstore(add(signature, 32), r)
      mstore(add(signature, 64), s)
      mstore8(add(signature, 96), v)
    }
    bytes32 prefixedHash = ECDSA.toEthSignedMessageHash(messageHash);
    return ECDSA.recover(prefixedHash, signature);
  }

  /**
  * @notice Given a domain separator and a structHash, construct the typed data hash
  * @param eip712DomainSeparator Context specific domain separator
  * @param structHash hash of the typed data struct
  * @return The EIP712 typed data hash
  */
  function toEthSignedTypedDataHash(bytes32 eip712DomainSeparator, bytes32 structHash)
    public
    pure
    returns (bytes32)
  {
    return keccak256(abi.encodePacked("\x19\x01", eip712DomainSeparator, structHash));
  }

  /**
  * @notice Given a domain separator and a structHash and a signature return the signer
  * @param eip712DomainSeparator Context specific domain separator
  * @param structHash hash of the typed data struct
  * @param v The recovery id of the incoming ECDSA signature.
  * @param r Output value r of the ECDSA signature.
  * @param s Output value s of the ECDSA signature.
  */
  function getSignerOfTypedDataHash(
    bytes32 eip712DomainSeparator,
    bytes32 structHash,
    uint8 v,
    bytes32 r,
    bytes32 s
  ) public pure returns (address) {
    bytes memory signature = new bytes(65);
    // Concatenate (r, s, v) into signature.
    assembly {
      mstore(add(signature, 32), r)
      mstore(add(signature, 64), s)
      mstore8(add(signature, 96), v)
    }
    bytes32 prefixedHash = toEthSignedTypedDataHash(eip712DomainSeparator, structHash);
    return ECDSA.recover(prefixedHash, signature);
  }
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/UsingPrecompiles.sol

pragma solidity ^0.5.13;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "../common/interfaces/ICeloVersionedContract.sol";

contract UsingPrecompiles {
  using SafeMath for uint256;

  address constant TRANSFER = address(0xff - 2);
  address constant FRACTION_MUL = address(0xff - 3);
  address constant PROOF_OF_POSSESSION = address(0xff - 4);
  address constant GET_VALIDATOR = address(0xff - 5);
  address constant NUMBER_VALIDATORS = address(0xff - 6);
  address constant EPOCH_SIZE = address(0xff - 7);
  address constant BLOCK_NUMBER_FROM_HEADER = address(0xff - 8);
  address constant HASH_HEADER = address(0xff - 9);
  address constant GET_PARENT_SEAL_BITMAP = address(0xff - 10);
  address constant GET_VERIFIED_SEAL_BITMAP = address(0xff - 11);

  /**
   * @notice calculate a * b^x for fractions a, b to `decimals` precision
   * @param aNumerator Numerator of first fraction
   * @param aDenominator Denominator of first fraction
   * @param bNumerator Numerator of exponentiated fraction
   * @param bDenominator Denominator of exponentiated fraction
   * @param exponent exponent to raise b to
   * @param _decimals precision
   * @return numerator/denominator of the computed quantity (not reduced).
   */
  function fractionMulExp(
    uint256 aNumerator,
    uint256 aDenominator,
    uint256 bNumerator,
    uint256 bDenominator,
    uint256 exponent,
    uint256 _decimals
  ) public view returns (uint256, uint256) {
    require(aDenominator != 0 && bDenominator != 0, "a denominator is zero");
    uint256 returnNumerator;
    uint256 returnDenominator;
    bool success;
    bytes memory out;
    (success, out) = FRACTION_MUL.staticcall(
      abi.encodePacked(aNumerator, aDenominator, bNumerator, bDenominator, exponent, _decimals)
    );
    require(success, "error calling fractionMulExp precompile");
    returnNumerator = getUint256FromBytes(out, 0);
    returnDenominator = getUint256FromBytes(out, 32);
    return (returnNumerator, returnDenominator);
  }

  /**
   * @notice Returns the current epoch size in blocks.
   * @return The current epoch size in blocks.
   */
  function getEpochSize() public view returns (uint256) {
    bytes memory out;
    bool success;
    (success, out) = EPOCH_SIZE.staticcall(abi.encodePacked());
    require(success, "error calling getEpochSize precompile");
    return getUint256FromBytes(out, 0);
  }

  /**
   * @notice Returns the epoch number at a block.
   * @param blockNumber Block number where epoch number is calculated.
   * @return Epoch number.
   */
  function getEpochNumberOfBlock(uint256 blockNumber) public view returns (uint256) {
    return epochNumberOfBlock(blockNumber, getEpochSize());
  }

  /**
   * @notice Returns the epoch number at a block.
   * @return Current epoch number.
   */
  function getEpochNumber() public view returns (uint256) {
    return getEpochNumberOfBlock(block.number);
  }

  /**
   * @notice Returns the epoch number at a block.
   * @param blockNumber Block number where epoch number is calculated.
   * @param epochSize The epoch size in blocks.
   * @return Epoch number.
   */
  function epochNumberOfBlock(uint256 blockNumber, uint256 epochSize)
    internal
    pure
    returns (uint256)
  {
    // Follows GetEpochNumber from celo-blockchain/blob/master/consensus/istanbul/utils.go
    uint256 epochNumber = blockNumber / epochSize;
    if (blockNumber % epochSize == 0) {
      return epochNumber;
    } else {
      return epochNumber.add(1);
    }
  }

  /**
   * @notice Gets a validator address from the current validator set.
   * @param index Index of requested validator in the validator set.
   * @return Address of validator at the requested index.
   */
  function validatorSignerAddressFromCurrentSet(uint256 index) public view returns (address) {
    bytes memory out;
    bool success;
    (success, out) = GET_VALIDATOR.staticcall(abi.encodePacked(index, uint256(block.number)));
    require(success, "error calling validatorSignerAddressFromCurrentSet precompile");
    return address(getUint256FromBytes(out, 0));
  }

  /**
   * @notice Gets a validator address from the validator set at the given block number.
   * @param index Index of requested validator in the validator set.
   * @param blockNumber Block number to retrieve the validator set from.
   * @return Address of validator at the requested index.
   */
  function validatorSignerAddressFromSet(uint256 index, uint256 blockNumber)
    public
    view
    returns (address)
  {
    bytes memory out;
    bool success;
    (success, out) = GET_VALIDATOR.staticcall(abi.encodePacked(index, blockNumber));
    require(success, "error calling validatorSignerAddressFromSet precompile");
    return address(getUint256FromBytes(out, 0));
  }

  /**
   * @notice Gets the size of the current elected validator set.
   * @return Size of the current elected validator set.
   */
  function numberValidatorsInCurrentSet() public view returns (uint256) {
    bytes memory out;
    bool success;
    (success, out) = NUMBER_VALIDATORS.staticcall(abi.encodePacked(uint256(block.number)));
    require(success, "error calling numberValidatorsInCurrentSet precompile");
    return getUint256FromBytes(out, 0);
  }

  /**
   * @notice Gets the size of the validator set that must sign the given block number.
   * @param blockNumber Block number to retrieve the validator set from.
   * @return Size of the validator set.
   */
  function numberValidatorsInSet(uint256 blockNumber) public view returns (uint256) {
    bytes memory out;
    bool success;
    (success, out) = NUMBER_VALIDATORS.staticcall(abi.encodePacked(blockNumber));
    require(success, "error calling numberValidatorsInSet precompile");
    return getUint256FromBytes(out, 0);
  }

  /**
   * @notice Checks a BLS proof of possession.
   * @param sender The address signed by the BLS key to generate the proof of possession.
   * @param blsKey The BLS public key that the validator is using for consensus, should pass proof
   *   of possession. 48 bytes.
   * @param blsPop The BLS public key proof-of-possession, which consists of a signature on the
   *   account address. 96 bytes.
   * @return True upon success.
   */
  function checkProofOfPossession(address sender, bytes memory blsKey, bytes memory blsPop)
    public
    view
    returns (bool)
  {
    bool success;
    (success, ) = PROOF_OF_POSSESSION.staticcall(abi.encodePacked(sender, blsKey, blsPop));
    return success;
  }

  /**
   * @notice Parses block number out of header.
   * @param header RLP encoded header
   * @return Block number.
   */
  function getBlockNumberFromHeader(bytes memory header) public view returns (uint256) {
    bytes memory out;
    bool success;
    (success, out) = BLOCK_NUMBER_FROM_HEADER.staticcall(abi.encodePacked(header));
    require(success, "error calling getBlockNumberFromHeader precompile");
    return getUint256FromBytes(out, 0);
  }

  /**
   * @notice Computes hash of header.
   * @param header RLP encoded header
   * @return Header hash.
   */
  function hashHeader(bytes memory header) public view returns (bytes32) {
    bytes memory out;
    bool success;
    (success, out) = HASH_HEADER.staticcall(abi.encodePacked(header));
    require(success, "error calling hashHeader precompile");
    return getBytes32FromBytes(out, 0);
  }

  /**
   * @notice Gets the parent seal bitmap from the header at the given block number.
   * @param blockNumber Block number to retrieve. Must be within 4 epochs of the current number.
   * @return Bitmap parent seal with set bits at indices corresponding to signing validators.
   */
  function getParentSealBitmap(uint256 blockNumber) public view returns (bytes32) {
    bytes memory out;
    bool success;
    (success, out) = GET_PARENT_SEAL_BITMAP.staticcall(abi.encodePacked(blockNumber));
    require(success, "error calling getParentSealBitmap precompile");
    return getBytes32FromBytes(out, 0);
  }

  /**
   * @notice Verifies the BLS signature on the header and returns the seal bitmap.
   * The validator set used for verification is retrieved based on the parent hash field of the
   * header.  If the parent hash is not in the blockchain, verification fails.
   * @param header RLP encoded header
   * @return Bitmap parent seal with set bits at indices correspoinding to signing validators.
   */
  function getVerifiedSealBitmapFromHeader(bytes memory header) public view returns (bytes32) {
    bytes memory out;
    bool success;
    (success, out) = GET_VERIFIED_SEAL_BITMAP.staticcall(abi.encodePacked(header));
    require(success, "error calling getVerifiedSealBitmapFromHeader precompile");
    return getBytes32FromBytes(out, 0);
  }

  /**
   * @notice Converts bytes to uint256.
   * @param bs byte[] data
   * @param start offset into byte data to convert
   * @return uint256 data
   */
  function getUint256FromBytes(bytes memory bs, uint256 start) internal pure returns (uint256) {
    return uint256(getBytes32FromBytes(bs, start));
  }

  /**
   * @notice Converts bytes to bytes32.
   * @param bs byte[] data
   * @param start offset into byte data to convert
   * @return bytes32 data
   */
  function getBytes32FromBytes(bytes memory bs, uint256 start) internal pure returns (bytes32) {
    require(bs.length >= start.add(32), "slicing out of range");
    bytes32 x;
    assembly {
      x := mload(add(bs, add(start, 32)))
    }
    return x;
  }

  /**
   * @notice Returns the minimum number of required signers for a given block number.
   * @dev Computed in celo-blockchain as int(math.Ceil(float64(2*valSet.Size()) / 3))
   */
  function minQuorumSize(uint256 blockNumber) public view returns (uint256) {
    return numberValidatorsInSet(blockNumber).mul(2).add(2).div(3);
  }

  /**
   * @notice Computes byzantine quorum from current validator set size
   * @return Byzantine quorum of validators.
   */
  function minQuorumSizeInCurrentSet() public view returns (uint256) {
    return minQuorumSize(block.number);
  }

}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/UsingRegistry.sol

pragma solidity ^0.5.13;

import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";

import "./interfaces/IAccounts.sol";
import "./interfaces/IFeeCurrencyWhitelist.sol";
import "./interfaces/IFreezer.sol";
import "./interfaces/IRegistry.sol";

import "../governance/interfaces/IElection.sol";
import "../governance/interfaces/IGovernance.sol";
import "../governance/interfaces/ILockedGold.sol";
import "../governance/interfaces/IValidators.sol";

import "../identity/interfaces/IRandom.sol";
import "../identity/interfaces/IAttestations.sol";

import "../stability/interfaces/IExchange.sol";
import "../stability/interfaces/IReserve.sol";
import "../stability/interfaces/ISortedOracles.sol";
import "../stability/interfaces/IStableToken.sol";

contract UsingRegistry is Ownable {
  event RegistrySet(address indexed registryAddress);

  // solhint-disable state-visibility
  bytes32 constant ACCOUNTS_REGISTRY_ID = keccak256(abi.encodePacked("Accounts"));
  bytes32 constant ATTESTATIONS_REGISTRY_ID = keccak256(abi.encodePacked("Attestations"));
  bytes32 constant DOWNTIME_SLASHER_REGISTRY_ID = keccak256(abi.encodePacked("DowntimeSlasher"));
  bytes32 constant DOUBLE_SIGNING_SLASHER_REGISTRY_ID = keccak256(
    abi.encodePacked("DoubleSigningSlasher")
  );
  bytes32 constant ELECTION_REGISTRY_ID = keccak256(abi.encodePacked("Election"));
  bytes32 constant EXCHANGE_REGISTRY_ID = keccak256(abi.encodePacked("Exchange"));
  bytes32 constant FEE_CURRENCY_WHITELIST_REGISTRY_ID = keccak256(
    abi.encodePacked("FeeCurrencyWhitelist")
  );
  bytes32 constant FREEZER_REGISTRY_ID = keccak256(abi.encodePacked("Freezer"));
  bytes32 constant GOLD_TOKEN_REGISTRY_ID = keccak256(abi.encodePacked("GoldToken"));
  bytes32 constant GOVERNANCE_REGISTRY_ID = keccak256(abi.encodePacked("Governance"));
  bytes32 constant GOVERNANCE_SLASHER_REGISTRY_ID = keccak256(
    abi.encodePacked("GovernanceSlasher")
  );
  bytes32 constant LOCKED_GOLD_REGISTRY_ID = keccak256(abi.encodePacked("LockedGold"));
  bytes32 constant RESERVE_REGISTRY_ID = keccak256(abi.encodePacked("Reserve"));
  bytes32 constant RANDOM_REGISTRY_ID = keccak256(abi.encodePacked("Random"));
  bytes32 constant SORTED_ORACLES_REGISTRY_ID = keccak256(abi.encodePacked("SortedOracles"));
  bytes32 constant STABLE_TOKEN_REGISTRY_ID = keccak256(abi.encodePacked("StableToken"));
  bytes32 constant VALIDATORS_REGISTRY_ID = keccak256(abi.encodePacked("Validators"));
  // solhint-enable state-visibility

  IRegistry public registry;

  modifier onlyRegisteredContract(bytes32 identifierHash) {
    require(registry.getAddressForOrDie(identifierHash) == msg.sender, "only registered contract");
    _;
  }

  modifier onlyRegisteredContracts(bytes32[] memory identifierHashes) {
    require(registry.isOneOf(identifierHashes, msg.sender), "only registered contracts");
    _;
  }

  /**
   * @notice Updates the address pointing to a Registry contract.
   * @param registryAddress The address of a registry contract for routing to other contracts.
   */
  function setRegistry(address registryAddress) public onlyOwner {
    require(registryAddress != address(0), "Cannot register the null address");
    registry = IRegistry(registryAddress);
    emit RegistrySet(registryAddress);
  }

  function getAccounts() internal view returns (IAccounts) {
    return IAccounts(registry.getAddressForOrDie(ACCOUNTS_REGISTRY_ID));
  }

  function getAttestations() internal view returns (IAttestations) {
    return IAttestations(registry.getAddressForOrDie(ATTESTATIONS_REGISTRY_ID));
  }

  function getElection() internal view returns (IElection) {
    return IElection(registry.getAddressForOrDie(ELECTION_REGISTRY_ID));
  }

  function getExchange() internal view returns (IExchange) {
    return IExchange(registry.getAddressForOrDie(EXCHANGE_REGISTRY_ID));
  }

  function getFeeCurrencyWhitelistRegistry() internal view returns (IFeeCurrencyWhitelist) {
    return IFeeCurrencyWhitelist(registry.getAddressForOrDie(FEE_CURRENCY_WHITELIST_REGISTRY_ID));
  }

  function getFreezer() internal view returns (IFreezer) {
    return IFreezer(registry.getAddressForOrDie(FREEZER_REGISTRY_ID));
  }

  function getGoldToken() internal view returns (IERC20) {
    return IERC20(registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID));
  }

  function getGovernance() internal view returns (IGovernance) {
    return IGovernance(registry.getAddressForOrDie(GOVERNANCE_REGISTRY_ID));
  }

  function getLockedGold() internal view returns (ILockedGold) {
    return ILockedGold(registry.getAddressForOrDie(LOCKED_GOLD_REGISTRY_ID));
  }

  function getRandom() internal view returns (IRandom) {
    return IRandom(registry.getAddressForOrDie(RANDOM_REGISTRY_ID));
  }

  function getReserve() internal view returns (IReserve) {
    return IReserve(registry.getAddressForOrDie(RESERVE_REGISTRY_ID));
  }

  function getSortedOracles() internal view returns (ISortedOracles) {
    return ISortedOracles(registry.getAddressForOrDie(SORTED_ORACLES_REGISTRY_ID));
  }

  function getStableToken() internal view returns (IStableToken) {
    return IStableToken(registry.getAddressForOrDie(STABLE_TOKEN_REGISTRY_ID));
  }

  function getValidators() internal view returns (IValidators) {
    return IValidators(registry.getAddressForOrDie(VALIDATORS_REGISTRY_ID));
  }
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IAccounts.sol

pragma solidity ^0.5.13;

interface IAccounts {
  function isAccount(address) external view returns (bool);
  function voteSignerToAccount(address) external view returns (address);
  function validatorSignerToAccount(address) external view returns (address);
  function attestationSignerToAccount(address) external view returns (address);
  function signerToAccount(address) external view returns (address);
  function getAttestationSigner(address) external view returns (address);
  function getValidatorSigner(address) external view returns (address);
  function getVoteSigner(address) external view returns (address);
  function hasAuthorizedVoteSigner(address) external view returns (bool);
  function hasAuthorizedValidatorSigner(address) external view returns (bool);
  function hasAuthorizedAttestationSigner(address) external view returns (bool);

  function setAccountDataEncryptionKey(bytes calldata) external;
  function setMetadataURL(string calldata) external;
  function setName(string calldata) external;
  function setWalletAddress(address, uint8, bytes32, bytes32) external;
  function setAccount(string calldata, bytes calldata, address, uint8, bytes32, bytes32) external;

  function getDataEncryptionKey(address) external view returns (bytes memory);
  function getWalletAddress(address) external view returns (address);
  function getMetadataURL(address) external view returns (string memory);
  function batchGetMetadataURL(address[] calldata)
    external
    view
    returns (uint256[] memory, bytes memory);
  function getName(address) external view returns (string memory);

  function authorizeVoteSigner(address, uint8, bytes32, bytes32) external;
  function authorizeValidatorSigner(address, uint8, bytes32, bytes32) external;
  function authorizeValidatorSignerWithPublicKey(address, uint8, bytes32, bytes32, bytes calldata)
    external;
  function authorizeValidatorSignerWithKeys(
    address,
    uint8,
    bytes32,
    bytes32,
    bytes calldata,
    bytes calldata,
    bytes calldata
  ) external;
  function authorizeAttestationSigner(address, uint8, bytes32, bytes32) external;
  function createAccount() external returns (bool);

  function setPaymentDelegation(address, uint256) external;
  function getPaymentDelegation(address) external view returns (address, uint256);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/ICeloVersionedContract.sol

pragma solidity ^0.5.13;

interface ICeloVersionedContract {
  /**
   * @notice Returns the storage, major, minor, and patch version of the contract.
   * @return The storage, major, minor, and patch version of the contract.
   */
  function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IFeeCurrencyWhitelist.sol

pragma solidity ^0.5.13;

interface IFeeCurrencyWhitelist {
  function addToken(address) external;
  function getWhitelist() external view returns (address[] memory);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IFreezer.sol

pragma solidity ^0.5.13;

interface IFreezer {
  function isFrozen(address) external view returns (bool);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IRegistry.sol

pragma solidity ^0.5.13;

interface IRegistry {
  function setAddressFor(string calldata, address) external;
  function getAddressForOrDie(bytes32) external view returns (address);
  function getAddressFor(bytes32) external view returns (address);
  function getAddressForStringOrDie(string calldata identifier) external view returns (address);
  function getAddressForString(string calldata identifier) external view returns (address);
  function isOneOf(bytes32[] calldata, address) external view returns (bool);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/libraries/ReentrancyGuard.sol

pragma solidity ^0.5.13;

/**
 * @title Helps contracts guard against reentrancy attacks.
 * @author Remco Bloemen <remco@2π.com>, Eenae <alexey@mixbytes.io>
 * @dev If you mark a function `nonReentrant`, you should also
 * mark it `external`.
 */
contract ReentrancyGuard {
  /// @dev counter to allow mutex lock with only one SSTORE operation
  uint256 private _guardCounter;

  constructor() internal {
    // The counter starts at one to prevent changing it from zero to a non-zero
    // value, which is a more expensive operation.
    _guardCounter = 1;
  }

  /**
   * @dev Prevents a contract from calling itself, directly or indirectly.
   * Calling a `nonReentrant` function from another `nonReentrant`
   * function is not supported. It is possible to prevent this from happening
   * by making the `nonReentrant` function external, and make it call a
   * `private` function that does the actual work.
   */
  modifier nonReentrant() {
    _guardCounter += 1;
    uint256 localCounter = _guardCounter;
    _;
    require(localCounter == _guardCounter, "reentrant call");
  }
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/IElection.sol

pragma solidity ^0.5.13;

interface IElection {
  function electValidatorSigners() external view returns (address[] memory);
  function electNValidatorSigners(uint256, uint256) external view returns (address[] memory);
  function vote(address, uint256, address, address) external returns (bool);
  function activate(address) external returns (bool);
  function revokeActive(address, uint256, address, address, uint256) external returns (bool);
  function revokeAllActive(address, address, address, uint256) external returns (bool);
  function revokePending(address, uint256, address, address, uint256) external returns (bool);
  function markGroupIneligible(address) external;
  function markGroupEligible(address, address, address) external;
  function forceDecrementVotes(
    address,
    uint256,
    address[] calldata,
    address[] calldata,
    uint256[] calldata
  ) external returns (uint256);

  // view functions
  function getElectableValidators() external view returns (uint256, uint256);
  function getElectabilityThreshold() external view returns (uint256);
  function getNumVotesReceivable(address) external view returns (uint256);
  function getTotalVotes() external view returns (uint256);
  function getActiveVotes() external view returns (uint256);
  function getTotalVotesByAccount(address) external view returns (uint256);
  function getPendingVotesForGroupByAccount(address, address) external view returns (uint256);
  function getActiveVotesForGroupByAccount(address, address) external view returns (uint256);
  function getTotalVotesForGroupByAccount(address, address) external view returns (uint256);
  function getActiveVoteUnitsForGroupByAccount(address, address) external view returns (uint256);
  function getTotalVotesForGroup(address) external view returns (uint256);
  function getActiveVotesForGroup(address) external view returns (uint256);
  function getPendingVotesForGroup(address) external view returns (uint256);
  function getGroupEligibility(address) external view returns (bool);
  function getGroupEpochRewards(address, uint256, uint256[] calldata)
    external
    view
    returns (uint256);
  function getGroupsVotedForByAccount(address) external view returns (address[] memory);
  function getEligibleValidatorGroups() external view returns (address[] memory);
  function getTotalVotesForEligibleValidatorGroups()
    external
    view
    returns (address[] memory, uint256[] memory);
  function getCurrentValidatorSigners() external view returns (address[] memory);
  function canReceiveVotes(address, uint256) external view returns (bool);
  function hasActivatablePendingVotes(address, address) external view returns (bool);

  // only owner
  function setElectableValidators(uint256, uint256) external returns (bool);
  function setMaxNumGroupsVotedFor(uint256) external returns (bool);
  function setElectabilityThreshold(uint256) external returns (bool);

  // only VM
  function distributeEpochRewards(address, uint256, address, address) external;
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/IGovernance.sol

pragma solidity ^0.5.13;

interface IGovernance {
  function isVoting(address) external view returns (bool);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/ILockedGold.sol

pragma solidity ^0.5.13;

interface ILockedGold {
  function incrementNonvotingAccountBalance(address, uint256) external;
  function decrementNonvotingAccountBalance(address, uint256) external;
  function getAccountTotalLockedGold(address) external view returns (uint256);
  function getTotalLockedGold() external view returns (uint256);
  function getPendingWithdrawals(address)
    external
    view
    returns (uint256[] memory, uint256[] memory);
  function getTotalPendingWithdrawals(address) external view returns (uint256);
  function lock() external payable;
  function unlock(uint256) external;
  function relock(uint256, uint256) external;
  function withdraw(uint256) external;
  function slash(
    address account,
    uint256 penalty,
    address reporter,
    uint256 reward,
    address[] calldata lessers,
    address[] calldata greaters,
    uint256[] calldata indices
  ) external;
  function isSlasher(address) external view returns (bool);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/IValidators.sol

pragma solidity ^0.5.13;

interface IValidators {
  function registerValidator(bytes calldata, bytes calldata, bytes calldata)
    external
    returns (bool);
  function deregisterValidator(uint256) external returns (bool);
  function affiliate(address) external returns (bool);
  function deaffiliate() external returns (bool);
  function updateBlsPublicKey(bytes calldata, bytes calldata) external returns (bool);
  function registerValidatorGroup(uint256) external returns (bool);
  function deregisterValidatorGroup(uint256) external returns (bool);
  function addMember(address) external returns (bool);
  function addFirstMember(address, address, address) external returns (bool);
  function removeMember(address) external returns (bool);
  function reorderMember(address, address, address) external returns (bool);
  function updateCommission() external;
  function setNextCommissionUpdate(uint256) external;
  function resetSlashingMultiplier() external;

  // only owner
  function setCommissionUpdateDelay(uint256) external;
  function setMaxGroupSize(uint256) external returns (bool);
  function setMembershipHistoryLength(uint256) external returns (bool);
  function setValidatorScoreParameters(uint256, uint256) external returns (bool);
  function setGroupLockedGoldRequirements(uint256, uint256) external returns (bool);
  function setValidatorLockedGoldRequirements(uint256, uint256) external returns (bool);
  function setSlashingMultiplierResetPeriod(uint256) external;

  // view functions
  function getMaxGroupSize() external view returns (uint256);
  function getCommissionUpdateDelay() external view returns (uint256);
  function getValidatorScoreParameters() external view returns (uint256, uint256);
  function getMembershipHistory(address)
    external
    view
    returns (uint256[] memory, address[] memory, uint256, uint256);
  function calculateEpochScore(uint256) external view returns (uint256);
  function calculateGroupEpochScore(uint256[] calldata) external view returns (uint256);
  function getAccountLockedGoldRequirement(address) external view returns (uint256);
  function meetsAccountLockedGoldRequirements(address) external view returns (bool);
  function getValidatorBlsPublicKeyFromSigner(address) external view returns (bytes memory);
  function getValidator(address account)
    external
    view
    returns (bytes memory, bytes memory, address, uint256, address);
  function getValidatorGroup(address)
    external
    view
    returns (address[] memory, uint256, uint256, uint256, uint256[] memory, uint256, uint256);
  function getGroupNumMembers(address) external view returns (uint256);
  function getTopGroupValidators(address, uint256) external view returns (address[] memory);
  function getGroupsNumMembers(address[] calldata accounts)
    external
    view
    returns (uint256[] memory);
  function getNumRegisteredValidators() external view returns (uint256);
  function groupMembershipInEpoch(address, uint256, uint256) external view returns (address);

  // only registered contract
  function updateEcdsaPublicKey(address, address, bytes calldata) external returns (bool);
  function updatePublicKeys(address, address, bytes calldata, bytes calldata, bytes calldata)
    external
    returns (bool);
  function getValidatorLockedGoldRequirements() external view returns (uint256, uint256);
  function getGroupLockedGoldRequirements() external view returns (uint256, uint256);
  function getRegisteredValidators() external view returns (address[] memory);
  function getRegisteredValidatorSigners() external view returns (address[] memory);
  function getRegisteredValidatorGroups() external view returns (address[] memory);
  function isValidatorGroup(address) external view returns (bool);
  function isValidator(address) external view returns (bool);
  function getValidatorGroupSlashingMultiplier(address) external view returns (uint256);
  function getMembershipInLastEpoch(address) external view returns (address);
  function getMembershipInLastEpochFromSigner(address) external view returns (address);

  // only VM
  function updateValidatorScoreFromSigner(address, uint256) external;
  function distributeEpochPaymentsFromSigner(address, uint256) external returns (uint256);

  // only slasher
  function forceDeaffiliateIfValidator(address) external;
  function halveSlashingMultiplier(address) external;

}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/identity/interfaces/IAttestations.sol

pragma solidity ^0.5.13;

interface IAttestations {
  function request(bytes32, uint256, address) external;
  function selectIssuers(bytes32) external;
  function complete(bytes32, uint8, bytes32, bytes32) external;
  function revoke(bytes32, uint256) external;
  function withdraw(address) external;
  function approveTransfer(bytes32, uint256, address, address, bool) external;

  // view functions
  function getUnselectedRequest(bytes32, address) external view returns (uint32, uint32, address);
  function getAttestationIssuers(bytes32, address) external view returns (address[] memory);
  function getAttestationStats(bytes32, address) external view returns (uint32, uint32);
  function batchGetAttestationStats(bytes32[] calldata)
    external
    view
    returns (uint256[] memory, address[] memory, uint64[] memory, uint64[] memory);
  function getAttestationState(bytes32, address, address)
    external
    view
    returns (uint8, uint32, address);
  function getCompletableAttestations(bytes32, address)
    external
    view
    returns (uint32[] memory, address[] memory, uint256[] memory, bytes memory);
  function getAttestationRequestFee(address) external view returns (uint256);
  function getMaxAttestations() external view returns (uint256);
  function validateAttestationCode(bytes32, address, uint8, bytes32, bytes32)
    external
    view
    returns (address);
  function lookupAccountsForIdentifier(bytes32) external view returns (address[] memory);
  function requireNAttestationsRequested(bytes32, address, uint32) external view;

  // only owner
  function setAttestationRequestFee(address, uint256) external;
  function setAttestationExpiryBlocks(uint256) external;
  function setSelectIssuersWaitBlocks(uint256) external;
  function setMaxAttestations(uint256) external;
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/identity/interfaces/IRandom.sol

pragma solidity ^0.5.13;

interface IRandom {
  function revealAndCommit(bytes32, bytes32, address) external;
  function randomnessBlockRetentionWindow() external view returns (uint256);
  function random() external view returns (bytes32);
  function getBlockRandomness(uint256) external view returns (bytes32);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/IExchange.sol

pragma solidity ^0.5.13;

interface IExchange {
  function buy(uint256, uint256, bool) external returns (uint256);
  function sell(uint256, uint256, bool) external returns (uint256);
  function exchange(uint256, uint256, bool) external returns (uint256);
  function setUpdateFrequency(uint256) external;
  function getBuyTokenAmount(uint256, bool) external view returns (uint256);
  function getSellTokenAmount(uint256, bool) external view returns (uint256);
  function getBuyAndSellBuckets(bool) external view returns (uint256, uint256);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/IReserve.sol

pragma solidity ^0.5.13;

interface IReserve {
  function setTobinTaxStalenessThreshold(uint256) external;
  function addToken(address) external returns (bool);
  function removeToken(address, uint256) external returns (bool);
  function transferGold(address payable, uint256) external returns (bool);
  function transferExchangeGold(address payable, uint256) external returns (bool);
  function getReserveGoldBalance() external view returns (uint256);
  function getUnfrozenReserveGoldBalance() external view returns (uint256);
  function getOrComputeTobinTax() external returns (uint256, uint256);
  function getTokens() external view returns (address[] memory);
  function getReserveRatio() external view returns (uint256);
  function addExchangeSpender(address) external;
  function removeExchangeSpender(address, uint256) external;
  function addSpender(address) external;
  function removeSpender(address) external;
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/ISortedOracles.sol

pragma solidity ^0.5.13;

interface ISortedOracles {
  function addOracle(address, address) external;
  function removeOracle(address, address, uint256) external;
  function report(address, uint256, address, address) external;
  function removeExpiredReports(address, uint256) external;
  function isOldestReportExpired(address token) external view returns (bool, address);
  function numRates(address) external view returns (uint256);
  function medianRate(address) external view returns (uint256, uint256);
  function numTimestamps(address) external view returns (uint256);
  function medianTimestamp(address) external view returns (uint256);
}
          

/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/IStableToken.sol

pragma solidity ^0.5.13;

/**
 * @title This interface describes the functions specific to Celo Stable Tokens, and in the
 * absence of interface inheritance is intended as a companion to IERC20.sol and ICeloToken.sol.
 */
interface IStableToken {
  function mint(address, uint256) external returns (bool);
  function burn(uint256) external returns (bool);
  function setInflationParameters(uint256, uint256) external;
  function valueToUnits(uint256) external view returns (uint256);
  function unitsToValue(uint256) external view returns (uint256);
  function getInflationParameters() external view returns (uint256, uint256, uint256, uint256);

  // NOTE: duplicated with IERC20.sol, remove once interface inheritance is supported.
  function balanceOf(address) external view returns (uint256);
}
          

/openzeppelin-solidity/contracts/GSN/Context.sol

pragma solidity ^0.5.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 GSN 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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}
          

/openzeppelin-solidity/contracts/cryptography/ECDSA.sol

pragma solidity ^0.5.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * NOTE: This call _does not revert_ if the signature is invalid, or
     * if the signer is otherwise unable to be retrieved. In those scenarios,
     * the zero address is returned.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        if (signature.length != 65) {
            return (address(0));
        }

        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }

        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return address(0);
        }

        if (v != 27 && v != 28) {
            return address(0);
        }

        // If the signature is valid (and not malleable), return the signer address
        return ecrecover(hash, v, r, s);
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * replicates the behavior of the
     * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
     * JSON-RPC method.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }
}
          

/openzeppelin-solidity/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}
          

/openzeppelin-solidity/contracts/ownership/Ownable.sol

pragma solidity ^0.5.0;

import "../GSN/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.
 *
 * 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.
 */
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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _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 onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}
          

/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol

pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
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);
}
          

/openzeppelin-solidity/contracts/utils/SafeCast.sol

pragma solidity ^0.5.0;


/**
 * @dev Wrappers over Solidity's uintXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and then downcasting.
 *
 * _Available since v2.5.0._
 */
library SafeCast {

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value < 2**128, "SafeCast: value doesn\'t fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value < 2**64, "SafeCast: value doesn\'t fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value < 2**32, "SafeCast: value doesn\'t fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value < 2**16, "SafeCast: value doesn\'t fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value < 2**8, "SafeCast: value doesn\'t fit in 8 bits");
        return uint8(value);
    }
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"bool","name":"test","internalType":"bool"}]},{"type":"event","name":"AttestationCompleted","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"issuer","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"AttestationExpiryBlocksSet","inputs":[{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"AttestationIssuerSelected","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"issuer","internalType":"address","indexed":true},{"type":"address","name":"attestationRequestFeeToken","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"AttestationRequestFeeSet","inputs":[{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"AttestationsRequested","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"attestationsRequested","internalType":"uint256","indexed":false},{"type":"address","name":"attestationRequestFeeToken","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"AttestationsTransferred","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32","indexed":true},{"type":"address","name":"fromAccount","internalType":"address","indexed":true},{"type":"address","name":"toAccount","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"MaxAttestationsSet","inputs":[{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RegistrySet","inputs":[{"type":"address","name":"registryAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SelectIssuersWaitBlocksSet","inputs":[{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TransferApproval","inputs":[{"type":"address","name":"approver","internalType":"address","indexed":true},{"type":"bytes32","name":"indentifier","internalType":"bytes32","indexed":true},{"type":"address","name":"from","internalType":"address","indexed":false},{"type":"address","name":"to","internalType":"address","indexed":false},{"type":"bool","name":"approved","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"Withdrawal","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"approveTransfer","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"uint256","name":"index","internalType":"uint256"},{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"bool","name":"status","internalType":"bool"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"attestationExpiryBlocks","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"attestationRequestFees","inputs":[{"type":"address","name":"","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"},{"type":"address[]","name":"","internalType":"address[]"},{"type":"uint64[]","name":"","internalType":"uint64[]"},{"type":"uint64[]","name":"","internalType":"uint64[]"}],"name":"batchGetAttestationStats","inputs":[{"type":"bytes32[]","name":"identifiersToLookup","internalType":"bytes32[]"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"checkProofOfPossession","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"bytes","name":"blsKey","internalType":"bytes"},{"type":"bytes","name":"blsPop","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"complete","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"fractionMulExp","inputs":[{"type":"uint256","name":"aNumerator","internalType":"uint256"},{"type":"uint256","name":"aDenominator","internalType":"uint256"},{"type":"uint256","name":"bNumerator","internalType":"uint256"},{"type":"uint256","name":"bDenominator","internalType":"uint256"},{"type":"uint256","name":"exponent","internalType":"uint256"},{"type":"uint256","name":"_decimals","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getAttestationIssuers","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAttestationRequestFee","inputs":[{"type":"address","name":"token","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint8","name":"","internalType":"uint8"},{"type":"uint32","name":"","internalType":"uint32"},{"type":"address","name":"","internalType":"address"}],"name":"getAttestationState","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"},{"type":"address","name":"issuer","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint32","name":"","internalType":"uint32"},{"type":"uint32","name":"","internalType":"uint32"}],"name":"getAttestationStats","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBlockNumberFromHeader","inputs":[{"type":"bytes","name":"header","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint32[]","name":"","internalType":"uint32[]"},{"type":"address[]","name":"","internalType":"address[]"},{"type":"uint256[]","name":"","internalType":"uint256[]"},{"type":"bytes","name":"","internalType":"bytes"}],"name":"getCompletableAttestations","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getEpochNumber","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getEpochNumberOfBlock","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getEpochSize","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMaxAttestations","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getParentSealBitmap","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint32","name":"","internalType":"uint32"},{"type":"uint32","name":"","internalType":"uint32"},{"type":"address","name":"","internalType":"address"}],"name":"getUnselectedRequest","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getVerifiedSealBitmapFromHeader","inputs":[{"type":"bytes","name":"header","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getVersionNumber","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"hashHeader","inputs":[{"type":"bytes","name":"header","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"initialize","inputs":[{"type":"address","name":"registryAddress","internalType":"address"},{"type":"uint256","name":"_attestationExpiryBlocks","internalType":"uint256"},{"type":"uint256","name":"_selectIssuersWaitBlocks","internalType":"uint256"},{"type":"uint256","name":"_maxAttestations","internalType":"uint256"},{"type":"address[]","name":"attestationRequestFeeTokens","internalType":"address[]"},{"type":"uint256[]","name":"attestationRequestFeeValues","internalType":"uint256[]"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"initialized","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOwner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"lookupAccountsForIdentifier","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxAttestations","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minQuorumSize","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minQuorumSizeInCurrentSet","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"numberValidatorsInCurrentSet","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"numberValidatorsInSet","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingWithdrawals","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"contract IRegistry"}],"name":"registry","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"renounceOwnership","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"request","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"uint256","name":"attestationsRequested","internalType":"uint256"},{"type":"address","name":"attestationRequestFeeToken","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[],"name":"requireNAttestationsRequested","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"},{"type":"uint32","name":"expected","internalType":"uint32"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"revoke","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"selectIssuers","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"selectIssuersWaitBlocks","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setAttestationExpiryBlocks","inputs":[{"type":"uint256","name":"_attestationExpiryBlocks","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setAttestationRequestFee","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"fee","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setMaxAttestations","inputs":[{"type":"uint256","name":"_maxAttestations","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setRegistry","inputs":[{"type":"address","name":"registryAddress","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setSelectIssuersWaitBlocks","inputs":[{"type":"uint256","name":"_selectIssuersWaitBlocks","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferApprovals","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"bytes32","name":"","internalType":"bytes32"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"validateAttestationCode","inputs":[{"type":"bytes32","name":"identifier","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"validatorSignerAddressFromCurrentSet","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"validatorSignerAddressFromSet","inputs":[{"type":"uint256","name":"index","internalType":"uint256"},{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"withdraw","inputs":[{"type":"address","name":"token","internalType":"address"}],"constant":false}]
              

Contract Creation Code

Verify & Publish
0x60806040523480156200001157600080fd5b506040516200838338038062008383833981810160405260208110156200003757600080fd5b81019080805190602001909291905050508060006200005b6200012b60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350806200011b576001600060146101000a81548160ff0219169083151502179055505b5060016002819055505062000133565b600033905090565b61824080620001436000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c80638f32d59b1161019d578063d02e0f0c116100e9578063e831be58116100a2578063f3ff26c61161007c578063f3ff26c6146116ba578063fae8db0a14611708578063fb6a2e531461174a578063fd536f5d14611799576102f1565b8063e831be5814611583578063ec683072146115fb578063f2fde38b14611676576102f1565b8063d02e0f0c146113bb578063df4da46114611413578063e02659ce14611431578063e221932e1461145f578063e3d0f66f1461148d578063e50e652d14611541576102f1565b8063a91ee0dc11610156578063bb46942f11610130578063bb46942f14611279578063bd93f998146112b1578063be2c47a614611309578063c8e74d7314611337576102f1565b8063a91ee0dc14611149578063b45eb7da1461118d578063b5599cc6146111ab576102f1565b80638f32d59b14610e9557806396357c0a14610eb75780639a7b3be71461105d5780639b2b592f1461107b578063a6437e73146110bd578063a762825a146110eb576102f1565b80635fc5c9161161025c5780637b1039991161021557806387ee8a0f116101ef57806387ee8a0f14610d4057806389d3528614610d5e5780638a88362614610d7c5780638da5cb5b14610e4b576102f1565b80637b10399914610c725780638218c6fe14610cbc57806384a1a4fc14610cda576102f1565b80635fc5c91614610a62578063623d593114610b0557806367960e9114610b5d578063715018a614610c2c5780637385e5da14610c365780637796a68414610c54576102f1565b80634eef7e85116102ae5780634eef7e85146106a457806351cff8d91461084357806354255be014610887578063596abea5146108ba5780635ce9bc071461093b5780635d180adb146109ea576102f1565b806303cc1aff146102f6578063123633ea14610379578063158ef93e146103e757806323f0ab65146104095780633b1eb4bf146105935780634b2c2f44146105d5575b600080fd5b6103226004803603602081101561030c57600080fd5b81019080803590602001909291905050506118a5565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561036557808201518184015260208101905061034a565b505050509050019250505060405180910390f35b6103a56004803603602081101561038f57600080fd5b8101908080359060200190929190505050611949565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ef611a9a565b604051808215151515815260200191505060405180910390f35b6105796004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561045c57600080fd5b82018360208201111561046e57600080fd5b8035906020019184600183028401116401000000008311171561049057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156104f357600080fd5b82018360208201111561050557600080fd5b8035906020019184600183028401116401000000008311171561052757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611aad565b604051808215151515815260200191505060405180910390f35b6105bf600480360360208110156105a957600080fd5b8101908080359060200190929190505050611c66565b6040518082815260200191505060405180910390f35b61068e600480360360208110156105eb57600080fd5b810190808035906020019064010000000081111561060857600080fd5b82018360208201111561061a57600080fd5b8035906020019184600183028401116401000000008311171561063c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611c80565b6040518082815260200191505060405180910390f35b6106f0600480360360408110156106ba57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e14565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b8381101561073f578082015181840152602081019050610724565b50505050905001858103845288818151815260200191508051906020019060200280838360005b83811015610781578082015181840152602081019050610766565b50505050905001858103835287818151815260200191508051906020019060200280838360005b838110156107c35780820151818401526020810190506107a8565b50505050905001858103825286818151815260200191508051906020019080838360005b838110156108025780820151818401526020810190506107e7565b50505050905090810190601f16801561082f5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b6108856004803603602081101561085957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506123f8565b005b61088f6127d2565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610906600480360360408110156108d057600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506127f9565b604051808363ffffffff1663ffffffff1681526020018263ffffffff1663ffffffff1681526020019250505060405180910390f35b6109a8600480360360a081101561095157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff16906020019092919080359060200190929190803590602001909291905050506128d5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a2060048036036040811015610a0057600080fd5b810190808035906020019092919080359060200190929190505050612c5e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae60048036036040811015610a7857600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612db0565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610af1578082015181840152602081019050610ad6565b505050509050019250505060405180910390f35b610b4760048036036020811015610b1b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e95565b6040518082815260200191505060405180910390f35b610c1660048036036020811015610b7357600080fd5b8101908080359060200190640100000000811115610b9057600080fd5b820183602082011115610ba257600080fd5b80359060200191846001830284011164010000000083111715610bc457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612ede565b6040518082815260200191505060405180910390f35b610c34613072565b005b610c3e6131ab565b6040518082815260200191505060405180910390f35b610c5c6131bb565b6040518082815260200191505060405180910390f35b610c7a6131c5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610cc46131eb565b6040518082815260200191505060405180910390f35b610d2660048036036040811015610cf057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506131f1565b604051808215151515815260200191505060405180910390f35b610d48613220565b6040518082815260200191505060405180910390f35b610d66613367565b6040518082815260200191505060405180910390f35b610e3560048036036020811015610d9257600080fd5b8101908080359060200190640100000000811115610daf57600080fd5b820183602082011115610dc157600080fd5b80359060200191846001830284011164010000000083111715610de357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061336d565b6040518082815260200191505060405180910390f35b610e53613501565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e9d61352a565b604051808215151515815260200191505060405180910390f35b610f2e60048036036020811015610ecd57600080fd5b8101908080359060200190640100000000811115610eea57600080fd5b820183602082011115610efc57600080fd5b80359060200191846020830284011164010000000083111715610f1e57600080fd5b9091929391929390505050613588565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b83811015610f7d578082015181840152602081019050610f62565b50505050905001858103845288818151815260200191508051906020019060200280838360005b83811015610fbf578082015181840152602081019050610fa4565b50505050905001858103835287818151815260200191508051906020019060200280838360005b83811015611001578082015181840152602081019050610fe6565b50505050905001858103825286818151815260200191508051906020019060200280838360005b83811015611043578082015181840152602081019050611028565b505050509050019850505050505050505060405180910390f35b611065613a92565b6040518082815260200191505060405180910390f35b6110a76004803603602081101561109157600080fd5b8101908080359060200190929190505050613aa2565b6040518082815260200191505060405180910390f35b6110e9600480360360208110156110d357600080fd5b8101908080359060200190929190505050613beb565b005b6111476004803603606081101561110157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803563ffffffff169060200190929190505050613cff565b005b61118b6004803603602081101561115f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613dd4565b005b611195613f78565b6040518082815260200191505060405180910390f35b611217600480360360608110156111c157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613f7e565b604051808460ff1660ff1681526020018363ffffffff1663ffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b6112af6004803603604081101561128f57600080fd5b810190808035906020019092919080359060200190929190505050614080565b005b6112f3600480360360208110156112c757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614394565b6040518082815260200191505060405180910390f35b6113356004803603602081101561131f57600080fd5b81019080803590602001909291905050506143ac565b005b6113b9600480360360a081101561134d57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291905050506144c0565b005b611411600480360360608110156113d157600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614865565b005b61141b61504c565b6040518082815260200191505060405180910390f35b61145d6004803603602081101561144757600080fd5b8101908080359060200190929190505050615188565b005b61148b6004803603602081101561147557600080fd5b810190808035906020019092919050505061529c565b005b6114d9600480360360408110156114a357600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506154bf565b604051808463ffffffff1663ffffffff1681526020018363ffffffff1663ffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b61156d6004803603602081101561155757600080fd5b8101908080359060200190929190505050615616565b6040518082815260200191505060405180910390f35b6115e56004803603604081101561159957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615661565b6040518082815260200191505060405180910390f35b611659600480360360c081101561161157600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050615686565b604051808381526020018281526020019250505060405180910390f35b6116b86004803603602081101561168c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061589a565b005b611706600480360360408110156116d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050615920565b005b6117346004803603602081101561171e57600080fd5b8101908080359060200190929190505050615a89565b6040518082815260200191505060405180910390f35b6117976004803603608081101561176057600080fd5b8101908080359060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050615bd2565b005b6118a3600480360360c08110156117af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561180a57600080fd5b82018360208201111561181c57600080fd5b8035906020019184602083028401116401000000008311171561183e57600080fd5b90919293919293908035906020019064010000000081111561185f57600080fd5b82018360208201111561187157600080fd5b8035906020019184602083028401116401000000008311171561189357600080fd5b9091929391929390505050616101565b005b60606003600083815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561193d57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116118f3575b50505050509050919050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106119c2578051825260208201915060208101905060208303925061199f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611a22576040519150601f19603f3d011682016040523d82523d6000602084013e611a27565b606091505b50809350819250505080611a86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180617f34603d913960400191505060405180910390fd5b611a918260006162b4565b92505050919050565b600060149054906101000a900460ff1681565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b60208310611b365780518252602082019150602081019050602083039250611b13565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310611b875780518252602082019150602081019050602083039250611b64565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b60208310611bf05780518252602082019150602081019050602083039250611bcd565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611c50576040519150601f19603f3d011682016040523d82523d6000602084013e611c55565b606091505b505080915050809150509392505050565b6000611c7982611c7461504c565b6162cb565b9050919050565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310611cd55780518252602082019150602081019050602083039250611cb2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310611d3c5780518252602082019150602081019050602083039250611d19565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611d9c576040519150601f19603f3d011682016040523d82523d6000602084013e611da1565b606091505b50809350819250505080611e00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180617e996038913960400191505060405180910390fd5b611e0b826000616313565b92505050919050565b60608060608060006003600088815260200190815260200160002060010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816001019050600080905060008090505b8280549050811015611f4657611f0f846002016000858481548110611ea557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206163b4565b15611f2b57611f2860018361640e90919063ffffffff16565b91505b611f3f60018261640e90919063ffffffff16565b9050611e84565b50606081604051908082528060200260200182016040528015611f785781602001602082028038833980820191505090505b509050606082604051908082528060200260200182016040528015611fac5781602001602082028038833980820191505090505b509050600080905060008090505b85805490508110156121aa57612045876002016000888481548110611fdb57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206163b4565b1561218f5786600201600087838154811061205c57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900463ffffffff168483815181106120e157fe5b602002602001019063ffffffff16908163ffffffff168152505085818154811061210757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683838151811061213e57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061218c60018361640e90919063ffffffff16565b91505b6121a360018261640e90919063ffffffff16565b9050611fba565b506060806121b6616496565b73ffffffffffffffffffffffffffffffffffffffff16638adaf96f856040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015612224578082015181840152602081019050612209565b505050509050019250505060006040518083038186803b15801561224757600080fd5b505afa15801561225b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250604081101561228557600080fd5b81019080805160405193929190846401000000008211156122a557600080fd5b838201915060208201858111156122bb57600080fd5b82518660208202830111640100000000821117156122d857600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561230f5780820151818401526020810190506122f4565b505050509050016040526020018051604051939291908464010000000082111561233857600080fd5b8382019150602082018581111561234e57600080fd5b825186600182028301116401000000008211171561236b57600080fd5b8083526020830192505050908051906020019080838360005b8381101561239f578082015181840152602081019050612384565b50505050905090810190601f1680156123cc5780820380516001836020036101000a031916815260200191505b506040525050508092508193505050848483839b509b509b509b50505050505050505092959194509250565b6000612402616496565b73ffffffffffffffffffffffffffffffffffffffff16637b2434cb336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561247e57600080fd5b505afa158015612492573d6000803e3d6000fd5b505050506040513d60208110156124a857600080fd5b810190808051906020019092919050505090506000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081116125b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f76616c756520776173206e656761746976652f7a65726f00000000000000000081525060200191505060405180910390fd5b6000600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b505050506040513d60208110156126e557600080fd5b8101908080519060200190929190505050612768576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f746f6b656e207472616e73666572206661696c6564000000000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b6398836040518082815260200191505060405180910390a3505050565b60008060008060018060016002839350829250819150809050935093509350935090919293565b6000806003600085815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160049054906101000a900463ffffffff166003600086815260200190815260200160002060010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff16915091509250929050565b6000808686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014019250505060405160208183030381529060405280519060200120905060007369baecd458e7c08b13a18e11887dbb078fb3cbb463b3abdb0c838888886040518563ffffffff1660e01b8152600401808581526020018460ff1660ff16815260200183815260200182815260200194505050505060206040518083038186803b1580156129a757600080fd5b505af41580156129bb573d6000803e3d6000fd5b505050506040513d60208110156129d157600080fd5b8101908080519060200190929190505050905060006129ee616496565b73ffffffffffffffffffffffffffffffffffffffff16637b2434cb836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a6a57600080fd5b505afa158015612a7e573d6000803e3d6000fd5b505050506040513d6020811015612a9457600080fd5b810190808051906020019092919050505090506000600360008b815260200190815260200160002060010160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060016002811115612b4b57fe5b8160000160009054906101000a900460ff166002811115612b6857fe5b14612bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180617fa6603b913960400191505060405180910390fd5b612bdb8160000160019054906101000a900463ffffffff16616591565b15612c4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4174746573746174696f6e2074696d6564206f7574000000000000000000000081525060200191505060405180910390fd5b8194505050505095945050505050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310612cd75780518252602082019150602081019050602083039250612cb4565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612d37576040519150601f19603f3d011682016040523d82523d6000602084013e612d3c565b606091505b50809350819250505080612d9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180617fe16036913960400191505060405180910390fd5b612da68260006162b4565b9250505092915050565b60606003600084815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480602002602001604051908101604052809291908181526020018280548015612e8857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612e3e575b5050505050905092915050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310612f335780518252602082019150602081019050602083039250612f10565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310612f9a5780518252602082019150602081019050602083039250612f77565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612ffa576040519150601f19603f3d011682016040523d82523d6000602084013e612fff565b606091505b5080935081925050508061305e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806181e96023913960400191505060405180910390fd5b613069826000616313565b92505050919050565b61307a61352a565b6130ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006131b643615616565b905090565b6000600654905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60096020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310613291578051825260208201915060208101905060208303925061326e565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146132f1576040519150601f19603f3d011682016040523d82523d6000602084013e6132f6565b606091505b50809350819250505080613355576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526035815260200180617f716035913960400191505060405180910390fd5b6133608260006162b4565b9250505090565b60055481565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b602083106133c2578051825260208201915060208101905060208303925061339f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106134295780518252602082019150602081019050602083039250613406565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613489576040519150601f19603f3d011682016040523d82523d6000602084013e61348e565b606091505b508093508192505050806134ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806181926031913960400191505060405180910390fd5b6134f88260006162b4565b92505050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661356c6165b8565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606080606080600086869050116135ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806180636028913960400191505060405180910390fd5b606080613637888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506165c0565b8092508193505050606081516040519080825280602002602001820160405280156136715781602001602082028038833980820191505090505b509050606082516040519080825280602002602001820160405280156136a65781602001602082028038833980820191505090505b509050600080905060008090505b8b8b9050811015613a77576060600360008e8e858181106136d157fe5b90506020020135815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561376957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161371f575b5050505050905060008090505b87838151811061378257fe5b6020026020010151811015613a5a57613799616496565b73ffffffffffffffffffffffffffffffffffffffff16631fd9afa58383815181106137c057fe5b60200260200101516040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561382857600080fd5b505afa15801561383c573d6000803e3d6000fd5b505050506040513d602081101561385257600080fd5b810190808051906020019092919050505087858151811061386f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600360008f8f868181106138b957fe5b90506020020135815260200190815260200160002060010160008383815181106138df57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1686858151811061394757fe5b602002602001019067ffffffffffffffff16908167ffffffffffffffff1681525050600360008f8f8681811061397957fe5b905060200201358152602001908152602001600020600101600083838151811061399f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16858581518110613a0757fe5b602002602001019067ffffffffffffffff16908167ffffffffffffffff1681525050613a3d60018561640e90919063ffffffff16565b9350613a5360018261640e90919063ffffffff16565b9050613776565b5050613a7060018261640e90919063ffffffff16565b90506136b4565b50848484849850985098509850505050505092959194509250565b6000613a9d43611c66565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310613b135780518252602082019150602081019050602083039250613af0565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613b73576040519150601f19603f3d011682016040523d82523d6000602084013e613b78565b606091505b50809350819250505080613bd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180617d33602e913960400191505060405180910390fd5b613be28260006162b4565b92505050919050565b613bf361352a565b613c65576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008111613cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180617e186030913960400191505060405180910390fd5b806004819055507f4fbe976a07a9260091c2d347f8780c4bc636392e34d5b249b367baf8a5c7ca69816040518082815260200191505060405180910390a150565b60006003600085815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1690508163ffffffff168114613dce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180617cbb602e913960400191505060405180910390fd5b50505050565b613ddc61352a565b613e4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613ef1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b60045481565b6000806000806003600088815260200190815260200160002060010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff16600281111561403657fe5b8160000160019054906101000a900463ffffffff168260000160059054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935093505093509350939050565b600060036000848152602001908152602001600020600001805490509050808210614113576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f496e64657820697320696e76616c69640000000000000000000000000000000081525060200191505060405180910390fd5b60036000848152602001908152602001600020600001828154811061413457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146141ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f496e64657820646f6573206e6f74206d61746368206d73672e73656e6465720081525060200191505060405180910390fd5b600061421560018361672190919063ffffffff16565b90508083146142d45760036000858152602001908152602001600020600001818154811061423f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660036000868152602001908152602001600020600001848154811061428b57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60006003600086815260200190815260200160002060000182815481106142f757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061436c6001600360008781526020019081526020016000206000018054905061672190919063ffffffff16565b600360008681526020019081526020016000206000018161438d9190617bb3565b5050505050565b60076020528060005260406000206000915090505481565b6143b461352a565b614426576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161447f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180617ce96028913960400191505060405180910390fd5b806006819055507fc1f217a1246a98ce04e938768309107630ed86c1e0e9f9995af28e23a9c06178816040518082815260200191505060405180910390a150565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061452557508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61457a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180617e696030913960400191505060405180910390fd5b6000858484604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401935050505060405160208183030381529060405280519060200120905060008473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461464e5784614650565b835b90508280156146b95750600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060009054906101000a900460ff165b15614738576146ca8787878761676b565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff02191690831515021790555061485c565b82600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff021916908315150217905550863373ffffffffffffffffffffffffffffffffffffffff167f14d7ffb83f4265cb6fb62188eb603269555bf46efbc2923909ed7ac313d57af7878787604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182151515158152602001935050505060405180910390a35b50505050505050565b6001600260008282540192505081905550600060025490506000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411614915576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180617d116022913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd333061498587600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054616e4990919063ffffffff16565b6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015614a2157600080fd5b505af1158015614a35573d6000803e3d6000fd5b505050506040513d6020811015614a4b57600080fd5b8101908080519060200190929190505050614ab1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180618017602b913960400191505060405180910390fd5b60008311614b0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180617f0a602a913960400191505060405180910390fd5b600654831115614b82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f546f6f206d616e79206174746573746174696f6e73207265717565737465640081525060200191505060405180910390fd5b600060036000868152602001908152602001600020905060008160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff161480614c5b5750614c5a8160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff16616591565b5b80614cc65750614cc48160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16616ecf565b155b614d1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180617db76039913960400191505060405180910390fd5b614d2443616f74565b8160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548163ffffffff021916908363ffffffff160217905550614d8f84616f74565b8160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160046101000a81548163ffffffff021916908363ffffffff160217905550828160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550614ee9614ee4858360010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1661640e90919063ffffffff16565b616f74565b8160010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548163ffffffff021916908363ffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff16857f381545d9b1fffcb94ffbbd0bccfff9f1fb3acd474d34f7d59112a5c9973fee498686604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a3506002548114615046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50505050565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b602083106150b2578051825260208201915060208101905060208303925061508f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114615112576040519150601f19603f3d011682016040523d82523d6000602084013e615117565b606091505b50809350819250505080615176576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806180b26025913960400191505060405180910390fd5b6151818260006162b4565b9250505090565b61519061352a565b615202576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161525b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180617d616030913960400191505060405180910390fd5b806005819055507f954fa47fa6f4e8017b99f93c73f4fbe599d786f9f5da73fe9086ab473fb455d8816040518082815260200191505060405180910390a150565b600060036000838152602001908152602001600020905060008160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1611615366576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603781526020018061812f6037913960400191505060405180910390fd5b6153c38160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff16616591565b15615419576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061810c6023913960400191505060405180910390fd5b61542282616fdb565b8060020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549063ffffffff02191690556000820160046101000a81549063ffffffff02191690556000820160086101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550505050565b60008060006003600086815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff166003600087815260200190815260200160002060020160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160049054906101000a900463ffffffff166003600088815260200190815260200160002060020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff169250925092509250925092565b600061565a600361564c600261563e600261563088613aa2565b616e4990919063ffffffff16565b61640e90919063ffffffff16565b6177a490919063ffffffff16565b9050919050565b6008602052816000526040600020602052806000526040600020600091509150505481565b6000806000871415801561569b575060008514155b61570d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b602083106157a75780518252602082019150602081019050602083039250615784565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114615807576040519150601f19603f3d011682016040523d82523d6000602084013e61580c565b606091505b5080925081935050508161586b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061808b6027913960400191505060405180910390fd5b6158768160006162b4565b93506158838160206162b4565b925083839550955050505050965096945050505050565b6158a261352a565b615914576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61591d816177ee565b50565b61592861352a565b61599a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600081116159f3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180617df06028913960400191505060405180910390fd5b80600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167f7cf8b633f218e9f9bc2c06107bcaddcfee6b90580863768acdcfd4f05d7af394826040518082815260200191505060405180910390a25050565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310615afa5780518252602082019150602081019050602083039250615ad7565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114615b5a576040519150601f19603f3d011682016040523d82523d6000602084013e615b5f565b606091505b50809350819250505080615bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180618166602c913960400191505060405180910390fd5b615bc9826000616313565b92505050919050565b6000615be185338686866128d5565b905060006003600087815260200190815260200160002060010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000160059054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050615cac43616f74565b8260000160016101000a81548163ffffffff021916908363ffffffff16021790555060028260000160006101000a81548160ff02191690836002811115615cef57fe5b02179055508160000160056101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560006003600089815260200190815260200160002060010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060018160000160049054906101000a900463ffffffff160163ffffffff168160000160049054906101000a900463ffffffff1663ffffffff1610615e1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d617468333220696e7465676572206f766572666c6f77000000000081525060200191505060405180910390fd5b60018160000160049054906101000a900463ffffffff16018160000160046101000a81548163ffffffff021916908363ffffffff160217905550615f26600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461640e90919063ffffffff16565b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600360008a815260200190815260200160002090506001600360008b815260200190815260200160002060010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff16141561609b57806000013390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f414ff2c18c092697c4b8de49f515ac44f8bebc19b24553cf58ace913a6ac639d60405160405180910390a4505050505050505050565b600060149054906101000a900460ff1615616184576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055506161a8336177ee565b6161b188613dd4565b6161ba87613beb565b6161c386615188565b6161cc856143ac565b6000848490501180156161e457508181905084849050145b616239576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806180d76035913960400191505060405180910390fd5b60008090505b848490508110156162a95761628e85858381811061625957fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1684848481811061628257fe5b90506020020135615920565b6162a260018261640e90919063ffffffff16565b905061623f565b505050505050505050565b60006162c08383616313565b60001c905092915050565b6000808284816162d757fe5b04905060008385816162e557fe5b0614156162f5578091505061630d565b61630960018261640e90919063ffffffff16565b9150505b92915050565b600061632960208361640e90919063ffffffff16565b8351101561639f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b6000600160028111156163c357fe5b8260000160009054906101000a900460ff1660028111156163e057fe5b14801561640757506164058260000160019054906101000a900463ffffffff16616591565b155b9050919050565b60008082840190508381101561648c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561655157600080fd5b505afa158015616565573d6000803e3d6000fd5b505050506040513d602081101561657b57600080fd5b8101908080519060200190929190505050905090565b60006165ae6004548363ffffffff1661640e90919063ffffffff16565b4310159050919050565b600033905090565b606080600083511161661d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806180636028913960400191505060405180910390fd5b6000809050606084516040519080825280602002602001820160405280156166545781602001602082028038833980820191505090505b50905060008090505b85518110156166e15760006003600088848151811061667857fe5b602002602001015181526020019081526020016000206000018054905090506166aa818561640e90919063ffffffff16565b9350808383815181106166b957fe5b602002602001018181525050506166da60018261640e90919063ffffffff16565b905061665d565b5080826040519080825280602002602001820160405280156167125781602001602082028038833980820191505090505b50809050935093505050915091565b600061676383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250617932565b905092915050565b6000600360008681526020019081526020016000206000018054905090508084106167fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f496e64657820697320696e76616c69640000000000000000000000000000000081525060200191505060405180910390fd5b60036000868152602001908152602001600020600001848154811061681f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146168cd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180617e486021913960400191505060405180910390fd5b60006003600087815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1614616992576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180617ed16039913960400191505060405180910390fd5b816003600087815260200190815260200160002060000185815481106169b457fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506003600086815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003600087815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820160009054906101000a900463ffffffff168160000160006101000a81548163ffffffff021916908363ffffffff1602179055506000820160049054906101000a900463ffffffff168160000160046101000a81548163ffffffff021916908363ffffffff1602179055506001820181600101908054616b26929190617bdf565b509050506003600086815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003600087815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820160009054906101000a900463ffffffff168160000160006101000a81548163ffffffff021916908363ffffffff1602179055506000820160049054906101000a900463ffffffff168160000160046101000a81548163ffffffff021916908363ffffffff1602179055506000820160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050506003600086815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549063ffffffff02191690556000820160046101000a81549063ffffffff0219169055600182016000616d3a9190617c31565b50506003600086815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549063ffffffff02191690556000820160046101000a81549063ffffffff02191690556000820160086101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16867f35bc19e2c74829d0a96c765bb41b09ce24a9d0757486ced0d075e7908932363860405160405180910390a45050505050565b600080831415616e5c5760009050616ec9565b6000828402905082848281616e6d57fe5b0414616ec4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806180426021913960400191505060405180910390fd5b809150505b92915050565b6000616f6b616edc6179f2565b73ffffffffffffffffffffffffffffffffffffffff1663e45def956040518163ffffffff1660e01b815260040160206040518083038186803b158015616f2157600080fd5b505afa158015616f35573d6000803e3d6000fd5b505050506040513d6020811015616f4b57600080fd5b81019080805190602001909291905050508361640e90919063ffffffff16565b43109050919050565b60006401000000008210616fd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806181c36026913960400191505060405180910390fd5b819050919050565b60006003600083815260200190815260200160002060010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006003600084815260200190815260200160002060020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006170936179f2565b73ffffffffffffffffffffffffffffffffffffffff1663fc4847266170dd6005548560000160009054906101000a900463ffffffff1663ffffffff1661640e90919063ffffffff16565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561711157600080fd5b505afa158015617125573d6000803e3d6000fd5b505050506040513d602081101561713b57600080fd5b810190808051906020019092919050505090506000617158616496565b90506000617164613220565b90506060816040519080825280602002602001820160405280156171975781602001602082028038833980820191505090505b50905060008090505b828110156171dc57808282815181106171b557fe5b6020026020010181815250506171d560018261640e90919063ffffffff16565b90506171a0565b50818560000160049054906101000a900463ffffffff1663ffffffff16111561726d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6e6f7420656e6f7567682069737375657273000000000000000000000000000081525060200191505060405180910390fd5b60008090505b8560000160049054906101000a900463ffffffff1663ffffffff1681101561779a576000831161730b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6e6f7420656e6f7567682069737375657273000000000000000000000000000081525060200191505060405180910390fd5b84604051602001808281526020019150506040516020818303038152906040528051906020012094506000838660001c8161734257fe5b069050600061736384838151811061735657fe5b6020026020010151611949565b905060008673ffffffffffffffffffffffffffffffffffffffff166393c5c487836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156173e457600080fd5b505afa1580156173f8573d6000803e3d6000fd5b505050506040513d602081101561740e57600080fd5b8101908080519060200190929190505050905060008a60020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600281111561747357fe5b8160000160009054906101000a900460ff16600281111561749057fe5b14801561755157508773ffffffffffffffffffffffffffffffffffffffff1663c2e0ee20836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561751557600080fd5b505afa158015617529573d6000803e3d6000fd5b505050506040513d602081101561753f57600080fd5b81019080805190602001909291905050505b1561774f5761756a60018661640e90919063ffffffff16565b945060018160000160006101000a81548160ff0219169083600281111561758d57fe5b02179055508960000160009054906101000a900463ffffffff168160000160016101000a81548163ffffffff021916908363ffffffff1602179055508960000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160056101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a6001018290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168d7faf7f470b643316cf44c1f2898328a075e7602945b4f8584f48ba4ad2d8a2ea9d8d60000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a45b61776360018861672190919063ffffffff16565b965085878151811061777157fe5b602002602001015186858151811061778557fe5b60200260200101818152505050505050617273565b5050505050505050565b60006177e683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250617aed565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415617874576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180617d916026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008383111582906179df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156179a4578082015181840152602081019050617989565b50505050905090810190601f1680156179d15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f52616e646f6d00000000000000000000000000000000000000000000000000008152506006019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015617aad57600080fd5b505afa158015617ac1573d6000803e3d6000fd5b505050506040513d6020811015617ad757600080fd5b8101908080519060200190929190505050905090565b60008083118290617b99576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015617b5e578082015181840152602081019050617b43565b50505050905090810190601f168015617b8b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581617ba557fe5b049050809150509392505050565b815481835581811115617bda57818360005260206000209182019101617bd99190617c52565b5b505050565b828054828255906000526020600020908101928215617c205760005260206000209182015b82811115617c1f578254825591600101919060010190617c04565b5b509050617c2d9190617c77565b5090565b5080546000825590600052602060002090810190617c4f9190617c52565b50565b617c7491905b80821115617c70576000816000905550600101617c58565b5090565b90565b617cb791905b80821115617cb357600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101617c7d565b5090565b9056fe726571756573746564206174746573746174696f6e7320646f6573206e6f74206d617463682065787065637465646d61784174746573746174696f6e732068617320746f2062652067726561746572207468616e2030496e76616c6964206174746573746174696f6e52657175657374466565546f6b656e6572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c6573656c6563744973737565727357616974426c6f636b732068617320746f2062652067726561746572207468616e20304f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737354686572652065786973747320616e20756e657870697265642c20756e73656c6563746564206174746573746174696f6e2072657175657374596f75206861766520746f20737065636966792061206665652067726561746572207468616e20306174746573746174696f6e457870697279426c6f636b732068617320746f2062652067726561746572207468616e2030496e64657820646f6573206e6f74206d617463682066726f6d2061646472657373417070726f766572206d7573742062652073656e646572206f7220726563697069656e74206f66207472616e736665726572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6541646472657373207472616e66657272696e6720746f2068617320616c726561647920726571756573746564206174746573746174696f6e73596f75206861766520746f2072657175657374206174206c656173742031206174746573746174696f6e6572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c654174746573746174696f6e20636f646520646f6573206e6f74206d6174636820616e79206f75747374616e64696e67206174746573746174696f6e6572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c655472616e73666572206f66206174746573746174696f6e20726571756573742066656573206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77596f75206861766520746f2070617373206174206c65617374206f6e65206964656e7469666965726572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c656572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c656174746573746174696f6e52657175657374466565546f6b656e732073706563696669636174696f6e2077617320696e76616c6964546865206174746573746174696f6e20726571756573742068617320657870697265644e6f20756e73656c6563746564206174746573746174696f6e207265717565737420746f2073656c656374206973737565727320666f726572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c6553616665436173743a2076616c756520646f65736e27742066697420696e20333220626974736572726f722063616c6c696e67206861736848656164657220707265636f6d70696c65a265627a7a723158201c6fbb84ee7544f9d4f2abe554996807b168eab0183775bc040aa4ebe2d752af64736f6c634300050d00320000000000000000000000000000000000000000000000000000000000000000

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106102f15760003560e01c80638f32d59b1161019d578063d02e0f0c116100e9578063e831be58116100a2578063f3ff26c61161007c578063f3ff26c6146116ba578063fae8db0a14611708578063fb6a2e531461174a578063fd536f5d14611799576102f1565b8063e831be5814611583578063ec683072146115fb578063f2fde38b14611676576102f1565b8063d02e0f0c146113bb578063df4da46114611413578063e02659ce14611431578063e221932e1461145f578063e3d0f66f1461148d578063e50e652d14611541576102f1565b8063a91ee0dc11610156578063bb46942f11610130578063bb46942f14611279578063bd93f998146112b1578063be2c47a614611309578063c8e74d7314611337576102f1565b8063a91ee0dc14611149578063b45eb7da1461118d578063b5599cc6146111ab576102f1565b80638f32d59b14610e9557806396357c0a14610eb75780639a7b3be71461105d5780639b2b592f1461107b578063a6437e73146110bd578063a762825a146110eb576102f1565b80635fc5c9161161025c5780637b1039991161021557806387ee8a0f116101ef57806387ee8a0f14610d4057806389d3528614610d5e5780638a88362614610d7c5780638da5cb5b14610e4b576102f1565b80637b10399914610c725780638218c6fe14610cbc57806384a1a4fc14610cda576102f1565b80635fc5c91614610a62578063623d593114610b0557806367960e9114610b5d578063715018a614610c2c5780637385e5da14610c365780637796a68414610c54576102f1565b80634eef7e85116102ae5780634eef7e85146106a457806351cff8d91461084357806354255be014610887578063596abea5146108ba5780635ce9bc071461093b5780635d180adb146109ea576102f1565b806303cc1aff146102f6578063123633ea14610379578063158ef93e146103e757806323f0ab65146104095780633b1eb4bf146105935780634b2c2f44146105d5575b600080fd5b6103226004803603602081101561030c57600080fd5b81019080803590602001909291905050506118a5565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561036557808201518184015260208101905061034a565b505050509050019250505060405180910390f35b6103a56004803603602081101561038f57600080fd5b8101908080359060200190929190505050611949565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ef611a9a565b604051808215151515815260200191505060405180910390f35b6105796004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561045c57600080fd5b82018360208201111561046e57600080fd5b8035906020019184600183028401116401000000008311171561049057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156104f357600080fd5b82018360208201111561050557600080fd5b8035906020019184600183028401116401000000008311171561052757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611aad565b604051808215151515815260200191505060405180910390f35b6105bf600480360360208110156105a957600080fd5b8101908080359060200190929190505050611c66565b6040518082815260200191505060405180910390f35b61068e600480360360208110156105eb57600080fd5b810190808035906020019064010000000081111561060857600080fd5b82018360208201111561061a57600080fd5b8035906020019184600183028401116401000000008311171561063c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611c80565b6040518082815260200191505060405180910390f35b6106f0600480360360408110156106ba57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e14565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b8381101561073f578082015181840152602081019050610724565b50505050905001858103845288818151815260200191508051906020019060200280838360005b83811015610781578082015181840152602081019050610766565b50505050905001858103835287818151815260200191508051906020019060200280838360005b838110156107c35780820151818401526020810190506107a8565b50505050905001858103825286818151815260200191508051906020019080838360005b838110156108025780820151818401526020810190506107e7565b50505050905090810190601f16801561082f5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b6108856004803603602081101561085957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506123f8565b005b61088f6127d2565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610906600480360360408110156108d057600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506127f9565b604051808363ffffffff1663ffffffff1681526020018263ffffffff1663ffffffff1681526020019250505060405180910390f35b6109a8600480360360a081101561095157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff16906020019092919080359060200190929190803590602001909291905050506128d5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a2060048036036040811015610a0057600080fd5b810190808035906020019092919080359060200190929190505050612c5e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae60048036036040811015610a7857600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612db0565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610af1578082015181840152602081019050610ad6565b505050509050019250505060405180910390f35b610b4760048036036020811015610b1b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e95565b6040518082815260200191505060405180910390f35b610c1660048036036020811015610b7357600080fd5b8101908080359060200190640100000000811115610b9057600080fd5b820183602082011115610ba257600080fd5b80359060200191846001830284011164010000000083111715610bc457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612ede565b6040518082815260200191505060405180910390f35b610c34613072565b005b610c3e6131ab565b6040518082815260200191505060405180910390f35b610c5c6131bb565b6040518082815260200191505060405180910390f35b610c7a6131c5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610cc46131eb565b6040518082815260200191505060405180910390f35b610d2660048036036040811015610cf057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506131f1565b604051808215151515815260200191505060405180910390f35b610d48613220565b6040518082815260200191505060405180910390f35b610d66613367565b6040518082815260200191505060405180910390f35b610e3560048036036020811015610d9257600080fd5b8101908080359060200190640100000000811115610daf57600080fd5b820183602082011115610dc157600080fd5b80359060200191846001830284011164010000000083111715610de357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061336d565b6040518082815260200191505060405180910390f35b610e53613501565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e9d61352a565b604051808215151515815260200191505060405180910390f35b610f2e60048036036020811015610ecd57600080fd5b8101908080359060200190640100000000811115610eea57600080fd5b820183602082011115610efc57600080fd5b80359060200191846020830284011164010000000083111715610f1e57600080fd5b9091929391929390505050613588565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b83811015610f7d578082015181840152602081019050610f62565b50505050905001858103845288818151815260200191508051906020019060200280838360005b83811015610fbf578082015181840152602081019050610fa4565b50505050905001858103835287818151815260200191508051906020019060200280838360005b83811015611001578082015181840152602081019050610fe6565b50505050905001858103825286818151815260200191508051906020019060200280838360005b83811015611043578082015181840152602081019050611028565b505050509050019850505050505050505060405180910390f35b611065613a92565b6040518082815260200191505060405180910390f35b6110a76004803603602081101561109157600080fd5b8101908080359060200190929190505050613aa2565b6040518082815260200191505060405180910390f35b6110e9600480360360208110156110d357600080fd5b8101908080359060200190929190505050613beb565b005b6111476004803603606081101561110157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803563ffffffff169060200190929190505050613cff565b005b61118b6004803603602081101561115f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613dd4565b005b611195613f78565b6040518082815260200191505060405180910390f35b611217600480360360608110156111c157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613f7e565b604051808460ff1660ff1681526020018363ffffffff1663ffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b6112af6004803603604081101561128f57600080fd5b810190808035906020019092919080359060200190929190505050614080565b005b6112f3600480360360208110156112c757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614394565b6040518082815260200191505060405180910390f35b6113356004803603602081101561131f57600080fd5b81019080803590602001909291905050506143ac565b005b6113b9600480360360a081101561134d57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291905050506144c0565b005b611411600480360360608110156113d157600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614865565b005b61141b61504c565b6040518082815260200191505060405180910390f35b61145d6004803603602081101561144757600080fd5b8101908080359060200190929190505050615188565b005b61148b6004803603602081101561147557600080fd5b810190808035906020019092919050505061529c565b005b6114d9600480360360408110156114a357600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506154bf565b604051808463ffffffff1663ffffffff1681526020018363ffffffff1663ffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b61156d6004803603602081101561155757600080fd5b8101908080359060200190929190505050615616565b6040518082815260200191505060405180910390f35b6115e56004803603604081101561159957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615661565b6040518082815260200191505060405180910390f35b611659600480360360c081101561161157600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050615686565b604051808381526020018281526020019250505060405180910390f35b6116b86004803603602081101561168c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061589a565b005b611706600480360360408110156116d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050615920565b005b6117346004803603602081101561171e57600080fd5b8101908080359060200190929190505050615a89565b6040518082815260200191505060405180910390f35b6117976004803603608081101561176057600080fd5b8101908080359060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050615bd2565b005b6118a3600480360360c08110156117af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561180a57600080fd5b82018360208201111561181c57600080fd5b8035906020019184602083028401116401000000008311171561183e57600080fd5b90919293919293908035906020019064010000000081111561185f57600080fd5b82018360208201111561187157600080fd5b8035906020019184602083028401116401000000008311171561189357600080fd5b9091929391929390505050616101565b005b60606003600083815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561193d57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116118f3575b50505050509050919050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106119c2578051825260208201915060208101905060208303925061199f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611a22576040519150601f19603f3d011682016040523d82523d6000602084013e611a27565b606091505b50809350819250505080611a86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180617f34603d913960400191505060405180910390fd5b611a918260006162b4565b92505050919050565b600060149054906101000a900460ff1681565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b60208310611b365780518252602082019150602081019050602083039250611b13565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310611b875780518252602082019150602081019050602083039250611b64565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b60208310611bf05780518252602082019150602081019050602083039250611bcd565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611c50576040519150601f19603f3d011682016040523d82523d6000602084013e611c55565b606091505b505080915050809150509392505050565b6000611c7982611c7461504c565b6162cb565b9050919050565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310611cd55780518252602082019150602081019050602083039250611cb2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310611d3c5780518252602082019150602081019050602083039250611d19565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611d9c576040519150601f19603f3d011682016040523d82523d6000602084013e611da1565b606091505b50809350819250505080611e00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180617e996038913960400191505060405180910390fd5b611e0b826000616313565b92505050919050565b60608060608060006003600088815260200190815260200160002060010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816001019050600080905060008090505b8280549050811015611f4657611f0f846002016000858481548110611ea557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206163b4565b15611f2b57611f2860018361640e90919063ffffffff16565b91505b611f3f60018261640e90919063ffffffff16565b9050611e84565b50606081604051908082528060200260200182016040528015611f785781602001602082028038833980820191505090505b509050606082604051908082528060200260200182016040528015611fac5781602001602082028038833980820191505090505b509050600080905060008090505b85805490508110156121aa57612045876002016000888481548110611fdb57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206163b4565b1561218f5786600201600087838154811061205c57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900463ffffffff168483815181106120e157fe5b602002602001019063ffffffff16908163ffffffff168152505085818154811061210757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683838151811061213e57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061218c60018361640e90919063ffffffff16565b91505b6121a360018261640e90919063ffffffff16565b9050611fba565b506060806121b6616496565b73ffffffffffffffffffffffffffffffffffffffff16638adaf96f856040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015612224578082015181840152602081019050612209565b505050509050019250505060006040518083038186803b15801561224757600080fd5b505afa15801561225b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250604081101561228557600080fd5b81019080805160405193929190846401000000008211156122a557600080fd5b838201915060208201858111156122bb57600080fd5b82518660208202830111640100000000821117156122d857600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561230f5780820151818401526020810190506122f4565b505050509050016040526020018051604051939291908464010000000082111561233857600080fd5b8382019150602082018581111561234e57600080fd5b825186600182028301116401000000008211171561236b57600080fd5b8083526020830192505050908051906020019080838360005b8381101561239f578082015181840152602081019050612384565b50505050905090810190601f1680156123cc5780820380516001836020036101000a031916815260200191505b506040525050508092508193505050848483839b509b509b509b50505050505050505092959194509250565b6000612402616496565b73ffffffffffffffffffffffffffffffffffffffff16637b2434cb336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561247e57600080fd5b505afa158015612492573d6000803e3d6000fd5b505050506040513d60208110156124a857600080fd5b810190808051906020019092919050505090506000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081116125b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f76616c756520776173206e656761746976652f7a65726f00000000000000000081525060200191505060405180910390fd5b6000600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b505050506040513d60208110156126e557600080fd5b8101908080519060200190929190505050612768576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f746f6b656e207472616e73666572206661696c6564000000000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b6398836040518082815260200191505060405180910390a3505050565b60008060008060018060016002839350829250819150809050935093509350935090919293565b6000806003600085815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160049054906101000a900463ffffffff166003600086815260200190815260200160002060010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff16915091509250929050565b6000808686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014019250505060405160208183030381529060405280519060200120905060007369baecd458e7c08b13a18e11887dbb078fb3cbb463b3abdb0c838888886040518563ffffffff1660e01b8152600401808581526020018460ff1660ff16815260200183815260200182815260200194505050505060206040518083038186803b1580156129a757600080fd5b505af41580156129bb573d6000803e3d6000fd5b505050506040513d60208110156129d157600080fd5b8101908080519060200190929190505050905060006129ee616496565b73ffffffffffffffffffffffffffffffffffffffff16637b2434cb836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a6a57600080fd5b505afa158015612a7e573d6000803e3d6000fd5b505050506040513d6020811015612a9457600080fd5b810190808051906020019092919050505090506000600360008b815260200190815260200160002060010160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060016002811115612b4b57fe5b8160000160009054906101000a900460ff166002811115612b6857fe5b14612bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180617fa6603b913960400191505060405180910390fd5b612bdb8160000160019054906101000a900463ffffffff16616591565b15612c4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4174746573746174696f6e2074696d6564206f7574000000000000000000000081525060200191505060405180910390fd5b8194505050505095945050505050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310612cd75780518252602082019150602081019050602083039250612cb4565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612d37576040519150601f19603f3d011682016040523d82523d6000602084013e612d3c565b606091505b50809350819250505080612d9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180617fe16036913960400191505060405180910390fd5b612da68260006162b4565b9250505092915050565b60606003600084815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480602002602001604051908101604052809291908181526020018280548015612e8857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612e3e575b5050505050905092915050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310612f335780518252602082019150602081019050602083039250612f10565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310612f9a5780518252602082019150602081019050602083039250612f77565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612ffa576040519150601f19603f3d011682016040523d82523d6000602084013e612fff565b606091505b5080935081925050508061305e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806181e96023913960400191505060405180910390fd5b613069826000616313565b92505050919050565b61307a61352a565b6130ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006131b643615616565b905090565b6000600654905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60096020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310613291578051825260208201915060208101905060208303925061326e565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146132f1576040519150601f19603f3d011682016040523d82523d6000602084013e6132f6565b606091505b50809350819250505080613355576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526035815260200180617f716035913960400191505060405180910390fd5b6133608260006162b4565b9250505090565b60055481565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b602083106133c2578051825260208201915060208101905060208303925061339f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106134295780518252602082019150602081019050602083039250613406565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613489576040519150601f19603f3d011682016040523d82523d6000602084013e61348e565b606091505b508093508192505050806134ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806181926031913960400191505060405180910390fd5b6134f88260006162b4565b92505050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661356c6165b8565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606080606080600086869050116135ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806180636028913960400191505060405180910390fd5b606080613637888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506165c0565b8092508193505050606081516040519080825280602002602001820160405280156136715781602001602082028038833980820191505090505b509050606082516040519080825280602002602001820160405280156136a65781602001602082028038833980820191505090505b509050600080905060008090505b8b8b9050811015613a77576060600360008e8e858181106136d157fe5b90506020020135815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561376957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161371f575b5050505050905060008090505b87838151811061378257fe5b6020026020010151811015613a5a57613799616496565b73ffffffffffffffffffffffffffffffffffffffff16631fd9afa58383815181106137c057fe5b60200260200101516040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561382857600080fd5b505afa15801561383c573d6000803e3d6000fd5b505050506040513d602081101561385257600080fd5b810190808051906020019092919050505087858151811061386f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600360008f8f868181106138b957fe5b90506020020135815260200190815260200160002060010160008383815181106138df57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1686858151811061394757fe5b602002602001019067ffffffffffffffff16908167ffffffffffffffff1681525050600360008f8f8681811061397957fe5b905060200201358152602001908152602001600020600101600083838151811061399f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16858581518110613a0757fe5b602002602001019067ffffffffffffffff16908167ffffffffffffffff1681525050613a3d60018561640e90919063ffffffff16565b9350613a5360018261640e90919063ffffffff16565b9050613776565b5050613a7060018261640e90919063ffffffff16565b90506136b4565b50848484849850985098509850505050505092959194509250565b6000613a9d43611c66565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310613b135780518252602082019150602081019050602083039250613af0565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613b73576040519150601f19603f3d011682016040523d82523d6000602084013e613b78565b606091505b50809350819250505080613bd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180617d33602e913960400191505060405180910390fd5b613be28260006162b4565b92505050919050565b613bf361352a565b613c65576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008111613cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180617e186030913960400191505060405180910390fd5b806004819055507f4fbe976a07a9260091c2d347f8780c4bc636392e34d5b249b367baf8a5c7ca69816040518082815260200191505060405180910390a150565b60006003600085815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1690508163ffffffff168114613dce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180617cbb602e913960400191505060405180910390fd5b50505050565b613ddc61352a565b613e4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613ef1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b60045481565b6000806000806003600088815260200190815260200160002060010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff16600281111561403657fe5b8160000160019054906101000a900463ffffffff168260000160059054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935093505093509350939050565b600060036000848152602001908152602001600020600001805490509050808210614113576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f496e64657820697320696e76616c69640000000000000000000000000000000081525060200191505060405180910390fd5b60036000848152602001908152602001600020600001828154811061413457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146141ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f496e64657820646f6573206e6f74206d61746368206d73672e73656e6465720081525060200191505060405180910390fd5b600061421560018361672190919063ffffffff16565b90508083146142d45760036000858152602001908152602001600020600001818154811061423f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660036000868152602001908152602001600020600001848154811061428b57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60006003600086815260200190815260200160002060000182815481106142f757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061436c6001600360008781526020019081526020016000206000018054905061672190919063ffffffff16565b600360008681526020019081526020016000206000018161438d9190617bb3565b5050505050565b60076020528060005260406000206000915090505481565b6143b461352a565b614426576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161447f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180617ce96028913960400191505060405180910390fd5b806006819055507fc1f217a1246a98ce04e938768309107630ed86c1e0e9f9995af28e23a9c06178816040518082815260200191505060405180910390a150565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061452557508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61457a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180617e696030913960400191505060405180910390fd5b6000858484604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401935050505060405160208183030381529060405280519060200120905060008473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461464e5784614650565b835b90508280156146b95750600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060009054906101000a900460ff165b15614738576146ca8787878761676b565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff02191690831515021790555061485c565b82600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff021916908315150217905550863373ffffffffffffffffffffffffffffffffffffffff167f14d7ffb83f4265cb6fb62188eb603269555bf46efbc2923909ed7ac313d57af7878787604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182151515158152602001935050505060405180910390a35b50505050505050565b6001600260008282540192505081905550600060025490506000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411614915576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180617d116022913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd333061498587600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054616e4990919063ffffffff16565b6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015614a2157600080fd5b505af1158015614a35573d6000803e3d6000fd5b505050506040513d6020811015614a4b57600080fd5b8101908080519060200190929190505050614ab1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180618017602b913960400191505060405180910390fd5b60008311614b0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180617f0a602a913960400191505060405180910390fd5b600654831115614b82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f546f6f206d616e79206174746573746174696f6e73207265717565737465640081525060200191505060405180910390fd5b600060036000868152602001908152602001600020905060008160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff161480614c5b5750614c5a8160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff16616591565b5b80614cc65750614cc48160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16616ecf565b155b614d1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180617db76039913960400191505060405180910390fd5b614d2443616f74565b8160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548163ffffffff021916908363ffffffff160217905550614d8f84616f74565b8160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160046101000a81548163ffffffff021916908363ffffffff160217905550828160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550614ee9614ee4858360010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1661640e90919063ffffffff16565b616f74565b8160010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548163ffffffff021916908363ffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff16857f381545d9b1fffcb94ffbbd0bccfff9f1fb3acd474d34f7d59112a5c9973fee498686604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a3506002548114615046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50505050565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b602083106150b2578051825260208201915060208101905060208303925061508f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114615112576040519150601f19603f3d011682016040523d82523d6000602084013e615117565b606091505b50809350819250505080615176576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806180b26025913960400191505060405180910390fd5b6151818260006162b4565b9250505090565b61519061352a565b615202576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161525b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180617d616030913960400191505060405180910390fd5b806005819055507f954fa47fa6f4e8017b99f93c73f4fbe599d786f9f5da73fe9086ab473fb455d8816040518082815260200191505060405180910390a150565b600060036000838152602001908152602001600020905060008160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1611615366576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603781526020018061812f6037913960400191505060405180910390fd5b6153c38160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff16616591565b15615419576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061810c6023913960400191505060405180910390fd5b61542282616fdb565b8060020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549063ffffffff02191690556000820160046101000a81549063ffffffff02191690556000820160086101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550505050565b60008060006003600086815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff166003600087815260200190815260200160002060020160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160049054906101000a900463ffffffff166003600088815260200190815260200160002060020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff169250925092509250925092565b600061565a600361564c600261563e600261563088613aa2565b616e4990919063ffffffff16565b61640e90919063ffffffff16565b6177a490919063ffffffff16565b9050919050565b6008602052816000526040600020602052806000526040600020600091509150505481565b6000806000871415801561569b575060008514155b61570d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b602083106157a75780518252602082019150602081019050602083039250615784565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114615807576040519150601f19603f3d011682016040523d82523d6000602084013e61580c565b606091505b5080925081935050508161586b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061808b6027913960400191505060405180910390fd5b6158768160006162b4565b93506158838160206162b4565b925083839550955050505050965096945050505050565b6158a261352a565b615914576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61591d816177ee565b50565b61592861352a565b61599a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600081116159f3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180617df06028913960400191505060405180910390fd5b80600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167f7cf8b633f218e9f9bc2c06107bcaddcfee6b90580863768acdcfd4f05d7af394826040518082815260200191505060405180910390a25050565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310615afa5780518252602082019150602081019050602083039250615ad7565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114615b5a576040519150601f19603f3d011682016040523d82523d6000602084013e615b5f565b606091505b50809350819250505080615bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180618166602c913960400191505060405180910390fd5b615bc9826000616313565b92505050919050565b6000615be185338686866128d5565b905060006003600087815260200190815260200160002060010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000160059054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050615cac43616f74565b8260000160016101000a81548163ffffffff021916908363ffffffff16021790555060028260000160006101000a81548160ff02191690836002811115615cef57fe5b02179055508160000160056101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560006003600089815260200190815260200160002060010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060018160000160049054906101000a900463ffffffff160163ffffffff168160000160049054906101000a900463ffffffff1663ffffffff1610615e1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d617468333220696e7465676572206f766572666c6f77000000000081525060200191505060405180910390fd5b60018160000160049054906101000a900463ffffffff16018160000160046101000a81548163ffffffff021916908363ffffffff160217905550615f26600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461640e90919063ffffffff16565b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600360008a815260200190815260200160002090506001600360008b815260200190815260200160002060010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff16141561609b57806000013390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f414ff2c18c092697c4b8de49f515ac44f8bebc19b24553cf58ace913a6ac639d60405160405180910390a4505050505050505050565b600060149054906101000a900460ff1615616184576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055506161a8336177ee565b6161b188613dd4565b6161ba87613beb565b6161c386615188565b6161cc856143ac565b6000848490501180156161e457508181905084849050145b616239576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806180d76035913960400191505060405180910390fd5b60008090505b848490508110156162a95761628e85858381811061625957fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1684848481811061628257fe5b90506020020135615920565b6162a260018261640e90919063ffffffff16565b905061623f565b505050505050505050565b60006162c08383616313565b60001c905092915050565b6000808284816162d757fe5b04905060008385816162e557fe5b0614156162f5578091505061630d565b61630960018261640e90919063ffffffff16565b9150505b92915050565b600061632960208361640e90919063ffffffff16565b8351101561639f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b6000600160028111156163c357fe5b8260000160009054906101000a900460ff1660028111156163e057fe5b14801561640757506164058260000160019054906101000a900463ffffffff16616591565b155b9050919050565b60008082840190508381101561648c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561655157600080fd5b505afa158015616565573d6000803e3d6000fd5b505050506040513d602081101561657b57600080fd5b8101908080519060200190929190505050905090565b60006165ae6004548363ffffffff1661640e90919063ffffffff16565b4310159050919050565b600033905090565b606080600083511161661d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806180636028913960400191505060405180910390fd5b6000809050606084516040519080825280602002602001820160405280156166545781602001602082028038833980820191505090505b50905060008090505b85518110156166e15760006003600088848151811061667857fe5b602002602001015181526020019081526020016000206000018054905090506166aa818561640e90919063ffffffff16565b9350808383815181106166b957fe5b602002602001018181525050506166da60018261640e90919063ffffffff16565b905061665d565b5080826040519080825280602002602001820160405280156167125781602001602082028038833980820191505090505b50809050935093505050915091565b600061676383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250617932565b905092915050565b6000600360008681526020019081526020016000206000018054905090508084106167fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f496e64657820697320696e76616c69640000000000000000000000000000000081525060200191505060405180910390fd5b60036000868152602001908152602001600020600001848154811061681f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146168cd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180617e486021913960400191505060405180910390fd5b60006003600087815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1614616992576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180617ed16039913960400191505060405180910390fd5b816003600087815260200190815260200160002060000185815481106169b457fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506003600086815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003600087815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820160009054906101000a900463ffffffff168160000160006101000a81548163ffffffff021916908363ffffffff1602179055506000820160049054906101000a900463ffffffff168160000160046101000a81548163ffffffff021916908363ffffffff1602179055506001820181600101908054616b26929190617bdf565b509050506003600086815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003600087815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820160009054906101000a900463ffffffff168160000160006101000a81548163ffffffff021916908363ffffffff1602179055506000820160049054906101000a900463ffffffff168160000160046101000a81548163ffffffff021916908363ffffffff1602179055506000820160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050506003600086815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549063ffffffff02191690556000820160046101000a81549063ffffffff0219169055600182016000616d3a9190617c31565b50506003600086815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549063ffffffff02191690556000820160046101000a81549063ffffffff02191690556000820160086101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16867f35bc19e2c74829d0a96c765bb41b09ce24a9d0757486ced0d075e7908932363860405160405180910390a45050505050565b600080831415616e5c5760009050616ec9565b6000828402905082848281616e6d57fe5b0414616ec4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806180426021913960400191505060405180910390fd5b809150505b92915050565b6000616f6b616edc6179f2565b73ffffffffffffffffffffffffffffffffffffffff1663e45def956040518163ffffffff1660e01b815260040160206040518083038186803b158015616f2157600080fd5b505afa158015616f35573d6000803e3d6000fd5b505050506040513d6020811015616f4b57600080fd5b81019080805190602001909291905050508361640e90919063ffffffff16565b43109050919050565b60006401000000008210616fd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806181c36026913960400191505060405180910390fd5b819050919050565b60006003600083815260200190815260200160002060010160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006003600084815260200190815260200160002060020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006170936179f2565b73ffffffffffffffffffffffffffffffffffffffff1663fc4847266170dd6005548560000160009054906101000a900463ffffffff1663ffffffff1661640e90919063ffffffff16565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561711157600080fd5b505afa158015617125573d6000803e3d6000fd5b505050506040513d602081101561713b57600080fd5b810190808051906020019092919050505090506000617158616496565b90506000617164613220565b90506060816040519080825280602002602001820160405280156171975781602001602082028038833980820191505090505b50905060008090505b828110156171dc57808282815181106171b557fe5b6020026020010181815250506171d560018261640e90919063ffffffff16565b90506171a0565b50818560000160049054906101000a900463ffffffff1663ffffffff16111561726d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6e6f7420656e6f7567682069737375657273000000000000000000000000000081525060200191505060405180910390fd5b60008090505b8560000160049054906101000a900463ffffffff1663ffffffff1681101561779a576000831161730b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6e6f7420656e6f7567682069737375657273000000000000000000000000000081525060200191505060405180910390fd5b84604051602001808281526020019150506040516020818303038152906040528051906020012094506000838660001c8161734257fe5b069050600061736384838151811061735657fe5b6020026020010151611949565b905060008673ffffffffffffffffffffffffffffffffffffffff166393c5c487836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156173e457600080fd5b505afa1580156173f8573d6000803e3d6000fd5b505050506040513d602081101561740e57600080fd5b8101908080519060200190929190505050905060008a60020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600281111561747357fe5b8160000160009054906101000a900460ff16600281111561749057fe5b14801561755157508773ffffffffffffffffffffffffffffffffffffffff1663c2e0ee20836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561751557600080fd5b505afa158015617529573d6000803e3d6000fd5b505050506040513d602081101561753f57600080fd5b81019080805190602001909291905050505b1561774f5761756a60018661640e90919063ffffffff16565b945060018160000160006101000a81548160ff0219169083600281111561758d57fe5b02179055508960000160009054906101000a900463ffffffff168160000160016101000a81548163ffffffff021916908363ffffffff1602179055508960000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160056101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a6001018290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168d7faf7f470b643316cf44c1f2898328a075e7602945b4f8584f48ba4ad2d8a2ea9d8d60000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a45b61776360018861672190919063ffffffff16565b965085878151811061777157fe5b602002602001015186858151811061778557fe5b60200260200101818152505050505050617273565b5050505050505050565b60006177e683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250617aed565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415617874576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180617d916026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008383111582906179df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156179a4578082015181840152602081019050617989565b50505050905090810190601f1680156179d15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f52616e646f6d00000000000000000000000000000000000000000000000000008152506006019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015617aad57600080fd5b505afa158015617ac1573d6000803e3d6000fd5b505050506040513d6020811015617ad757600080fd5b8101908080519060200190929190505050905090565b60008083118290617b99576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015617b5e578082015181840152602081019050617b43565b50505050905090810190601f168015617b8b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581617ba557fe5b049050809150509392505050565b815481835581811115617bda57818360005260206000209182019101617bd99190617c52565b5b505050565b828054828255906000526020600020908101928215617c205760005260206000209182015b82811115617c1f578254825591600101919060010190617c04565b5b509050617c2d9190617c77565b5090565b5080546000825590600052602060002090810190617c4f9190617c52565b50565b617c7491905b80821115617c70576000816000905550600101617c58565b5090565b90565b617cb791905b80821115617cb357600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101617c7d565b5090565b9056fe726571756573746564206174746573746174696f6e7320646f6573206e6f74206d617463682065787065637465646d61784174746573746174696f6e732068617320746f2062652067726561746572207468616e2030496e76616c6964206174746573746174696f6e52657175657374466565546f6b656e6572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c6573656c6563744973737565727357616974426c6f636b732068617320746f2062652067726561746572207468616e20304f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737354686572652065786973747320616e20756e657870697265642c20756e73656c6563746564206174746573746174696f6e2072657175657374596f75206861766520746f20737065636966792061206665652067726561746572207468616e20306174746573746174696f6e457870697279426c6f636b732068617320746f2062652067726561746572207468616e2030496e64657820646f6573206e6f74206d617463682066726f6d2061646472657373417070726f766572206d7573742062652073656e646572206f7220726563697069656e74206f66207472616e736665726572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6541646472657373207472616e66657272696e6720746f2068617320616c726561647920726571756573746564206174746573746174696f6e73596f75206861766520746f2072657175657374206174206c656173742031206174746573746174696f6e6572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c654174746573746174696f6e20636f646520646f6573206e6f74206d6174636820616e79206f75747374616e64696e67206174746573746174696f6e6572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c655472616e73666572206f66206174746573746174696f6e20726571756573742066656573206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77596f75206861766520746f2070617373206174206c65617374206f6e65206964656e7469666965726572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c656572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c656174746573746174696f6e52657175657374466565546f6b656e732073706563696669636174696f6e2077617320696e76616c6964546865206174746573746174696f6e20726571756573742068617320657870697265644e6f20756e73656c6563746564206174746573746174696f6e207265717565737420746f2073656c656374206973737565727320666f726572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c6553616665436173743a2076616c756520646f65736e27742066697420696e20333220626974736572726f722063616c6c696e67206861736848656164657220707265636f6d70696c65a265627a7a723158201c6fbb84ee7544f9d4f2abe554996807b168eab0183775bc040aa4ebe2d752af64736f6c634300050d0032