Address Details
contract

0xCdE5039e3AcB3483aEebEBd59Cf6936056c455D4

Contract Name
Election
Creator
0xf3eb91–a79239 at 0x320304–d7fc83
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
29814709
This contract has been partially verified via Sourcify. View contract in Sourcify repository
Contract name:
Election




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




EVM Version
istanbul




Verified at
2023-06-21T19:45:49.665064Z

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/governance/Election.sol

pragma solidity ^0.5.13;

import "openzeppelin-solidity/contracts/math/Math.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";

import "./interfaces/IElection.sol";
import "./interfaces/IValidators.sol";
import "../common/CalledByVm.sol";
import "../common/Initializable.sol";
import "../common/FixidityLib.sol";
import "../common/linkedlists/AddressSortedLinkedList.sol";
import "../common/UsingPrecompiles.sol";
import "../common/UsingRegistry.sol";
import "../common/interfaces/ICeloVersionedContract.sol";
import "../common/libraries/Heap.sol";
import "../common/libraries/ReentrancyGuard.sol";

contract Election is
  IElection,
  ICeloVersionedContract,
  Ownable,
  ReentrancyGuard,
  Initializable,
  UsingRegistry,
  UsingPrecompiles,
  CalledByVm
{
  using AddressSortedLinkedList for SortedLinkedList.List;
  using FixidityLib for FixidityLib.Fraction;
  using SafeMath for uint256;

  // 1e20 ensures that units can be represented as precisely as possible to avoid rounding errors
  // when translating to votes, without risking integer overflow.
  // A maximum of 1,000,000,000 CELO (1e27) yields a maximum of 1e47 units, whose product is at
  // most 1e74, which is less than 2^256.
  uint256 private constant UNIT_PRECISION_FACTOR = 100000000000000000000;

  struct PendingVote {
    // The value of the vote, in gold.
    uint256 value;
    // The epoch at which the vote was cast.
    uint256 epoch;
  }

  struct GroupPendingVotes {
    // The total number of pending votes that have been cast for this group.
    uint256 total;
    // Pending votes cast per voter.
    mapping(address => PendingVote) byAccount;
  }

  // Pending votes are those for which no following elections have been held.
  // These votes have yet to contribute to the election of validators and thus do not accrue
  // rewards.
  struct PendingVotes {
    // The total number of pending votes cast across all groups.
    uint256 total;
    mapping(address => GroupPendingVotes) forGroup;
  }

  struct GroupActiveVotes {
    // The total number of active votes that have been cast for this group.
    uint256 total;
    // The total number of active votes by a voter is equal to the number of active vote units for
    // that voter times the total number of active votes divided by the total number of active
    // vote units.
    uint256 totalUnits;
    mapping(address => uint256) unitsByAccount;
  }

  // Active votes are those for which at least one following election has been held.
  // These votes have contributed to the election of validators and thus accrue rewards.
  struct ActiveVotes {
    // The total number of active votes cast across all groups.
    uint256 total;
    mapping(address => GroupActiveVotes) forGroup;
  }

  struct TotalVotes {
    // A list of eligible ValidatorGroups sorted by total (pending+active) votes.
    // Note that this list will omit ineligible ValidatorGroups, including those that may have > 0
    // total votes.
    SortedLinkedList.List eligible;
  }

  struct Votes {
    PendingVotes pending;
    ActiveVotes active;
    TotalVotes total;
    // Maps an account to the list of groups it's voting for.
    mapping(address => address[]) groupsVotedFor;
  }

  struct ElectableValidators {
    uint256 min;
    uint256 max;
  }

  struct CachedVotes {
    // group => votes
    mapping(address => uint256) cachedVotesPerGroup;
    uint256 totalVotes;
  }

  Votes private votes;
  // Governs the minimum and maximum number of validators that can be elected.
  ElectableValidators public electableValidators;
  // Governs how many validator groups a single account can vote for.
  uint256 public maxNumGroupsVotedFor;
  // Groups must receive at least this fraction of the total votes in order to be considered in
  // elections.
  FixidityLib.Fraction public electabilityThreshold;

  // If set to true for account, the account is able to vote for more
  // than max number of groups voted for.
  mapping(address => bool) public allowedToVoteOverMaxNumberOfGroups;

  mapping(address => CachedVotes) public cachedVotesByAccount;

  event ElectableValidatorsSet(uint256 min, uint256 max);
  event MaxNumGroupsVotedForSet(uint256 maxNumGroupsVotedFor);
  event ElectabilityThresholdSet(uint256 electabilityThreshold);
  event AllowedToVoteOverMaxNumberOfGroups(address indexed account, bool flag);
  event ValidatorGroupMarkedEligible(address indexed group);
  event ValidatorGroupMarkedIneligible(address indexed group);
  event ValidatorGroupVoteCast(address indexed account, address indexed group, uint256 value);
  event ValidatorGroupVoteActivated(
    address indexed account,
    address indexed group,
    uint256 value,
    uint256 units
  );
  event ValidatorGroupPendingVoteRevoked(
    address indexed account,
    address indexed group,
    uint256 value
  );
  event ValidatorGroupActiveVoteRevoked(
    address indexed account,
    address indexed group,
    uint256 value,
    uint256 units
  );
  event EpochRewardsDistributedToVoters(address indexed group, uint256 value);

  /**
   * @notice Returns the storage, major, minor, and patch version of the contract.
   * @return Storage version of the contract.
   * @return Major version of the contract.
   * @return Minor version of the contract.
   * @return Patch version of the contract.
   */
  function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) {
    return (1, 1, 3, 0);
  }

  /**
   * @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 minElectableValidators The minimum number of validators that can be elected.
   * @param _maxNumGroupsVotedFor The maximum number of groups that an account can vote for at once.
   * @param _electabilityThreshold The minimum ratio of votes a group needs before its members can
   *   be elected.
   * @dev Should be called only once.
   */
  function initialize(
    address registryAddress,
    uint256 minElectableValidators,
    uint256 maxElectableValidators,
    uint256 _maxNumGroupsVotedFor,
    uint256 _electabilityThreshold
  ) external initializer {
    _transferOwnership(msg.sender);
    setRegistry(registryAddress);
    setElectableValidators(minElectableValidators, maxElectableValidators);
    setMaxNumGroupsVotedFor(_maxNumGroupsVotedFor);
    setElectabilityThreshold(_electabilityThreshold);
  }

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

  /**
   * @notice Updates the minimum and maximum number of validators that can be elected.
   * @param min The minimum number of validators that can be elected.
   * @param max The maximum number of validators that can be elected.
   * @return True upon success.
   */
  function setElectableValidators(uint256 min, uint256 max) public onlyOwner returns (bool) {
    require(0 < min, "Minimum electable validators cannot be zero");
    require(min <= max, "Maximum electable validators cannot be smaller than minimum");
    require(
      min != electableValidators.min || max != electableValidators.max,
      "Electable validators not changed"
    );
    electableValidators = ElectableValidators(min, max);
    emit ElectableValidatorsSet(min, max);
    return true;
  }

  /**
   * @notice Returns the minimum and maximum number of validators that can be elected.
   * @return The minimum number of validators that can be elected.
   * @return The maximum number of validators that can be elected.
   */
  function getElectableValidators() external view returns (uint256, uint256) {
    return (electableValidators.min, electableValidators.max);
  }

  /**
   * @notice Updates the maximum number of groups an account can be voting for at once.
   * @param _maxNumGroupsVotedFor The maximum number of groups an account can vote for.
   * @return True upon success.
   */
  function setMaxNumGroupsVotedFor(uint256 _maxNumGroupsVotedFor) public onlyOwner returns (bool) {
    require(_maxNumGroupsVotedFor != maxNumGroupsVotedFor, "Max groups voted for not changed");
    maxNumGroupsVotedFor = _maxNumGroupsVotedFor;
    emit MaxNumGroupsVotedForSet(_maxNumGroupsVotedFor);
    return true;
  }

  /**
   * @notice Sets the electability threshold.
   * @param threshold Electability threshold as unwrapped Fraction.
   * @return True upon success.
   */
  function setElectabilityThreshold(uint256 threshold) public onlyOwner returns (bool) {
    electabilityThreshold = FixidityLib.wrap(threshold);
    require(
      electabilityThreshold.lt(FixidityLib.fixed1()),
      "Electability threshold must be lower than 100%"
    );
    emit ElectabilityThresholdSet(threshold);
    return true;
  }

  /**
   * @notice Gets the election threshold.
   * @return Threshold value as unwrapped fraction.
   */
  function getElectabilityThreshold() external view returns (uint256) {
    return electabilityThreshold.unwrap();
  }

  /**
   * @notice Increments the number of total and pending votes for `group`.
   * @param group The validator group to vote for.
   * @param value The amount of gold to use to vote.
   * @param lesser The group receiving fewer votes than `group`, or 0 if `group` has the
   *   fewest votes of any validator group.
   * @param greater The group receiving more votes than `group`, or 0 if `group` has the
   *   most votes of any validator group.
   * @return True upon success.
   * @dev Fails if `group` is empty or not a validator group.
   */
  function vote(address group, uint256 value, address lesser, address greater)
    external
    nonReentrant
    returns (bool)
  {
    require(votes.total.eligible.contains(group), "Group not eligible");
    require(0 < value, "Vote value cannot be zero");
    require(canReceiveVotes(group, value), "Group cannot receive votes");
    address account = getAccounts().voteSignerToAccount(msg.sender);

    // Add group to the groups voted for by the account.
    bool alreadyVotedForGroup = false;
    address[] storage groups = votes.groupsVotedFor[account];
    for (uint256 i = 0; i < groups.length; i = i.add(1)) {
      alreadyVotedForGroup = alreadyVotedForGroup || groups[i] == group;
    }
    if (!alreadyVotedForGroup) {
      require(
        allowedToVoteOverMaxNumberOfGroups[msg.sender] || groups.length < maxNumGroupsVotedFor,
        "Voted for too many groups"
      );
      groups.push(group);
    }

    incrementPendingVotes(group, account, value);
    incrementTotalVotes(account, group, value, lesser, greater);
    getLockedGold().decrementNonvotingAccountBalance(account, value);
    emit ValidatorGroupVoteCast(account, group, value);
    return true;
  }

  /**
   * @notice Converts `account`'s pending votes for `group` to active votes.
   * @param group The validator group to vote for.
   * @return True upon success.
   * @dev Pending votes cannot be activated until an election has been held.
   */
  function activate(address group) external nonReentrant returns (bool) {
    address account = getAccounts().voteSignerToAccount(msg.sender);
    return _activate(group, account);
  }

  /**
   * @notice Converts `account`'s pending votes for `group` to active votes.
   * @param group The validator group to vote for.
   * @param account The validateor group account's pending votes to active votes
   * @return True upon success.
   * @dev Pending votes cannot be activated until an election has been held.
   */
  function activateForAccount(address group, address account) external nonReentrant returns (bool) {
    return _activate(group, account);
  }

  function _activate(address group, address account) internal returns (bool) {
    PendingVote storage pendingVote = votes.pending.forGroup[group].byAccount[account];
    require(pendingVote.epoch < getEpochNumber(), "Pending vote epoch not passed");
    uint256 value = pendingVote.value;
    require(value > 0, "Vote value cannot be zero");
    decrementPendingVotes(group, account, value);
    uint256 units = incrementActiveVotes(group, account, value);
    emit ValidatorGroupVoteActivated(account, group, value, units);
    return true;
  }

  /**
   * @notice Returns whether or not an account's votes for the specified group can be activated.
   * @param account The account with pending votes.
   * @param group The validator group that `account` has pending votes for.
   * @return Whether or not `account` has activatable votes for `group`.
   * @dev Pending votes cannot be activated until an election has been held.
   */
  function hasActivatablePendingVotes(address account, address group) external view returns (bool) {
    PendingVote storage pendingVote = votes.pending.forGroup[group].byAccount[account];
    return pendingVote.epoch < getEpochNumber() && pendingVote.value > 0;
  }

  /**
   * @notice Revokes `value` pending votes for `group`
   * @param group The validator group to revoke votes from.
   * @param value The number of votes to revoke.
   * @param lesser The group receiving fewer votes than the group for which the vote was revoked,
   *   or 0 if that group has the fewest votes of any validator group.
   * @param greater The group receiving more votes than the group for which the vote was revoked,
   *   or 0 if that group has the most votes of any validator group.
   * @param index The index of the group in the account's voting list.
   * @return True upon success.
   * @dev Fails if the account has not voted on a validator group.
   */
  function revokePending(
    address group,
    uint256 value,
    address lesser,
    address greater,
    uint256 index
  ) external nonReentrant returns (bool) {
    require(group != address(0), "Group address zero");
    address account = getAccounts().voteSignerToAccount(msg.sender);
    require(0 < value, "Vote value cannot be zero");
    require(
      value <= getPendingVotesForGroupByAccount(group, account),
      "Vote value larger than pending votes"
    );
    decrementPendingVotes(group, account, value);
    decrementTotalVotes(account, group, value, lesser, greater);
    getLockedGold().incrementNonvotingAccountBalance(account, value);
    if (getTotalVotesForGroupByAccount(group, account) == 0) {
      deleteElement(votes.groupsVotedFor[account], group, index);
    }
    emit ValidatorGroupPendingVoteRevoked(account, group, value);
    return true;
  }

  /**
   * @notice Revokes all active votes for `group`
   * @param group The validator group to revoke votes from.
   * @param lesser The group receiving fewer votes than the group for which the vote was revoked,
   *   or 0 if that group has the fewest votes of any validator group.
   * @param greater The group receiving more votes than the group for which the vote was revoked,
   *   or 0 if that group has the most votes of any validator group.
   * @param index The index of the group in the account's voting list.
   * @return True upon success.
   * @dev Fails if the account has not voted on a validator group.
   */
  function revokeAllActive(address group, address lesser, address greater, uint256 index)
    external
    nonReentrant
    returns (bool)
  {
    address account = getAccounts().voteSignerToAccount(msg.sender);
    uint256 value = getActiveVotesForGroupByAccount(group, account);
    return _revokeActive(group, value, lesser, greater, index);
  }

  /**
   * @notice Revokes `value` active votes for `group`
   * @param group The validator group to revoke votes from.
   * @param value The number of votes to revoke.
   * @param lesser The group receiving fewer votes than the group for which the vote was revoked,
   *   or 0 if that group has the fewest votes of any validator group.
   * @param greater The group receiving more votes than the group for which the vote was revoked,
   *   or 0 if that group has the most votes of any validator group.
   * @param index The index of the group in the account's voting list.
   * @return True upon success.
   * @dev Fails if the account has not voted on a validator group.
   */
  function revokeActive(
    address group,
    uint256 value,
    address lesser,
    address greater,
    uint256 index
  ) external nonReentrant returns (bool) {
    return _revokeActive(group, value, lesser, greater, index);
  }

  function _revokeActive(
    address group,
    uint256 value,
    address lesser,
    address greater,
    uint256 index
  ) internal returns (bool) {
    // TODO(asa): Dedup with revokePending.
    require(group != address(0), "Group address zero");
    address account = getAccounts().voteSignerToAccount(msg.sender);
    require(0 < value, "Vote value cannot be zero");
    require(
      value <= getActiveVotesForGroupByAccount(group, account),
      "Vote value larger than active votes"
    );
    uint256 units = decrementActiveVotes(group, account, value);
    decrementTotalVotes(account, group, value, lesser, greater);
    getLockedGold().incrementNonvotingAccountBalance(account, value);
    if (getTotalVotesForGroupByAccount(group, account) == 0) {
      deleteElement(votes.groupsVotedFor[account], group, index);
    }
    emit ValidatorGroupActiveVoteRevoked(account, group, value, units);
    return true;
  }

  /**
   * @notice Decrements `value` pending or active votes for `group` from `account`.
   *         First revokes all pending votes and then, if `value` votes haven't
   *         been revoked yet, revokes additional active votes.
   *         Fundamentally calls `revokePending` and `revokeActive` but only resorts groups once.
   * @param account The account whose votes to `group` should be decremented.
   * @param group The validator group to decrement votes from.
   * @param maxValue The maxinum number of votes to decrement and revoke.
   * @param lesser The group receiving fewer votes than the group for which the vote was revoked,
   *               or 0 if that group has the fewest votes of any validator group.
   * @param greater The group receiving more votes than the group for which the vote was revoked,
   *                or 0 if that group has the most votes of any validator group.
   * @param index The index of the group in the account's voting list.
   * @return uint256 Number of votes successfully decremented and revoked, with a max of `value`.
   */
  function _decrementVotes(
    address account,
    address group,
    uint256 maxValue,
    address lesser,
    address greater,
    uint256 index
  ) internal returns (uint256) {
    uint256 remainingValue = maxValue;
    uint256 pendingVotes = getPendingVotesForGroupByAccount(group, account);
    if (pendingVotes > 0) {
      uint256 decrementValue = Math.min(remainingValue, pendingVotes);
      decrementPendingVotes(group, account, decrementValue);
      emit ValidatorGroupPendingVoteRevoked(account, group, decrementValue);
      remainingValue = remainingValue.sub(decrementValue);
    }
    uint256 activeVotes = getActiveVotesForGroupByAccount(group, account);
    if (activeVotes > 0 && remainingValue > 0) {
      uint256 decrementValue = Math.min(remainingValue, activeVotes);
      uint256 units = decrementActiveVotes(group, account, decrementValue);
      emit ValidatorGroupActiveVoteRevoked(account, group, decrementValue, units);
      remainingValue = remainingValue.sub(decrementValue);
    }
    uint256 decrementedValue = maxValue.sub(remainingValue);
    if (decrementedValue > 0) {
      decrementTotalVotes(account, group, decrementedValue, lesser, greater);
      if (getTotalVotesForGroupByAccount(group, account) == 0) {
        deleteElement(votes.groupsVotedFor[account], group, index);
      }
    }
    return decrementedValue;
  }

  /**
   * @notice Returns the total number of votes cast by an account.
   * @param account The address of the account.
   * @return The total number of votes cast by an account.
   */
  function getTotalVotesByAccount(address account) external view returns (uint256) {
    address[] memory groups = votes.groupsVotedFor[account];

    if (groups.length > maxNumGroupsVotedFor) {
      return cachedVotesByAccount[account].totalVotes;
    }

    uint256 total = 0;
    for (uint256 i = 0; i < groups.length; i = i.add(1)) {
      total = total.add(getTotalVotesForGroupByAccount(groups[i], account));
    }
    return total;
  }

  /**
   * @notice Counts and caches account's votes for group.
   * @param account The address of the voting account.
   * @param group The address of the validator group.
   */
  function updateTotalVotesByAccountForGroup(address account, address group) public {
    cachedVotesByAccount[account].totalVotes -= cachedVotesByAccount[account]
      .cachedVotesPerGroup[group];
    uint256 newTotalVotesForGroupByAccount = getTotalVotesForGroupByAccount(group, account);
    cachedVotesByAccount[account].cachedVotesPerGroup[group] = newTotalVotesForGroupByAccount;
    cachedVotesByAccount[account].totalVotes += newTotalVotesForGroupByAccount;
  }

  /**
   * @notice Returns the pending votes for `group` made by `account`.
   * @param group The address of the validator group.
   * @param account The address of the voting account.
   * @return The pending votes for `group` made by `account`.
   */
  function getPendingVotesForGroupByAccount(address group, address account)
    public
    view
    returns (uint256)
  {
    return votes.pending.forGroup[group].byAccount[account].value;
  }

  /**
   * @notice Returns the active votes for `group` made by `account`.
   * @param group The address of the validator group.
   * @param account The address of the voting account.
   * @return The active votes for `group` made by `account`.
   */
  function getActiveVotesForGroupByAccount(address group, address account)
    public
    view
    returns (uint256)
  {
    return unitsToVotes(group, votes.active.forGroup[group].unitsByAccount[account]);
  }

  /**
   * @notice Returns the total votes for `group` made by `account`.
   * @param group The address of the validator group.
   * @param account The address of the voting account.
   * @return The total votes for `group` made by `account`.
   */
  function getTotalVotesForGroupByAccount(address group, address account)
    public
    view
    returns (uint256)
  {
    uint256 pending = getPendingVotesForGroupByAccount(group, account);
    uint256 active = getActiveVotesForGroupByAccount(group, account);
    return pending.add(active);
  }

  /**
   * @notice Returns the active vote units for `group` made by `account`.
   * @param group The address of the validator group.
   * @param account The address of the voting account.
   * @return The active vote units for `group` made by `account`.
   */
  function getActiveVoteUnitsForGroupByAccount(address group, address account)
    external
    view
    returns (uint256)
  {
    return votes.active.forGroup[group].unitsByAccount[account];
  }

  /**
   * @notice Returns the total active vote units made for `group`.
   * @param group The address of the validator group.
   * @return The total active vote units made for `group`.
   */
  function getActiveVoteUnitsForGroup(address group) external view returns (uint256) {
    return votes.active.forGroup[group].totalUnits;
  }

  /**
   * @notice Returns the total votes made for `group`.
   * @param group The address of the validator group.
   * @return The total votes made for `group`.
   */
  function getTotalVotesForGroup(address group) public view returns (uint256) {
    return votes.pending.forGroup[group].total.add(votes.active.forGroup[group].total);
  }

  /**
   * @notice Returns the active votes made for `group`.
   * @param group The address of the validator group.
   * @return The active votes made for `group`.
   */
  function getActiveVotesForGroup(address group) public view returns (uint256) {
    return votes.active.forGroup[group].total;
  }

  /**
   * @notice Returns the pending votes made for `group`.
   * @param group The address of the validator group.
   * @return The pending votes made for `group`.
   */
  function getPendingVotesForGroup(address group) public view returns (uint256) {
    return votes.pending.forGroup[group].total;
  }

  /**
   * @notice Returns whether or not a group is eligible to receive votes.
   * @return Whether or not a group is eligible to receive votes.
   * @dev Eligible groups that have received their maximum number of votes cannot receive more.
   */
  function getGroupEligibility(address group) external view returns (bool) {
    return votes.total.eligible.contains(group);
  }

  /**
   * @notice Returns the amount of rewards that voters for `group` are due at the end of an epoch.
   * @param group The group to calculate epoch rewards for.
   * @param totalEpochRewards The total amount of rewards going to all voters.
   * @param uptimes Array of Fixidity representations of the validators' uptimes, between 0 and 1.
   * @return The amount of rewards that voters for `group` are due at the end of an epoch.
   * @dev Eligible groups that have received their maximum number of votes cannot receive more.
   */
  function getGroupEpochRewards(
    address group,
    uint256 totalEpochRewards,
    uint256[] calldata uptimes
  ) external view returns (uint256) {
    IValidators validators = getValidators();
    // The group must meet the balance requirements for their voters to receive epoch rewards.
    if (!validators.meetsAccountLockedGoldRequirements(group) || votes.active.total <= 0) {
      return 0;
    }

    FixidityLib.Fraction memory votePortion = FixidityLib.newFixedFraction(
      votes.active.forGroup[group].total,
      votes.active.total
    );
    FixidityLib.Fraction memory score = FixidityLib.wrap(
      validators.calculateGroupEpochScore(uptimes)
    );
    FixidityLib.Fraction memory slashingMultiplier = FixidityLib.wrap(
      validators.getValidatorGroupSlashingMultiplier(group)
    );
    return
      FixidityLib
        .newFixed(totalEpochRewards)
        .multiply(votePortion)
        .multiply(score)
        .multiply(slashingMultiplier)
        .fromFixed();
  }

  /**
   * @notice Distributes epoch rewards to voters for `group` in the form of active votes.
   * @param group The group whose voters will receive rewards.
   * @param value The amount of rewards to distribute to voters for the group.
   * @param lesser The group receiving fewer votes than `group` after the rewards are added.
   * @param greater The group receiving more votes than `group` after the rewards are added.
   * @dev Can only be called directly by the protocol.
   */
  function distributeEpochRewards(address group, uint256 value, address lesser, address greater)
    external
    onlyVm
  {
    _distributeEpochRewards(group, value, lesser, greater);
  }

  /**
   * @notice Distributes epoch rewards to voters for `group` in the form of active votes.
   * @param group The group whose voters will receive rewards.
   * @param value The amount of rewards to distribute to voters for the group.
   * @param lesser The group receiving fewer votes than `group` after the rewards are added.
   * @param greater The group receiving more votes than `group` after the rewards are added.
   */
  function _distributeEpochRewards(address group, uint256 value, address lesser, address greater)
    internal
  {
    if (votes.total.eligible.contains(group)) {
      uint256 newVoteTotal = votes.total.eligible.getValue(group).add(value);
      votes.total.eligible.update(group, newVoteTotal, lesser, greater);
    }

    votes.active.forGroup[group].total = votes.active.forGroup[group].total.add(value);
    votes.active.total = votes.active.total.add(value);
    emit EpochRewardsDistributedToVoters(group, value);
  }

  /**
   * @notice Increments the number of total votes for `group` by `value`.
   * @param group The validator group whose vote total should be incremented.
   * @param value The number of votes to increment.
   * @param lesser The group receiving fewer votes than the group for which the vote was cast,
   *   or 0 if that group has the fewest votes of any validator group.
   * @param greater The group receiving more votes than the group for which the vote was cast,
   *   or 0 if that group has the most votes of any validator group.
   */
  function incrementTotalVotes(
    address account,
    address group,
    uint256 value,
    address lesser,
    address greater
  ) private {
    uint256 newVoteTotal = votes.total.eligible.getValue(group).add(value);
    votes.total.eligible.update(group, newVoteTotal, lesser, greater);

    if (allowedToVoteOverMaxNumberOfGroups[account]) {
      updateTotalVotesByAccountForGroup(account, group);
    }
  }

  /**
   * @notice Decrements the number of total votes for `group` by `value`.
   * @param account The address of the voting account.
   * @param group The validator group whose vote total should be decremented.
   * @param value The number of votes to decrement.
   * @param lesser The group receiving fewer votes than the group for which the vote was revoked,
   *   or 0 if that group has the fewest votes of any validator group.
   * @param greater The group receiving more votes than the group for which the vote was revoked,
   *   or 0 if that group has the most votes of any validator group.
   */
  function decrementTotalVotes(
    address account,
    address group,
    uint256 value,
    address lesser,
    address greater
  ) private {
    if (votes.total.eligible.contains(group)) {
      uint256 newVoteTotal = votes.total.eligible.getValue(group).sub(value);
      votes.total.eligible.update(group, newVoteTotal, lesser, greater);
    }

    if (allowedToVoteOverMaxNumberOfGroups[account]) {
      updateTotalVotesByAccountForGroup(account, group);
    }
  }

  /**
   * @notice Marks a group ineligible for electing validators.
   * @param group The address of the validator group.
   * @dev Can only be called by the registered "Validators" contract.
   */
  function markGroupIneligible(address group)
    external
    onlyRegisteredContract(VALIDATORS_REGISTRY_ID)
  {
    votes.total.eligible.remove(group);
    emit ValidatorGroupMarkedIneligible(group);
  }

  /**
   * @notice Marks a group eligible for electing validators.
   * @param group The address of the validator group.
   * @param lesser The address of the group that has received fewer votes than this group.
   * @param greater The address of the group that has received more votes than this group.
   */
  function markGroupEligible(address group, address lesser, address greater)
    external
    onlyRegisteredContract(VALIDATORS_REGISTRY_ID)
  {
    uint256 value = getTotalVotesForGroup(group);
    votes.total.eligible.insert(group, value, lesser, greater);
    emit ValidatorGroupMarkedEligible(group);
  }

  /**
   * @notice Increments the number of pending votes for `group` made by `account`.
   * @param group The address of the validator group.
   * @param account The address of the voting account.
   * @param value The number of votes.
   */
  function incrementPendingVotes(address group, address account, uint256 value) private {
    PendingVotes storage pending = votes.pending;
    pending.total = pending.total.add(value);

    GroupPendingVotes storage groupPending = pending.forGroup[group];
    groupPending.total = groupPending.total.add(value);

    PendingVote storage pendingVote = groupPending.byAccount[account];
    pendingVote.value = pendingVote.value.add(value);
    pendingVote.epoch = getEpochNumber();
  }

  /**
   * @notice Decrements the number of pending votes for `group` made by `account`.
   * @param group The address of the validator group.
   * @param account The address of the voting account.
   * @param value The number of votes.
   */
  function decrementPendingVotes(address group, address account, uint256 value) private {
    PendingVotes storage pending = votes.pending;
    pending.total = pending.total.sub(value);

    GroupPendingVotes storage groupPending = pending.forGroup[group];
    groupPending.total = groupPending.total.sub(value);

    PendingVote storage pendingVote = groupPending.byAccount[account];
    pendingVote.value = pendingVote.value.sub(value);
    if (pendingVote.value == 0) {
      pendingVote.epoch = 0;
    }
  }

  /**
   * @notice Increments the number of active votes for `group` made by `account`.
   * @param group The address of the validator group.
   * @param account The address of the voting account.
   * @param value The number of votes.
   */
  function incrementActiveVotes(address group, address account, uint256 value)
    private
    returns (uint256)
  {
    ActiveVotes storage active = votes.active;
    active.total = active.total.add(value);

    uint256 units = votesToUnits(group, value);

    GroupActiveVotes storage groupActive = active.forGroup[group];
    groupActive.total = groupActive.total.add(value);

    groupActive.totalUnits = groupActive.totalUnits.add(units);
    groupActive.unitsByAccount[account] = groupActive.unitsByAccount[account].add(units);
    return units;
  }

  /**
   * @notice Decrements the number of active votes for `group` made by `account`.
   * @param group The address of the validator group.
   * @param account The address of the voting account.
   * @param value The number of votes.
   */
  function decrementActiveVotes(address group, address account, uint256 value)
    private
    returns (uint256)
  {
    ActiveVotes storage active = votes.active;
    active.total = active.total.sub(value);

    // Rounding may cause votesToUnits to return 0 for value != 0, preventing users
    // from revoking the last of their votes. The case where value == votes is special cased
    // to prevent this.
    uint256 units = 0;
    uint256 activeVotes = getActiveVotesForGroupByAccount(group, account);
    GroupActiveVotes storage groupActive = active.forGroup[group];
    if (activeVotes == value) {
      units = groupActive.unitsByAccount[account];
    } else {
      units = votesToUnits(group, value);
    }

    groupActive.total = groupActive.total.sub(value);
    groupActive.totalUnits = groupActive.totalUnits.sub(units);
    groupActive.unitsByAccount[account] = groupActive.unitsByAccount[account].sub(units);
    return units;
  }

  /**
   * @notice Returns the number of units corresponding to `value` active votes.
   * @param group The address of the validator group.
   * @param value The number of active votes.
   * @return The corresponding number of units.
   */
  function votesToUnits(address group, uint256 value) private view returns (uint256) {
    if (votes.active.forGroup[group].totalUnits == 0) {
      return value.mul(UNIT_PRECISION_FACTOR);
    } else {
      return
        value.mul(votes.active.forGroup[group].totalUnits).div(votes.active.forGroup[group].total);
    }
  }

  /**
   * @notice Returns the number of active votes corresponding to `value` units.
   * @param group The address of the validator group.
   * @param value The number of units.
   * @return The corresponding number of active votes.
   */
  function unitsToVotes(address group, uint256 value) private view returns (uint256) {
    if (votes.active.forGroup[group].totalUnits == 0) {
      return 0;
    } else {
      return
        value.mul(votes.active.forGroup[group].total).div(votes.active.forGroup[group].totalUnits);
    }
  }

  /**
   * @notice Returns the groups that `account` has voted for.
   * @param account The address of the account casting votes.
   * @return The groups that `account` has voted for.
   */
  function getGroupsVotedForByAccount(address account) external view returns (address[] memory) {
    return votes.groupsVotedFor[account];
  }

  /**
   * @notice Deletes an element from a list of addresses.
   * @param list The list of addresses.
   * @param element The address to delete.
   * @param index The index of `element` in the list.
   */
  function deleteElement(address[] storage list, address element, uint256 index) private {
    require(index < list.length && list[index] == element, "Bad index");
    uint256 lastIndex = list.length.sub(1);
    list[index] = list[lastIndex];
    list.length = lastIndex;
  }

  /**
   * @notice Returns whether or not a group can receive the specified number of votes.
   * @param group The address of the group.
   * @param value The number of votes.
   * @return Whether or not a group can receive the specified number of votes.
   * @dev Votes are not allowed to be cast that would increase a group's proportion of locked gold
   *   voting for it to greater than
   *   (numGroupMembers + 1) / min(maxElectableValidators, numRegisteredValidators)
   * @dev Note that groups may still receive additional votes via rewards even if this function
   *   returns false.
   */
  function canReceiveVotes(address group, uint256 value) public view returns (bool) {
    uint256 totalVotesForGroup = getTotalVotesForGroup(group).add(value);
    uint256 left = totalVotesForGroup.mul(
      Math.min(electableValidators.max, getValidators().getNumRegisteredValidators())
    );
    uint256 right = getValidators().getGroupNumMembers(group).add(1).mul(
      getLockedGold().getTotalLockedGold()
    );
    return left <= right;
  }

  /**
   * @notice Returns the number of votes that a group can receive.
   * @param group The address of the group.
   * @return The number of votes that a group can receive.
   * @dev Votes are not allowed to be cast that would increase a group's proportion of locked gold
   *   voting for it to greater than
   *   (numGroupMembers + 1) / min(maxElectableValidators, numRegisteredValidators)
   * @dev Note that a group's vote total may exceed this number through rewards or config changes.
   */
  function getNumVotesReceivable(address group) external view returns (uint256) {
    uint256 numerator = getValidators().getGroupNumMembers(group).add(1).mul(
      getLockedGold().getTotalLockedGold()
    );
    uint256 denominator = Math.min(
      electableValidators.max,
      getValidators().getNumRegisteredValidators()
    );
    return numerator.div(denominator);
  }

  /**
   * @notice Returns the total votes received across all groups.
   * @return The total votes received across all groups.
   */
  function getTotalVotes() public view returns (uint256) {
    return votes.active.total.add(votes.pending.total);
  }

  /**
   * @notice Returns the active votes received across all groups.
   * @return The active votes received across all groups.
   */
  function getActiveVotes() public view returns (uint256) {
    return votes.active.total;
  }

  /**
   * @notice Returns the list of validator groups eligible to elect validators.
   * @return The list of validator groups eligible to elect validators.
   */
  function getEligibleValidatorGroups() external view returns (address[] memory) {
    return votes.total.eligible.getKeys();
  }

  /**
   * @notice Returns list of all validator groups and the number of votes they've received.
   * @return List of all validator groups
   * @return Number of votes each validator group received.
   */
  function getTotalVotesForEligibleValidatorGroups()
    external
    view
    returns (address[] memory groups, uint256[] memory values)
  {
    return votes.total.eligible.getElements();
  }

  /**
   * @notice Returns a list of elected validators with seats allocated to groups via the D'Hondt
   *   method.
   * @return The list of elected validators.
   */
  function electValidatorSigners() external view returns (address[] memory) {
    return electNValidatorSigners(electableValidators.min, electableValidators.max);
  }

  /**
   * @notice Returns a list of elected validators with seats allocated to groups via the D'Hondt
   *   method.
   * @return The list of elected validators.
   * @dev See https://en.wikipedia.org/wiki/D%27Hondt_method#Allocation for more information.
   */
  function electNValidatorSigners(uint256 minElectableValidators, uint256 maxElectableValidators)
    public
    view
    returns (address[] memory)
  {
    // Groups must have at least `electabilityThreshold` proportion of the total votes to be
    // considered for the election.
    uint256 requiredVotes = electabilityThreshold
      .multiply(FixidityLib.newFixed(getTotalVotes()))
      .fromFixed();
    // Only consider groups with at least `requiredVotes` but do not consider more groups than the
    // max number of electable validators.
    uint256 numElectionGroups = votes.total.eligible.numElementsGreaterThan(
      requiredVotes,
      maxElectableValidators
    );
    address[] memory electionGroups = votes.total.eligible.headN(numElectionGroups);
    uint256[] memory numMembers = getValidators().getGroupsNumMembers(electionGroups);
    // Holds the number of members elected for each of the eligible validator groups.
    uint256[] memory numMembersElected = new uint256[](electionGroups.length);
    uint256 totalNumMembersElected = 0;

    uint256[] memory keys = new uint256[](electionGroups.length);
    FixidityLib.Fraction[] memory votesForNextMember = new FixidityLib.Fraction[](
      electionGroups.length
    );
    for (uint256 i = 0; i < electionGroups.length; i = i.add(1)) {
      keys[i] = i;
      votesForNextMember[i] = FixidityLib.newFixed(
        votes.total.eligible.getValue(electionGroups[i])
      );
    }

    // Assign a number of seats to each validator group.
    while (totalNumMembersElected < maxElectableValidators && electionGroups.length > 0) {
      uint256 groupIndex = keys[0];
      // All electable validators have been elected.
      if (votesForNextMember[groupIndex].unwrap() == 0) break;
      // All members of the group have been elected
      if (numMembers[groupIndex] <= numMembersElected[groupIndex]) {
        votesForNextMember[groupIndex] = FixidityLib.wrap(0);
      } else {
        // Elect the next member from the validator group
        numMembersElected[groupIndex] = numMembersElected[groupIndex].add(1);
        totalNumMembersElected = totalNumMembersElected.add(1);
        // If there are already n elected members in a group, the votes for the next member
        // are total votes of group divided by n+1
        votesForNextMember[groupIndex] = FixidityLib
          .newFixed(votes.total.eligible.getValue(electionGroups[groupIndex]))
          .divide(FixidityLib.newFixed(numMembersElected[groupIndex].add(1)));
      }
      Heap.heapifyDown(keys, votesForNextMember);
    }
    require(totalNumMembersElected >= minElectableValidators, "Not enough elected validators");
    // Grab the top validators from each group that won seats.
    address[] memory electedValidators = new address[](totalNumMembersElected);
    totalNumMembersElected = 0;
    for (uint256 i = 0; i < electionGroups.length; i = i.add(1)) {
      // We use the validating delegate if one is set.
      address[] memory electedGroupValidators = getValidators().getTopGroupValidators(
        electionGroups[i],
        numMembersElected[i]
      );
      for (uint256 j = 0; j < electedGroupValidators.length; j = j.add(1)) {
        electedValidators[totalNumMembersElected] = electedGroupValidators[j];
        totalNumMembersElected = totalNumMembersElected.add(1);
      }
    }
    return electedValidators;
  }

  /**
   * @notice Returns get current validator signers using the precompiles.
   * @return List of current validator signers.
   */
  function getCurrentValidatorSigners() public view returns (address[] memory) {
    uint256 n = numberValidatorsInCurrentSet();
    address[] memory res = new address[](n);
    for (uint256 i = 0; i < n; i = i.add(1)) {
      res[i] = validatorSignerAddressFromCurrentSet(i);
    }
    return res;
  }

  /**
   * @notice Allows to turn on/off voting over maxNumGroupsVotedFor.
   * Once this is turned on and account voted for more than maxNumGroupsVotedFor,
   * it is account's obligation to run updateTotalVotesByAccountForGroup once a day.
   * If not run, voting power of account will not reflect rewards awarded.
   * @param flag The on/off flag.
   */
  function setAllowedToVoteOverMaxNumberOfGroups(bool flag) public {
    address account = getAccounts().voteSignerToAccount(msg.sender);
    IValidators validators = getValidators();
    require(
      !validators.isValidator(account),
      "Validators cannot vote for more than max number of groups"
    );
    require(
      !validators.isValidatorGroup(account),
      "Validator groups cannot vote for more than max number of groups"
    );

    if (!flag) {
      require(
        votes.groupsVotedFor[account].length <= maxNumGroupsVotedFor,
        "Too many groups voted for!"
      );
    }

    allowedToVoteOverMaxNumberOfGroups[account] = flag;
    emit AllowedToVoteOverMaxNumberOfGroups(account, flag);
  }

  // Struct to hold local variables for `forceDecrementVotes`.
  // Needed to prevent solc error of "stack too deep" from too many local vars.
  struct DecrementVotesInfo {
    address[] groups;
    uint256 remainingValue;
  }

  /**
   * @notice Reduces the total amount of `account`'s voting gold by `value` by
   *         iterating over all groups voted for by account.
   * @param account Address to revoke votes from.
   * @param value Maximum amount of votes to revoke.
   * @param lessers The groups receiving fewer votes than the i'th `group`, or 0 if
   *                the i'th `group` has the fewest votes of any validator group.
   * @param greaters The groups receivier more votes than the i'th `group`, or 0 if
   *                the i'th `group` has the most votes of any validator group.
   * @param indices The indices of the i'th group in the account's voting list.
   * @return Number of votes successfully decremented.
   */
  function forceDecrementVotes(
    address account,
    uint256 value,
    address[] calldata lessers,
    address[] calldata greaters,
    uint256[] calldata indices
  ) external nonReentrant onlyRegisteredContract(LOCKED_GOLD_REGISTRY_ID) returns (uint256) {
    require(value > 0, "Decrement value must be greater than 0.");
    DecrementVotesInfo memory info = DecrementVotesInfo(votes.groupsVotedFor[account], value);
    require(
      lessers.length <= info.groups.length &&
        lessers.length == greaters.length &&
        greaters.length == indices.length,
      "Input lengths must be correspond."
    );
    // Iterate in reverse order to hopefully optimize removing pending votes before active votes
    // And to attempt to preserve `account`'s earliest votes (assuming earliest = prefered)
    for (uint256 i = info.groups.length; i > 0; i = i.sub(1)) {
      info.remainingValue = info.remainingValue.sub(
        _decrementVotes(
          account,
          info.groups[i.sub(1)],
          info.remainingValue,
          lessers[i.sub(1)],
          greaters[i.sub(1)],
          indices[i.sub(1)]
        )
      );
      if (info.remainingValue == 0) {
        break;
      }
    }
    require(info.remainingValue == 0, "Failure to decrement all votes.");
    return value;
  }
}
        

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/common/CalledByVm.sol

pragma solidity ^0.5.13;

contract CalledByVm {
  modifier onlyVm() {
    require(msg.sender == address(0), "Only VM can call");
    _;
  }
}
          

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/common/FixidityLib.sol

pragma solidity ^0.5.13;

/**
 * @title FixidityLib
 * @author Gadi Guy, Alberto Cuesta Canada
 * @notice This library provides fixed point arithmetic with protection against
 * overflow.
 * All operations are done with uint256 and the operands must have been created
 * with any of the newFrom* functions, which shift the comma digits() to the
 * right and check for limits, or with wrap() which expects a number already
 * in the internal representation of a fraction.
 * When using this library be sure to use maxNewFixed() as the upper limit for
 * creation of fixed point numbers.
 * @dev All contained functions are pure and thus marked internal to be inlined
 * on consuming contracts at compile time for gas efficiency.
 */
library FixidityLib {
  struct Fraction {
    uint256 value;
  }

  /**
   * @notice Number of positions that the comma is shifted to the right.
   */
  function digits() internal pure returns (uint8) {
    return 24;
  }

  uint256 private constant FIXED1_UINT = 1000000000000000000000000;

  /**
   * @notice This is 1 in the fixed point units used in this library.
   * @dev Test fixed1() equals 10^digits()
   * Hardcoded to 24 digits.
   */
  function fixed1() internal pure returns (Fraction memory) {
    return Fraction(FIXED1_UINT);
  }

  /**
   * @notice Wrap a uint256 that represents a 24-decimal fraction in a Fraction
   * struct.
   * @param x Number that already represents a 24-decimal fraction.
   * @return A Fraction struct with contents x.
   */
  function wrap(uint256 x) internal pure returns (Fraction memory) {
    return Fraction(x);
  }

  /**
   * @notice Unwraps the uint256 inside of a Fraction struct.
   */
  function unwrap(Fraction memory x) internal pure returns (uint256) {
    return x.value;
  }

  /**
   * @notice The amount of decimals lost on each multiplication operand.
   * @dev Test mulPrecision() equals sqrt(fixed1)
   */
  function mulPrecision() internal pure returns (uint256) {
    return 1000000000000;
  }

  /**
   * @notice Maximum value that can be converted to fixed point. Optimize for deployment.
   * @dev
   * Test maxNewFixed() equals maxUint256() / fixed1()
   */
  function maxNewFixed() internal pure returns (uint256) {
    return 115792089237316195423570985008687907853269984665640564;
  }

  /**
   * @notice Converts a uint256 to fixed point Fraction
   * @dev Test newFixed(0) returns 0
   * Test newFixed(1) returns fixed1()
   * Test newFixed(maxNewFixed()) returns maxNewFixed() * fixed1()
   * Test newFixed(maxNewFixed()+1) fails
   */
  function newFixed(uint256 x) internal pure returns (Fraction memory) {
    require(x <= maxNewFixed(), "can't create fixidity number larger than maxNewFixed()");
    return Fraction(x * FIXED1_UINT);
  }

  /**
   * @notice Converts a uint256 in the fixed point representation of this
   * library to a non decimal. All decimal digits will be truncated.
   */
  function fromFixed(Fraction memory x) internal pure returns (uint256) {
    return x.value / FIXED1_UINT;
  }

  /**
   * @notice Converts two uint256 representing a fraction to fixed point units,
   * equivalent to multiplying dividend and divisor by 10^digits().
   * @param numerator numerator must be <= maxNewFixed()
   * @param denominator denominator must be <= maxNewFixed() and denominator can't be 0
   * @dev
   * Test newFixedFraction(1,0) fails
   * Test newFixedFraction(0,1) returns 0
   * Test newFixedFraction(1,1) returns fixed1()
   * Test newFixedFraction(1,fixed1()) returns 1
   */
  function newFixedFraction(uint256 numerator, uint256 denominator)
    internal
    pure
    returns (Fraction memory)
  {
    Fraction memory convertedNumerator = newFixed(numerator);
    Fraction memory convertedDenominator = newFixed(denominator);
    return divide(convertedNumerator, convertedDenominator);
  }

  /**
   * @notice Returns the integer part of a fixed point number.
   * @dev
   * Test integer(0) returns 0
   * Test integer(fixed1()) returns fixed1()
   * Test integer(newFixed(maxNewFixed())) returns maxNewFixed()*fixed1()
   */
  function integer(Fraction memory x) internal pure returns (Fraction memory) {
    return Fraction((x.value / FIXED1_UINT) * FIXED1_UINT); // Can't overflow
  }

  /**
   * @notice Returns the fractional part of a fixed point number.
   * In the case of a negative number the fractional is also negative.
   * @dev
   * Test fractional(0) returns 0
   * Test fractional(fixed1()) returns 0
   * Test fractional(fixed1()-1) returns 10^24-1
   */
  function fractional(Fraction memory x) internal pure returns (Fraction memory) {
    return Fraction(x.value - (x.value / FIXED1_UINT) * FIXED1_UINT); // Can't overflow
  }

  /**
   * @notice x+y.
   * @dev The maximum value that can be safely used as an addition operator is defined as
   * maxFixedAdd = maxUint256()-1 / 2, or
   * 57896044618658097711785492504343953926634992332820282019728792003956564819967.
   * Test add(maxFixedAdd,maxFixedAdd) equals maxFixedAdd + maxFixedAdd
   * Test add(maxFixedAdd+1,maxFixedAdd+1) throws
   */
  function add(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) {
    uint256 z = x.value + y.value;
    require(z >= x.value, "add overflow detected");
    return Fraction(z);
  }

  /**
   * @notice x-y.
   * @dev
   * Test subtract(6, 10) fails
   */
  function subtract(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) {
    require(x.value >= y.value, "substraction underflow detected");
    return Fraction(x.value - y.value);
  }

  /**
   * @notice x*y. If any of the operators is higher than the max multiplier value it
   * might overflow.
   * @dev The maximum value that can be safely used as a multiplication operator
   * (maxFixedMul) is calculated as sqrt(maxUint256()*fixed1()),
   * or 340282366920938463463374607431768211455999999999999
   * Test multiply(0,0) returns 0
   * Test multiply(maxFixedMul,0) returns 0
   * Test multiply(0,maxFixedMul) returns 0
   * Test multiply(fixed1()/mulPrecision(),fixed1()*mulPrecision()) returns fixed1()
   * Test multiply(maxFixedMul,maxFixedMul) is around maxUint256()
   * Test multiply(maxFixedMul+1,maxFixedMul+1) fails
   */
  function multiply(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) {
    if (x.value == 0 || y.value == 0) return Fraction(0);
    if (y.value == FIXED1_UINT) return x;
    if (x.value == FIXED1_UINT) return y;

    // Separate into integer and fractional parts
    // x = x1 + x2, y = y1 + y2
    uint256 x1 = integer(x).value / FIXED1_UINT;
    uint256 x2 = fractional(x).value;
    uint256 y1 = integer(y).value / FIXED1_UINT;
    uint256 y2 = fractional(y).value;

    // (x1 + x2) * (y1 + y2) = (x1 * y1) + (x1 * y2) + (x2 * y1) + (x2 * y2)
    uint256 x1y1 = x1 * y1;
    if (x1 != 0) require(x1y1 / x1 == y1, "overflow x1y1 detected");

    // x1y1 needs to be multiplied back by fixed1
    // solium-disable-next-line mixedcase
    uint256 fixed_x1y1 = x1y1 * FIXED1_UINT;
    if (x1y1 != 0) require(fixed_x1y1 / x1y1 == FIXED1_UINT, "overflow x1y1 * fixed1 detected");
    x1y1 = fixed_x1y1;

    uint256 x2y1 = x2 * y1;
    if (x2 != 0) require(x2y1 / x2 == y1, "overflow x2y1 detected");

    uint256 x1y2 = x1 * y2;
    if (x1 != 0) require(x1y2 / x1 == y2, "overflow x1y2 detected");

    x2 = x2 / mulPrecision();
    y2 = y2 / mulPrecision();
    uint256 x2y2 = x2 * y2;
    if (x2 != 0) require(x2y2 / x2 == y2, "overflow x2y2 detected");

    // result = fixed1() * x1 * y1 + x1 * y2 + x2 * y1 + x2 * y2 / fixed1();
    Fraction memory result = Fraction(x1y1);
    result = add(result, Fraction(x2y1)); // Add checks for overflow
    result = add(result, Fraction(x1y2)); // Add checks for overflow
    result = add(result, Fraction(x2y2)); // Add checks for overflow
    return result;
  }

  /**
   * @notice 1/x
   * @dev
   * Test reciprocal(0) fails
   * Test reciprocal(fixed1()) returns fixed1()
   * Test reciprocal(fixed1()*fixed1()) returns 1 // Testing how the fractional is truncated
   * Test reciprocal(1+fixed1()*fixed1()) returns 0 // Testing how the fractional is truncated
   * Test reciprocal(newFixedFraction(1, 1e24)) returns newFixed(1e24)
   */
  function reciprocal(Fraction memory x) internal pure returns (Fraction memory) {
    require(x.value != 0, "can't call reciprocal(0)");
    return Fraction((FIXED1_UINT * FIXED1_UINT) / x.value); // Can't overflow
  }

  /**
   * @notice x/y. If the dividend is higher than the max dividend value, it
   * might overflow. You can use multiply(x,reciprocal(y)) instead.
   * @dev The maximum value that can be safely used as a dividend (maxNewFixed) is defined as
   * divide(maxNewFixed,newFixedFraction(1,fixed1())) is around maxUint256().
   * This yields the value 115792089237316195423570985008687907853269984665640564.
   * Test maxNewFixed equals maxUint256()/fixed1()
   * Test divide(maxNewFixed,1) equals maxNewFixed*(fixed1)
   * Test divide(maxNewFixed+1,multiply(mulPrecision(),mulPrecision())) throws
   * Test divide(fixed1(),0) fails
   * Test divide(maxNewFixed,1) = maxNewFixed*(10^digits())
   * Test divide(maxNewFixed+1,1) throws
   */
  function divide(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) {
    require(y.value != 0, "can't divide by 0");
    uint256 X = x.value * FIXED1_UINT;
    require(X / FIXED1_UINT == x.value, "overflow at divide");
    return Fraction(X / y.value);
  }

  /**
   * @notice x > y
   */
  function gt(Fraction memory x, Fraction memory y) internal pure returns (bool) {
    return x.value > y.value;
  }

  /**
   * @notice x >= y
   */
  function gte(Fraction memory x, Fraction memory y) internal pure returns (bool) {
    return x.value >= y.value;
  }

  /**
   * @notice x < y
   */
  function lt(Fraction memory x, Fraction memory y) internal pure returns (bool) {
    return x.value < y.value;
  }

  /**
   * @notice x <= y
   */
  function lte(Fraction memory x, Fraction memory y) internal pure returns (bool) {
    return x.value <= y.value;
  }

  /**
   * @notice x == y
   */
  function equals(Fraction memory x, Fraction memory y) internal pure returns (bool) {
    return x.value == y.value;
  }

  /**
   * @notice x <= 1
   */
  function isProperFraction(Fraction memory x) internal pure returns (bool) {
    return lte(x, fixed1());
  }
}
          

/Users/pahor/repo/4/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;
    _;
  }
}
          

/Users/pahor/repo/4/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 of the computed quantity (not reduced).
   * @return 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);
  }

}
          

/Users/pahor/repo/4/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));
  }
}
          

/Users/pahor/repo/4/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);
  function isSigner(address, address, bytes32) external view returns (bool);
}
          

/Users/pahor/repo/4/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 Storage version of the contract.
    * @return Major version of the contract.
    * @return Minor version of the contract.
    * @return Patch version of the contract.
   */
  function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256);
}
          

/Users/pahor/repo/4/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);
}
          

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/common/interfaces/IFreezer.sol

pragma solidity ^0.5.13;

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

/Users/pahor/repo/4/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);
}
          

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/common/libraries/Heap.sol

pragma solidity ^0.5.13;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "../FixidityLib.sol";

/**
 * @title Simple heap implementation
 */
library Heap {
  using FixidityLib for FixidityLib.Fraction;
  using SafeMath for uint256;

  /**
   * @notice Fixes the heap invariant.
   * @param keys Pointers to values
   * @param values Values that are compared, only the pointers are changed by this method.
   * @param start Node for which the invariant might have changed.
   * @param length Size of the heap.
   */
  function siftDown(
    uint256[] memory keys,
    FixidityLib.Fraction[] memory values,
    uint256 start,
    uint256 length
  ) internal pure {
    require(keys.length == values.length, "key and value array length mismatch");
    require(start < keys.length, "heap start index out of range");
    require(length <= keys.length, "heap length out of range");
    uint256 i = start;
    while (true) {
      uint256 leftChild = i.mul(2).add(1);
      uint256 rightChild = i.mul(2).add(2);
      uint256 maxIndex = i;
      if (leftChild < length && values[keys[leftChild]].gt(values[keys[maxIndex]])) {
        maxIndex = leftChild;
      }
      if (rightChild < length && values[keys[rightChild]].gt(values[keys[maxIndex]])) {
        maxIndex = rightChild;
      }
      if (maxIndex == i) break;
      uint256 tmpKey = keys[i];
      keys[i] = keys[maxIndex];
      keys[maxIndex] = tmpKey;
      i = maxIndex;
    }
  }

  /**
   * @notice Fixes the heap invariant if top has been changed.
   * @param keys Pointers to values
   * @param values Values that are compared, only the pointers are changed by this method.
   */
  function heapifyDown(uint256[] memory keys, FixidityLib.Fraction[] memory values) internal pure {
    siftDown(keys, values, 0, keys.length);
  }

}
          

/Users/pahor/repo/4/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");
  }
}
          

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/common/linkedlists/AddressSortedLinkedList.sol

pragma solidity ^0.5.13;

import "openzeppelin-solidity/contracts/math/Math.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";

import "./SortedLinkedList.sol";

/**
 * @title Maintains a sorted list of unsigned ints keyed by address.
 */
library AddressSortedLinkedList {
  using SafeMath for uint256;
  using SortedLinkedList for SortedLinkedList.List;

  function toBytes(address a) public pure returns (bytes32) {
    return bytes32(uint256(a) << 96);
  }

  function toAddress(bytes32 b) public pure returns (address) {
    return address(uint256(b) >> 96);
  }

  /**
   * @notice Inserts an element into a doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @param key The key of the element to insert.
   * @param value The element value.
   * @param lesserKey The key of the element less than the element to insert.
   * @param greaterKey The key of the element greater than the element to insert.
   */
  function insert(
    SortedLinkedList.List storage list,
    address key,
    uint256 value,
    address lesserKey,
    address greaterKey
  ) public {
    list.insert(toBytes(key), value, toBytes(lesserKey), toBytes(greaterKey));
  }

  /**
   * @notice Removes an element from the doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @param key The key of the element to remove.
   */
  function remove(SortedLinkedList.List storage list, address key) public {
    list.remove(toBytes(key));
  }

  /**
   * @notice Updates an element in the list.
   * @param list A storage pointer to the underlying list.
   * @param key The element key.
   * @param value The element value.
   * @param lesserKey The key of the element will be just left of `key` after the update.
   * @param greaterKey The key of the element will be just right of `key` after the update.
   * @dev Note that only one of "lesserKey" or "greaterKey" needs to be correct to reduce friction.
   */
  function update(
    SortedLinkedList.List storage list,
    address key,
    uint256 value,
    address lesserKey,
    address greaterKey
  ) public {
    list.update(toBytes(key), value, toBytes(lesserKey), toBytes(greaterKey));
  }

  /**
   * @notice Returns whether or not a particular key is present in the sorted list.
   * @param list A storage pointer to the underlying list.
   * @param key The element key.
   * @return Whether or not the key is in the sorted list.
   */
  function contains(SortedLinkedList.List storage list, address key) public view returns (bool) {
    return list.contains(toBytes(key));
  }

  /**
   * @notice Returns the value for a particular key in the sorted list.
   * @param list A storage pointer to the underlying list.
   * @param key The element key.
   * @return The element value.
   */
  function getValue(SortedLinkedList.List storage list, address key) public view returns (uint256) {
    return list.getValue(toBytes(key));
  }

  /**
   * @notice Gets all elements from the doubly linked list.
   * @return Array of all keys in the list.
   * @return Values corresponding to keys, which will be ordered largest to smallest.
   */
  function getElements(SortedLinkedList.List storage list)
    public
    view
    returns (address[] memory, uint256[] memory)
  {
    bytes32[] memory byteKeys = list.getKeys();
    address[] memory keys = new address[](byteKeys.length);
    uint256[] memory values = new uint256[](byteKeys.length);
    for (uint256 i = 0; i < byteKeys.length; i = i.add(1)) {
      keys[i] = toAddress(byteKeys[i]);
      values[i] = list.values[byteKeys[i]];
    }
    return (keys, values);
  }

  /**
   * @notice Returns the minimum of `max` and the  number of elements in the list > threshold.
   * @param list A storage pointer to the underlying list.
   * @param threshold The number that the element must exceed to be included.
   * @param max The maximum number returned by this function.
   * @return The minimum of `max` and the  number of elements in the list > threshold.
   */
  function numElementsGreaterThan(
    SortedLinkedList.List storage list,
    uint256 threshold,
    uint256 max
  ) public view returns (uint256) {
    uint256 revisedMax = Math.min(max, list.list.numElements);
    bytes32 key = list.list.head;
    for (uint256 i = 0; i < revisedMax; i = i.add(1)) {
      if (list.getValue(key) < threshold) {
        return i;
      }
      key = list.list.elements[key].previousKey;
    }
    return revisedMax;
  }

  /**
   * @notice Returns the N greatest elements of the list.
   * @param list A storage pointer to the underlying list.
   * @param n The number of elements to return.
   * @return The keys of the greatest elements.
   */
  function headN(SortedLinkedList.List storage list, uint256 n)
    public
    view
    returns (address[] memory)
  {
    bytes32[] memory byteKeys = list.headN(n);
    address[] memory keys = new address[](n);
    for (uint256 i = 0; i < n; i = i.add(1)) {
      keys[i] = toAddress(byteKeys[i]);
    }
    return keys;
  }

  /**
   * @notice Gets all element keys from the doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @return All element keys from head to tail.
   */
  function getKeys(SortedLinkedList.List storage list) public view returns (address[] memory) {
    return headN(list, list.list.numElements);
  }
}
          

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/common/linkedlists/LinkedList.sol

pragma solidity ^0.5.13;

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

/**
 * @title Maintains a doubly linked list keyed by bytes32.
 * @dev Following the `next` pointers will lead you to the head, rather than the tail.
 */
library LinkedList {
  using SafeMath for uint256;

  struct Element {
    bytes32 previousKey;
    bytes32 nextKey;
    bool exists;
  }

  struct List {
    bytes32 head;
    bytes32 tail;
    uint256 numElements;
    mapping(bytes32 => Element) elements;
  }

  /**
   * @notice Inserts an element into a doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @param key The key of the element to insert.
   * @param previousKey The key of the element that comes before the element to insert.
   * @param nextKey The key of the element that comes after the element to insert.
   */
  function insert(List storage list, bytes32 key, bytes32 previousKey, bytes32 nextKey) internal {
    require(key != bytes32(0), "Key must be defined");
    require(!contains(list, key), "Can't insert an existing element");
    require(
      previousKey != key && nextKey != key,
      "Key cannot be the same as previousKey or nextKey"
    );

    Element storage element = list.elements[key];
    element.exists = true;

    if (list.numElements == 0) {
      list.tail = key;
      list.head = key;
    } else {
      require(
        previousKey != bytes32(0) || nextKey != bytes32(0),
        "Either previousKey or nextKey must be defined"
      );

      element.previousKey = previousKey;
      element.nextKey = nextKey;

      if (previousKey != bytes32(0)) {
        require(
          contains(list, previousKey),
          "If previousKey is defined, it must exist in the list"
        );
        Element storage previousElement = list.elements[previousKey];
        require(previousElement.nextKey == nextKey, "previousKey must be adjacent to nextKey");
        previousElement.nextKey = key;
      } else {
        list.tail = key;
      }

      if (nextKey != bytes32(0)) {
        require(contains(list, nextKey), "If nextKey is defined, it must exist in the list");
        Element storage nextElement = list.elements[nextKey];
        require(nextElement.previousKey == previousKey, "previousKey must be adjacent to nextKey");
        nextElement.previousKey = key;
      } else {
        list.head = key;
      }
    }

    list.numElements = list.numElements.add(1);
  }

  /**
   * @notice Inserts an element at the tail of the doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @param key The key of the element to insert.
   */
  function push(List storage list, bytes32 key) internal {
    insert(list, key, bytes32(0), list.tail);
  }

  /**
   * @notice Removes an element from the doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @param key The key of the element to remove.
   */
  function remove(List storage list, bytes32 key) internal {
    Element storage element = list.elements[key];
    require(key != bytes32(0) && contains(list, key), "key not in list");
    if (element.previousKey != bytes32(0)) {
      Element storage previousElement = list.elements[element.previousKey];
      previousElement.nextKey = element.nextKey;
    } else {
      list.tail = element.nextKey;
    }

    if (element.nextKey != bytes32(0)) {
      Element storage nextElement = list.elements[element.nextKey];
      nextElement.previousKey = element.previousKey;
    } else {
      list.head = element.previousKey;
    }

    delete list.elements[key];
    list.numElements = list.numElements.sub(1);
  }

  /**
   * @notice Updates an element in the list.
   * @param list A storage pointer to the underlying list.
   * @param key The element key.
   * @param previousKey The key of the element that comes before the updated element.
   * @param nextKey The key of the element that comes after the updated element.
   */
  function update(List storage list, bytes32 key, bytes32 previousKey, bytes32 nextKey) internal {
    require(
      key != bytes32(0) && key != previousKey && key != nextKey && contains(list, key),
      "key on in list"
    );
    remove(list, key);
    insert(list, key, previousKey, nextKey);
  }

  /**
   * @notice Returns whether or not a particular key is present in the sorted list.
   * @param list A storage pointer to the underlying list.
   * @param key The element key.
   * @return Whether or not the key is in the sorted list.
   */
  function contains(List storage list, bytes32 key) internal view returns (bool) {
    return list.elements[key].exists;
  }

  /**
   * @notice Returns the keys of the N elements at the head of the list.
   * @param list A storage pointer to the underlying list.
   * @param n The number of elements to return.
   * @return The keys of the N elements at the head of the list.
   * @dev Reverts if n is greater than the number of elements in the list.
   */
  function headN(List storage list, uint256 n) internal view returns (bytes32[] memory) {
    require(n <= list.numElements, "not enough elements");
    bytes32[] memory keys = new bytes32[](n);
    bytes32 key = list.head;
    for (uint256 i = 0; i < n; i = i.add(1)) {
      keys[i] = key;
      key = list.elements[key].previousKey;
    }
    return keys;
  }

  /**
   * @notice Gets all element keys from the doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @return All element keys from head to tail.
   */
  function getKeys(List storage list) internal view returns (bytes32[] memory) {
    return headN(list, list.numElements);
  }
}
          

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/common/linkedlists/SortedLinkedList.sol

pragma solidity ^0.5.13;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "./LinkedList.sol";

/**
 * @title Maintains a sorted list of unsigned ints keyed by bytes32.
 */
library SortedLinkedList {
  using SafeMath for uint256;
  using LinkedList for LinkedList.List;

  struct List {
    LinkedList.List list;
    mapping(bytes32 => uint256) values;
  }

  /**
   * @notice Inserts an element into a doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @param key The key of the element to insert.
   * @param value The element value.
   * @param lesserKey The key of the element less than the element to insert.
   * @param greaterKey The key of the element greater than the element to insert.
   */
  function insert(
    List storage list,
    bytes32 key,
    uint256 value,
    bytes32 lesserKey,
    bytes32 greaterKey
  ) internal {
    require(
      key != bytes32(0) && key != lesserKey && key != greaterKey && !contains(list, key),
      "invalid key"
    );
    require(
      (lesserKey != bytes32(0) || greaterKey != bytes32(0)) || list.list.numElements == 0,
      "greater and lesser key zero"
    );
    require(contains(list, lesserKey) || lesserKey == bytes32(0), "invalid lesser key");
    require(contains(list, greaterKey) || greaterKey == bytes32(0), "invalid greater key");
    (lesserKey, greaterKey) = getLesserAndGreater(list, value, lesserKey, greaterKey);
    list.list.insert(key, lesserKey, greaterKey);
    list.values[key] = value;
  }

  /**
   * @notice Removes an element from the doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @param key The key of the element to remove.
   */
  function remove(List storage list, bytes32 key) internal {
    list.list.remove(key);
    list.values[key] = 0;
  }

  /**
   * @notice Updates an element in the list.
   * @param list A storage pointer to the underlying list.
   * @param key The element key.
   * @param value The element value.
   * @param lesserKey The key of the element will be just left of `key` after the update.
   * @param greaterKey The key of the element will be just right of `key` after the update.
   * @dev Note that only one of "lesserKey" or "greaterKey" needs to be correct to reduce friction.
   */
  function update(
    List storage list,
    bytes32 key,
    uint256 value,
    bytes32 lesserKey,
    bytes32 greaterKey
  ) internal {
    remove(list, key);
    insert(list, key, value, lesserKey, greaterKey);
  }

  /**
   * @notice Inserts an element at the tail of the doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @param key The key of the element to insert.
   */
  function push(List storage list, bytes32 key) internal {
    insert(list, key, 0, bytes32(0), list.list.tail);
  }

  /**
   * @notice Removes N elements from the head of the list and returns their keys.
   * @param list A storage pointer to the underlying list.
   * @param n The number of elements to pop.
   * @return The keys of the popped elements.
   */
  function popN(List storage list, uint256 n) internal returns (bytes32[] memory) {
    require(n <= list.list.numElements, "not enough elements");
    bytes32[] memory keys = new bytes32[](n);
    for (uint256 i = 0; i < n; i = i.add(1)) {
      bytes32 key = list.list.head;
      keys[i] = key;
      remove(list, key);
    }
    return keys;
  }

  /**
   * @notice Returns whether or not a particular key is present in the sorted list.
   * @param list A storage pointer to the underlying list.
   * @param key The element key.
   * @return Whether or not the key is in the sorted list.
   */
  function contains(List storage list, bytes32 key) internal view returns (bool) {
    return list.list.contains(key);
  }

  /**
   * @notice Returns the value for a particular key in the sorted list.
   * @param list A storage pointer to the underlying list.
   * @param key The element key.
   * @return The element value.
   */
  function getValue(List storage list, bytes32 key) internal view returns (uint256) {
    return list.values[key];
  }

  /**
   * @notice Gets all elements from the doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @return Array of all keys in the list.
   * @return Values corresponding to keys, which will be ordered largest to smallest.
   */
  function getElements(List storage list)
    internal
    view
    returns (bytes32[] memory, uint256[] memory)
  {
    bytes32[] memory keys = getKeys(list);
    uint256[] memory values = new uint256[](keys.length);
    for (uint256 i = 0; i < keys.length; i = i.add(1)) {
      values[i] = list.values[keys[i]];
    }
    return (keys, values);
  }

  /**
   * @notice Gets all element keys from the doubly linked list.
   * @param list A storage pointer to the underlying list.
   * @return All element keys from head to tail.
   */
  function getKeys(List storage list) internal view returns (bytes32[] memory) {
    return list.list.getKeys();
  }

  /**
   * @notice Returns first N greatest elements of the list.
   * @param list A storage pointer to the underlying list.
   * @param n The number of elements to return.
   * @return The keys of the first n elements.
   * @dev Reverts if n is greater than the number of elements in the list.
   */
  function headN(List storage list, uint256 n) internal view returns (bytes32[] memory) {
    return list.list.headN(n);
  }

  /**
   * @notice Returns the keys of the elements greaterKey than and less than the provided value.
   * @param list A storage pointer to the underlying list.
   * @param value The element value.
   * @param lesserKey The key of the element which could be just left of the new value.
   * @param greaterKey The key of the element which could be just right of the new value.
   * @return The correct lesserKey keys.
   * @return The correct greaterKey keys.
   */
  function getLesserAndGreater(
    List storage list,
    uint256 value,
    bytes32 lesserKey,
    bytes32 greaterKey
  ) private view returns (bytes32, bytes32) {
    // Check for one of the following conditions and fail if none are met:
    //   1. The value is less than the current lowest value
    //   2. The value is greater than the current greatest value
    //   3. The value is just greater than the value for `lesserKey`
    //   4. The value is just less than the value for `greaterKey`
    if (lesserKey == bytes32(0) && isValueBetween(list, value, lesserKey, list.list.tail)) {
      return (lesserKey, list.list.tail);
    } else if (
      greaterKey == bytes32(0) && isValueBetween(list, value, list.list.head, greaterKey)
    ) {
      return (list.list.head, greaterKey);
    } else if (
      lesserKey != bytes32(0) &&
      isValueBetween(list, value, lesserKey, list.list.elements[lesserKey].nextKey)
    ) {
      return (lesserKey, list.list.elements[lesserKey].nextKey);
    } else if (
      greaterKey != bytes32(0) &&
      isValueBetween(list, value, list.list.elements[greaterKey].previousKey, greaterKey)
    ) {
      return (list.list.elements[greaterKey].previousKey, greaterKey);
    } else {
      require(false, "get lesser and greater failure");
    }
  }

  /**
   * @notice Returns whether or not a given element is between two other elements.
   * @param list A storage pointer to the underlying list.
   * @param value The element value.
   * @param lesserKey The key of the element whose value should be lesserKey.
   * @param greaterKey The key of the element whose value should be greaterKey.
   * @return True if the given element is between the two other elements.
   */
  function isValueBetween(List storage list, uint256 value, bytes32 lesserKey, bytes32 greaterKey)
    private
    view
    returns (bool)
  {
    bool isLesser = lesserKey == bytes32(0) || list.values[lesserKey] <= value;
    bool isGreater = greaterKey == bytes32(0) || list.values[greaterKey] >= value;
    return isLesser && isGreater;
  }
}
          

/Users/pahor/repo/4/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 allowedToVoteOverMaxNumberOfGroups(address) external returns (bool);
  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;
}
          

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/governance/interfaces/IGovernance.sol

pragma solidity ^0.5.13;

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

/Users/pahor/repo/4/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);
}
          

/Users/pahor/repo/4/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;

}
          

/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/identity/interfaces/IAttestations.sol

pragma solidity ^0.5.13;

interface IAttestations {
  function revoke(bytes32, uint256) external;
  function withdraw(address) 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;
}
          

/Users/pahor/repo/4/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);
}
          

/Users/pahor/repo/4/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);
}
          

/Users/pahor/repo/4/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;
}
          

/Users/pahor/repo/4/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);
}
          

/Users/pahor/repo/4/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/math/Math.sol

pragma solidity ^0.5.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}
          

/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);
}
          

Compiler Settings

{"remappings":[],"optimizer":{"runs":200,"enabled":false},"libraries":{},"evmVersion":"istanbul","compilationTarget":{"/Users/pahor/repo/4/celo-monorepo/packages/protocol/contracts/governance/Election.sol":"Election"}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"bool","name":"test","internalType":"bool"}]},{"type":"event","name":"AllowedToVoteOverMaxNumberOfGroups","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"bool","name":"flag","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"ElectabilityThresholdSet","inputs":[{"type":"uint256","name":"electabilityThreshold","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ElectableValidatorsSet","inputs":[{"type":"uint256","name":"min","internalType":"uint256","indexed":false},{"type":"uint256","name":"max","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EpochRewardsDistributedToVoters","inputs":[{"type":"address","name":"group","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"MaxNumGroupsVotedForSet","inputs":[{"type":"uint256","name":"maxNumGroupsVotedFor","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":"ValidatorGroupActiveVoteRevoked","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"group","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"uint256","name":"units","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ValidatorGroupMarkedEligible","inputs":[{"type":"address","name":"group","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ValidatorGroupMarkedIneligible","inputs":[{"type":"address","name":"group","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ValidatorGroupPendingVoteRevoked","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"group","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ValidatorGroupVoteActivated","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"group","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"uint256","name":"units","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ValidatorGroupVoteCast","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"group","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"activate","inputs":[{"type":"address","name":"group","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"activateForAccount","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"address","name":"account","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"allowedToVoteOverMaxNumberOfGroups","inputs":[{"type":"address","name":"","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"totalVotes","internalType":"uint256"}],"name":"cachedVotesByAccount","inputs":[{"type":"address","name":"","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"canReceiveVotes","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"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":"distributeEpochRewards","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"address","name":"lesser","internalType":"address"},{"type":"address","name":"greater","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"electNValidatorSigners","inputs":[{"type":"uint256","name":"minElectableValidators","internalType":"uint256"},{"type":"uint256","name":"maxElectableValidators","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"electValidatorSigners","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"value","internalType":"uint256"}],"name":"electabilityThreshold","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"min","internalType":"uint256"},{"type":"uint256","name":"max","internalType":"uint256"}],"name":"electableValidators","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"forceDecrementVotes","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"address[]","name":"lessers","internalType":"address[]"},{"type":"address[]","name":"greaters","internalType":"address[]"},{"type":"uint256[]","name":"indices","internalType":"uint256[]"}],"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":"uint256","name":"","internalType":"uint256"}],"name":"getActiveVoteUnitsForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getActiveVoteUnitsForGroupByAccount","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getActiveVotes","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getActiveVotesForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getActiveVotesForGroupByAccount","inputs":[{"type":"address","name":"group","internalType":"address"},{"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":"address[]","name":"","internalType":"address[]"}],"name":"getCurrentValidatorSigners","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getElectabilityThreshold","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getElectableValidators","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getEligibleValidatorGroups","inputs":[],"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":"bool","name":"","internalType":"bool"}],"name":"getGroupEligibility","inputs":[{"type":"address","name":"group","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getGroupEpochRewards","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"totalEpochRewards","internalType":"uint256"},{"type":"uint256[]","name":"uptimes","internalType":"uint256[]"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getGroupsVotedForByAccount","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNumVotesReceivable","inputs":[{"type":"address","name":"group","internalType":"address"}],"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":"uint256","name":"","internalType":"uint256"}],"name":"getPendingVotesForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getPendingVotesForGroupByAccount","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalVotes","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalVotesByAccount","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":"groups","internalType":"address[]"},{"type":"uint256[]","name":"values","internalType":"uint256[]"}],"name":"getTotalVotesForEligibleValidatorGroups","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalVotesForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalVotesForGroupByAccount","inputs":[{"type":"address","name":"group","internalType":"address"},{"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":"bool","name":"","internalType":"bool"}],"name":"hasActivatablePendingVotes","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"address","name":"group","internalType":"address"}],"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":"minElectableValidators","internalType":"uint256"},{"type":"uint256","name":"maxElectableValidators","internalType":"uint256"},{"type":"uint256","name":"_maxNumGroupsVotedFor","internalType":"uint256"},{"type":"uint256","name":"_electabilityThreshold","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":"nonpayable","payable":false,"outputs":[],"name":"markGroupEligible","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"address","name":"lesser","internalType":"address"},{"type":"address","name":"greater","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"markGroupIneligible","inputs":[{"type":"address","name":"group","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxNumGroupsVotedFor","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":"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":[{"type":"bool","name":"","internalType":"bool"}],"name":"revokeActive","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"address","name":"lesser","internalType":"address"},{"type":"address","name":"greater","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"revokeAllActive","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"address","name":"lesser","internalType":"address"},{"type":"address","name":"greater","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"revokePending","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"address","name":"lesser","internalType":"address"},{"type":"address","name":"greater","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setAllowedToVoteOverMaxNumberOfGroups","inputs":[{"type":"bool","name":"flag","internalType":"bool"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setElectabilityThreshold","inputs":[{"type":"uint256","name":"threshold","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setElectableValidators","inputs":[{"type":"uint256","name":"min","internalType":"uint256"},{"type":"uint256","name":"max","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setMaxNumGroupsVotedFor","inputs":[{"type":"uint256","name":"_maxNumGroupsVotedFor","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":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"updateTotalVotesByAccountForGroup","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"address","name":"group","internalType":"address"}],"constant":false},{"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":[{"type":"bool","name":"","internalType":"bool"}],"name":"vote","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"address","name":"lesser","internalType":"address"},{"type":"address","name":"greater","internalType":"address"}],"constant":false}]
              

Contract Creation Code

Verify & Publish
0x60806040523480156200001157600080fd5b506040516200ae4f3803806200ae4f833981810160405260208110156200003757600080fd5b81019080805190602001909291905050508060006200005b6200012a60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600180819055508062000122576001600260006101000a81548160ff0219169083151502179055505b505062000132565b600033905090565b61ad0d80620001426000396000f3fe608060405234801561001057600080fd5b50600436106103fc5760003560e01c80638f32d59b11610215578063cb08c99311610125578063e59ea3e8116100b8578063f911f0b711610087578063f911f0b714611da8578063f92ad21914611df8578063f9d7daae14611e64578063f9f41a7a14611e89578063fae8db0a14611eae576103fc565b8063e59ea3e814611bcc578063ec68307214611c32578063f23263f914611cad578063f2fde38b14611d64576103fc565b8063dedafeae116100f4578063dedafeae14611a6e578063df4da46114611ac6578063e0a2ab5214611ae4578063e50e652d14611b8a576103fc565b8063cb08c99314611912578063d190d5801461196e578063d3e242a4146119c6578063d52758aa14611a3e576103fc565b80639dfb6081116101a8578063a8e4587111610177578063a8e45871146117d2578063a91ee0dc14611816578063ac839d691461185a578063bdd1431814611878578063c14470c414611896576103fc565b80639dfb6081146115c7578063a18fb2db14611677578063a2fb4ddf146116fb578063a5826ab214611773576103fc565b80639a0e7d66116101e45780639a0e7d66146114d15780639a7b3be7146114ef5780639b2b592f1461150d5780639b95975f1461154f576103fc565b80638f32d59b1461137257806390a4dd5c14611394578063926d00ca1461142157806395128ce314611479576103fc565b806354255be0116103105780637046c96b116102a357806387ee8a0f1161027257806387ee8a0f1461107e5780638a8836261461109c5780638c6667751461116b5780638da5cb5b146111c75780638ef01def14611211576103fc565b80637046c96b14610f65578063715018a61461100c5780637385e5da146110165780637b10399914611034576103fc565b8063631db7e7116102df578063631db7e714610d4857806367960e9114610d8e5780636c781a2c14610e5d5780636e19847514610eb5576103fc565b806354255be014610b9f578063580d747a14610bd25780635bb5acfb14610c785780635d180adb14610cd0576103fc565b80632c3b7916116103935780633c55a73c116103625780633c55a73c14610974578063448144c8146109ba578063457578a314610a195780634b2c2f4414610ab25780634be8843b14610b81576103fc565b80632c3b7916146107fe57806335a8376b1461085657806338617272146108ba5780633b1eb4bf14610932576103fc565b80631f604243116103cf5780631f6042431461057b57806323f0ab6514610599578063263ecf74146107235780632ba38e691461079f576103fc565b8063123633ea1461040157806312541a6b1461046f578063158ef93e146104fd5780631c5a9d9c1461051f575b600080fd5b61042d6004803603602081101561041757600080fd5b8101908080359060200190929190505050611ef0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104fb6004803603608081101561048557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612041565b005b6105056120f5565b604051808215151515815260200191505060405180910390f35b6105616004803603602081101561053557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612108565b604051808215151515815260200191505060405180910390f35b61058361226e565b6040518082815260200191505060405180910390f35b610709600480360360608110156105af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156105ec57600080fd5b8201836020820111156105fe57600080fd5b8035906020019184600183028401116401000000008311171561062057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561068357600080fd5b82018360208201111561069557600080fd5b803590602001918460018302840111640100000000831117156106b757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061227e565b604051808215151515815260200191505060405180910390f35b6107856004803603604081101561073957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612437565b604051808215151515815260200191505060405180910390f35b6107a76124e8565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107ea5780820151818401526020810190506107cf565b505050509050019250505060405180910390f35b6108406004803603602081101561081457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612503565b6040518082815260200191505060405180910390f35b6108b86004803603604081101561086c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612729565b005b61091c600480360360408110156108d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128df565b6040518082815260200191505060405180910390f35b61095e6004803603602081101561094857600080fd5b8101908080359060200190929190505050612919565b6040518082815260200191505060405180910390f35b6109a06004803603602081101561098a57600080fd5b8101908080359060200190929190505050612933565b604051808215151515815260200191505060405180910390f35b6109c2612a6e565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a055780820151818401526020810190506109ea565b505050509050019250505060405180910390f35b610a5b60048036036020811015610a2f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612b31565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a9e578082015181840152602081019050610a83565b505050509050019250505060405180910390f35b610b6b60048036036020811015610ac857600080fd5b8101908080359060200190640100000000811115610ae557600080fd5b820183602082011115610af757600080fd5b80359060200191846001830284011164010000000083111715610b1957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612c01565b6040518082815260200191505060405180910390f35b610b89612d95565b6040518082815260200191505060405180910390f35b610ba7612da1565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610c5e60048036036080811015610be857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612dc8565b604051808215151515815260200191505060405180910390f35b610cba60048036036020811015610c8e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061349b565b6040518082815260200191505060405180910390f35b610d0660048036036040811015610ce657600080fd5b8101908080359060200190929190803590602001909291905050506134ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d7460048036036020811015610d5e57600080fd5b810190808035906020019092919050505061363f565b604051808215151515815260200191505060405180910390f35b610e4760048036036020811015610da457600080fd5b8101908080359060200190640100000000811115610dc157600080fd5b820183602082011115610dd357600080fd5b80359060200191846001830284011164010000000083111715610df557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613798565b6040518082815260200191505060405180910390f35b610e9f60048036036020811015610e7357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061392c565b6040518082815260200191505060405180910390f35b610f4b600480360360a0811015610ecb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613abb565b604051808215151515815260200191505060405180910390f35b610f6d613b64565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610fb4578082015181840152602081019050610f99565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610ff6578082015181840152602081019050610fdb565b5050505090500194505050505060405180910390f35b611014613d2f565b005b61101e613e68565b6040518082815260200191505060405180910390f35b61103c613e78565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b611086613e9e565b6040518082815260200191505060405180910390f35b611155600480360360208110156110b257600080fd5b81019080803590602001906401000000008111156110cf57600080fd5b8201836020820111156110e157600080fd5b8035906020019184600183028401116401000000008311171561110357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613fe5565b6040518082815260200191505060405180910390f35b6111ad6004803603602081101561118157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614179565b604051808215151515815260200191505060405180910390f35b6111cf614249565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61135c600480360360a081101561122757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561126e57600080fd5b82018360208201111561128057600080fd5b803590602001918460208302840111640100000000831117156112a257600080fd5b9091929391929390803590602001906401000000008111156112c357600080fd5b8201836020820111156112d557600080fd5b803590602001918460208302840111640100000000831117156112f757600080fd5b90919293919293908035906020019064010000000081111561131857600080fd5b82018360208201111561132a57600080fd5b8035906020019184602083028401116401000000008311171561134c57600080fd5b9091929391929390505050614272565b6040518082815260200191505060405180910390f35b61137a61481c565b604051808215151515815260200191505060405180910390f35b6113ca600480360360408110156113aa57600080fd5b81019080803590602001909291908035906020019092919050505061487a565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561140d5780820151818401526020810190506113f2565b505050509050019250505060405180910390f35b6114636004803603602081101561143757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061535b565b6040518082815260200191505060405180910390f35b6114bb6004803603602081101561148f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506153ad565b6040518082815260200191505060405180910390f35b6114d96153ff565b6040518082815260200191505060405180910390f35b6114f7615429565b6040518082815260200191505060405180910390f35b6115396004803603602081101561152357600080fd5b8101908080359060200190929190505050615439565b6040518082815260200191505060405180910390f35b6115b16004803603604081101561156557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615582565b6040518082815260200191505060405180910390f35b61165d600480360360a08110156115dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050615615565b604051808215151515815260200191505060405180910390f35b6116f96004803603606081101561168d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615a74565b005b61175d6004803603604081101561171157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615d74565b6040518082815260200191505060405180910390f35b61177b615e04565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156117be5780820151818401526020810190506117a3565b505050509050019250505060405180910390f35b611814600480360360208110156117e857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615f38565b005b6118586004803603602081101561182c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506161b8565b005b61186261635c565b6040518082815260200191505060405180910390f35b611880616362565b6040518082815260200191505060405180910390f35b6118f8600480360360408110156118ac57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050616388565b604051808215151515815260200191505060405180910390f35b6119546004803603602081101561192857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061642b565b604051808215151515815260200191505060405180910390f35b6119b06004803603602081101561198457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061644b565b6040518082815260200191505060405180910390f35b611a28600480360360408110156119dc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050616469565b6040518082815260200191505060405180910390f35b611a6c60048036036020811015611a5457600080fd5b81019080803515159060200190929190505050616502565b005b611ab060048036036020811015611a8457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061695e565b6040518082815260200191505060405180910390f35b611ace616a0a565b6040518082815260200191505060405180910390f35b611b7060048036036080811015611afa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050616b46565b604051808215151515815260200191505060405180910390f35b611bb660048036036020811015611ba057600080fd5b8101908080359060200190929190505050616cc1565b6040518082815260200191505060405180910390f35b611c1860048036036040811015611be257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050616d0c565b604051808215151515815260200191505060405180910390f35b611c90600480360360c0811015611c4857600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050616f56565b604051808381526020018281526020019250505060405180910390f35b611d4e60048036036060811015611cc357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115611d0a57600080fd5b820183602082011115611d1c57600080fd5b80359060200191846020830284011164010000000083111715611d3e57600080fd5b909192939192939050505061716a565b6040518082815260200191505060405180910390f35b611da660048036036020811015611d7a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506174a4565b005b611dde60048036036040811015611dbe57600080fd5b81019080803590602001909291908035906020019092919050505061752a565b604051808215151515815260200191505060405180910390f35b611e62600480360360a0811015611e0e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919050505061775a565b005b611e6c617830565b604051808381526020018281526020019250505060405180910390f35b611e91617842565b604051808381526020018281526020019250505060405180910390f35b611eda60048036036020811015611ec457600080fd5b8101908080359060200190929190505050617859565b6040518082815260200191505060405180910390f35b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611f695780518252602082019150602081019050602083039250611f46565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611fc9576040519150601f19603f3d011682016040523d82523d6000602084013e611fce565b606091505b5080935081925050508061202d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061aa72603d913960400191505060405180910390fd5b6120388260006179a2565b92505050919050565b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c7920564d2063616e2063616c6c0000000000000000000000000000000081525060200191505060405180910390fd5b6120ef848484846179b9565b50505050565b600260009054906101000a900460ff1681565b60006001806000828254019250508190555060006001549050600061212b617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121a757600080fd5b505afa1580156121bb573d6000803e3d6000fd5b505050506040513d60208110156121d157600080fd5b810190808051906020019092919050505090506121ee8482617e95565b9250506001548114612268576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50919050565b6000600360020160000154905090565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b6020831061230757805182526020820191506020810190506020830392506122e4565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b602083106123585780518252602082019150602081019050602083039250612335565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b602083106123c1578051825260208201915060208101905060208303925061239e565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612421576040519150601f19603f3d011682016040523d82523d6000602084013e612426565b606091505b505080915050809150509392505050565b600080600360000160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506124c9615429565b81600101541080156124df575060008160000154115b91505092915050565b60606124fe600d60000154600d6001015461487a565b905090565b6000806126716125116180b2565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b15801561255657600080fd5b505afa15801561256a573d6000803e3d6000fd5b505050506040513d602081101561258057600080fd5b8101908080519060200190929190505050612663600161259e6181ad565b73ffffffffffffffffffffffffffffffffffffffff166339e618e8886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561261a57600080fd5b505afa15801561262e573d6000803e3d6000fd5b505050506040513d602081101561264457600080fd5b81019080805190602001909291905050506182a890919063ffffffff16565b61833090919063ffffffff16565b9050600061270b600d600101546126866181ad565b73ffffffffffffffffffffffffffffffffffffffff1663517f6d336040518163ffffffff1660e01b815260040160206040518083038186803b1580156126cb57600080fd5b505afa1580156126df573d6000803e3d6000fd5b505050506040513d60208110156126f557600080fd5b81019080805190602001909291905050506183b6565b905061272081836183cf90919063ffffffff16565b92505050919050565b601260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282540392505081905550600061280482846128df565b905080601260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080601260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282540192505081905550505050565b6000806128ec8484615582565b905060006128fa8585616469565b905061290f81836182a890919063ffffffff16565b9250505092915050565b600061292c82612927616a0a565b618419565b9050919050565b600061293d61481c565b6129af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600f54821415612a27576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4d61782067726f75707320766f74656420666f72206e6f74206368616e67656481525060200191505060405180910390fd5b81600f819055507f1993a3864c31265ef86eec51d147eff697dee0466c92ac9abddcc4c4c6829348826040518082815260200191505060405180910390a160019050919050565b60606000612a7a613e9e565b9050606081604051908082528060200260200182016040528015612aad5781602001602082028038833980820191505090505b50905060008090505b82811015612b2857612ac781611ef0565b828281518110612ad357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612b216001826182a890919063ffffffff16565b9050612ab6565b50809250505090565b6060600360090160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015612bf557602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612bab575b50505050509050919050565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310612c565780518252602082019150602081019050602083039250612c33565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310612cbd5780518252602082019150602081019050602083039250612c9a565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612d1d576040519150601f19603f3d011682016040523d82523d6000602084013e612d22565b606091505b50809350819250505080612d81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018061a9e16038913960400191505060405180910390fd5b612d8c826000618461565b92505050919050565b60108060000154905081565b60008060008060018060036000839350829250819150809050935093509350935090919293565b600060018060008282540192505081905550600060015490506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091886040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612e6d57600080fd5b505af4158015612e81573d6000803e3d6000fd5b505050506040513d6020811015612e9757600080fd5b8101908080519060200190929190505050612f1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f7570206e6f7420656c696769626c65000000000000000000000000000081525060200191505060405180910390fd5b84600010612f90576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b612f9a8686616d0c565b61300c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f47726f75702063616e6e6f74207265636569766520766f74657300000000000081525060200191505060405180910390fd5b6000613016617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561309257600080fd5b505afa1580156130a6573d6000803e3d6000fd5b505050506040513d60208110156130bc57600080fd5b8101908080519060200190929190505050905060008090506000600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008090505b81805490508110156131b657828061319957508973ffffffffffffffffffffffffffffffffffffffff1682828154811061315657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b92506131af6001826182a890919063ffffffff16565b9050613120565b50816132f157601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806132195750600f548180549050105b61328b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74656420666f7220746f6f206d616e792067726f7570730000000000000081525060200191505060405180910390fd5b808990806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b6132fc89848a618502565b613309838a8a8a8a61860a565b6133116180b2565b73ffffffffffffffffffffffffffffffffffffffff166318a4ff8c848a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561339757600080fd5b505af11580156133ab573d6000803e3d6000fd5b505050508873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd3532f70444893db82221041edb4dc26c94593aeb364b0b14dfc77d5ee9051528a6040518082815260200191505060405180910390a3600194505050506001548114613492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50949350505050565b6000600360020160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106135665780518252602082019150602081019050602083039250613543565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146135c6576040519150601f19603f3d011682016040523d82523d6000602084013e6135cb565b606091505b5080935081925050508061362a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061aae46036913960400191505060405180910390fd5b6136358260006179a2565b9250505092915050565b600061364961481c565b6136bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6136c482618860565b6010600082015181600001559050506137036136de61887e565b60106040518060200160405290816000820154815250506188a490919063ffffffff16565b613758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061a9b3602e913960400191505060405180910390fd5b7f9854be03126e38f9c318d8aabe1b150d09cb3a57059b21855b1e11d44e082c1a826040518082815260200191505060405180910390a160019050919050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b602083106137ed57805182526020820191506020810190506020830392506137ca565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106138545780518252602082019150602081019050602083039250613831565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146138b4576040519150601f19603f3d011682016040523d82523d6000602084013e6138b9565b606091505b50809350819250505080613918576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061ac7d6023913960400191505060405180910390fd5b613923826000618461565b92505050919050565b60006060600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156139f257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116139a8575b50505050509050600f5481511115613a4f57601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154915050613ab6565b600080905060008090505b8251811015613aaf57613a92613a83848381518110613a7557fe5b6020026020010151876128df565b836182a890919063ffffffff16565b9150613aa86001826182a890919063ffffffff16565b9050613a5a565b5080925050505b919050565b60006001806000828254019250508190555060006001549050613ae187878787876188b9565b91506001548114613b5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b6060806003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6369b317e390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015613bbf57600080fd5b505af4158015613bd3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506040811015613bfd57600080fd5b8101908080516040519392919084640100000000821115613c1d57600080fd5b83820191506020820185811115613c3357600080fd5b8251866020820283011164010000000082111715613c5057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613c87578082015181840152602081019050613c6c565b5050505090500160405260200180516040519392919084640100000000821115613cb057600080fd5b83820191506020820185811115613cc657600080fd5b8251866020820283011164010000000082111715613ce357600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613d1a578082015181840152602081019050613cff565b50505050905001604052505050915091509091565b613d3761481c565b613da9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000613e7343616cc1565b905090565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310613f0f5780518252602082019150602081019050602083039250613eec565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613f6f576040519150601f19603f3d011682016040523d82523d6000602084013e613f74565b606091505b50809350819250505080613fd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061aaaf6035913960400191505060405180910390fd5b613fde8260006179a2565b9250505090565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061403a5780518252602082019150602081019050602083039250614017565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106140a1578051825260208201915060208101905060208303925061407e565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114614101576040519150601f19603f3d011682016040523d82523d6000602084013e614106565b606091505b50809350819250505080614165576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603181526020018061abfa6031913960400191505060405180910390fd5b6141708260006179a2565b92505050919050565b60006003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561420757600080fd5b505af415801561421b573d6000803e3d6000fd5b505050506040513d602081101561423157600080fd5b81019080805190602001909291905050509050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600180600082825401925050819055506000600154905060405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561435c57600080fd5b505afa158015614370573d6000803e3d6000fd5b505050506040513d602081101561438657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614614420576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b60008a11614479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061ac566027913960400191505060405180910390fd5b61448161a832565b6040518060400160405280600360090160008f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561454e57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311614504575b505050505081526020018c81525090508060000151518a8a90501115801561457b5750878790508a8a9050145b801561458c57508585905088889050145b6145e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061a9536021913960400191505060405180910390fd5b600081600001515190505b6000811115614718576146e26146cf8e8460000151614615600186618c9590919063ffffffff16565b8151811061461f57fe5b602002602001015185602001518f8f614642600189618c9590919063ffffffff16565b81811061464b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168e8e61467e60018a618c9590919063ffffffff16565b81811061468757fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168d8d6146ba60018b618c9590919063ffffffff16565b8181106146c357fe5b90506020020135618cdf565b8360200151618c9590919063ffffffff16565b8260200181815250506000826020015114156146fd57614718565b614711600182618c9590919063ffffffff16565b90506145ec565b506000816020015114614793576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4661696c75726520746f2064656372656d656e7420616c6c20766f7465732e0081525060200191505060405180910390fd5b8a93505050600154811461480f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5098975050505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661485e618ef4565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606060006148be6148b961489461488f6153ff565b618efc565b6010604051806020016040529081600082015481525050618f8690919063ffffffff16565b6193e5565b905060006003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6342b6351a909184876040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561492a57600080fd5b505af415801561493e573d6000803e3d6000fd5b505050506040513d602081101561495457600080fd5b8101908080519060200190929190505050905060606003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63dcb2a4dd9091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b1580156149c957600080fd5b505af41580156149dd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a0757600080fd5b8101908080516040519392919084640100000000821115614a2757600080fd5b83820191506020820185811115614a3d57600080fd5b8251866020820283011164010000000082111715614a5a57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614a91578082015181840152602081019050614a76565b5050505090500160405250505090506060614aaa6181ad565b73ffffffffffffffffffffffffffffffffffffffff166370447754836040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015614b18578082015181840152602081019050614afd565b505050509050019250505060006040518083038186803b158015614b3b57600080fd5b505afa158015614b4f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614b7957600080fd5b8101908080516040519392919084640100000000821115614b9957600080fd5b83820191506020820185811115614baf57600080fd5b8251866020820283011164010000000082111715614bcc57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614c03578082015181840152602081019050614be8565b50505050905001604052505050905060608251604051908082528060200260200182016040528015614c445781602001602082028038833980820191505090505b509050600080905060608451604051908082528060200260200182016040528015614c7e5781602001602082028038833980820191505090505b50905060608551604051908082528060200260200182016040528015614cbe57816020015b614cab61a84c565b815260200190600190039081614ca35790505b50905060008090505b8651811015614dfd5780838281518110614cdd57fe5b602002602001018181525050614dcb6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b390918a8581518110614d1c57fe5b60200260200101516040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015614d8b57600080fd5b505af4158015614d9f573d6000803e3d6000fd5b505050506040513d6020811015614db557600080fd5b8101908080519060200190929190505050618efc565b828281518110614dd757fe5b6020026020010181905250614df66001826182a890919063ffffffff16565b9050614cc7565b505b8983108015614e0f575060008651115b1561504957600082600081518110614e2357fe5b602002602001015190506000614e4b838381518110614e3e57fe5b6020026020010151619406565b1415614e575750615049565b848181518110614e6357fe5b6020026020010151868281518110614e7757fe5b602002602001015111614eaa57614e8e6000618860565b828281518110614e9a57fe5b6020026020010181905250615039565b614ed16001868381518110614ebb57fe5b60200260200101516182a890919063ffffffff16565b858281518110614edd57fe5b602002602001018181525050614efd6001856182a890919063ffffffff16565b9350615021614f31614f2c6001888581518110614f1657fe5b60200260200101516182a890919063ffffffff16565b618efc565b6150136003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b390918c8781518110614f6457fe5b60200260200101516040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015614fd357600080fd5b505af4158015614fe7573d6000803e3d6000fd5b505050506040513d6020811015614ffd57600080fd5b8101908080519060200190929190505050618efc565b61941490919063ffffffff16565b82828151811061502d57fe5b60200260200101819052505b615043838361955d565b50614dff565b8a8310156150bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420656e6f75676820656c65637465642076616c696461746f727300000081525060200191505060405180910390fd5b6060836040519080825280602002602001820160405280156150f05781602001602082028038833980820191505090505b5090506000935060008090505b87518110156153485760606151106181ad565b73ffffffffffffffffffffffffffffffffffffffff16638dd31e398a848151811061513757fe5b602002602001015189858151811061514b57fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060006040518083038186803b1580156151ba57600080fd5b505afa1580156151ce573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156151f857600080fd5b810190808051604051939291908464010000000082111561521857600080fd5b8382019150602082018581111561522e57600080fd5b825186602082028301116401000000008211171561524b57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615282578082015181840152602081019050615267565b50505050905001604052505050905060008090505b815181101561532b578181815181106152ac57fe5b60200260200101518488815181106152c057fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061530e6001886182a890919063ffffffff16565b96506153246001826182a890919063ffffffff16565b9050615297565b50506153416001826182a890919063ffffffff16565b90506150fd565b5080995050505050505050505092915050565b6000600360020160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b6000600360000160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b60006154246003600001600001546003600201600001546182a890919063ffffffff16565b905090565b600061543443612919565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106154aa5780518252602082019150602081019050602083039250615487565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461550a576040519150601f19603f3d011682016040523d82523d6000602084013e61550f565b606091505b5080935081925050508061556e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061a8ff602e913960400191505060405180910390fd5b6155798260006179a2565b92505050919050565b6000600360000160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905092915050565b60006001806000828254019250508190555060006001549050600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614156156d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f75702061646472657373207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60006156db617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561575757600080fd5b505afa15801561576b573d6000803e3d6000fd5b505050506040513d602081101561578157600080fd5b810190808051906020019092919050505090508660001061580a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b6158148882615582565b87111561586c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061ab876024913960400191505060405180910390fd5b61587788828961956f565b615884818989898961967f565b61588c6180b2565b73ffffffffffffffffffffffffffffffffffffffff16636edf77a582896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561591257600080fd5b505af1158015615926573d6000803e3d6000fd5b50505050600061593689836128df565b141561598957615988600360090160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002089866199a2565b5b8773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f148075455e24d5cf538793db3e917a157cbadac69dd6a304186daf11b23f76fe896040518082815260200191505060405180910390a360019250506001548114615a6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015615b4557600080fd5b505afa158015615b59573d6000803e3d6000fd5b505050506040513d6020811015615b6f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614615c09576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b6000615c148561695e565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab632dedbbf09091878488886040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b158015615d1257600080fd5b505af4158015615d26573d6000803e3d6000fd5b505050508473ffffffffffffffffffffffffffffffffffffffff167f8f21dc7ff6f55d73e4fca52a4ef4fcc14fbda43ac338d24922519d51455d39c160405160405180910390a25050505050565b6000600360020160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60606003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab633a72e80290916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015615e5e57600080fd5b505af4158015615e72573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015615e9c57600080fd5b8101908080516040519392919084640100000000821115615ebc57600080fd5b83820191506020820185811115615ed257600080fd5b8251866020820283011164010000000082111715615eef57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615f26578082015181840152602081019050615f0b565b50505050905001604052505050905090565b60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561600957600080fd5b505afa15801561601d573d6000803e3d6000fd5b505050506040513d602081101561603357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146160cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63281359299091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b15801561615957600080fd5b505af415801561616d573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff167f5c8cd4e832f3a7d79f9208c2acf25a412143aa3f751cfd3728c42a0fea4921a860405160405180910390a25050565b6161c061481c565b616232576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156162d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b600f5481565b60006163836010604051806020016040529081600082015481525050619406565b905090565b600060018060008282540192505081905550600060015490506163ab8484617e95565b91506001548114616424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b60126020528060005260406000206000915090508060010154905081565b60006164fa83600360020160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054619b43565b905092915050565b600061650c617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561658857600080fd5b505afa15801561659c573d6000803e3d6000fd5b505050506040513d60208110156165b257600080fd5b8101908080519060200190929190505050905060006165cf6181ad565b90508073ffffffffffffffffffffffffffffffffffffffff1663facd743b836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561664e57600080fd5b505afa158015616662573d6000803e3d6000fd5b505050506040513d602081101561667857600080fd5b8101908080519060200190929190505050156166df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603981526020018061aca06039913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166352f13a4e836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561675c57600080fd5b505afa158015616770573d6000803e3d6000fd5b505050506040513d602081101561678657600080fd5b8101908080519060200190929190505050156167ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f81526020018061a974603f913960400191505060405180910390fd5b826168b057600f54600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905011156168af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f546f6f206d616e792067726f75707320766f74656420666f722100000000000081525060200191505060405180910390fd5b5b82601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fd9ff9bf9c0aa22c57c14972fe77841756843243a74e331dabcb04a4d8dbf11ff84604051808215151515815260200191505060405180910390a2505050565b6000616a03600360020160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600360000160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546182a890919063ffffffff16565b9050919050565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b60208310616a705780518252602082019150602081019050602083039250616a4d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114616ad0576040519150601f19603f3d011682016040523d82523d6000602084013e616ad5565b606091505b50809350819250505080616b34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061ab626025913960400191505060405180910390fd5b616b3f8260006179a2565b9250505090565b600060018060008282540192505081905550600060015490506000616b69617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015616be557600080fd5b505afa158015616bf9573d6000803e3d6000fd5b505050506040513d6020811015616c0f57600080fd5b810190808051906020019092919050505090506000616c2e8883616469565b9050616c3d88828989896188b9565b935050506001548114616cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50949350505050565b6000616d056003616cf76002616ce96002616cdb88615439565b61833090919063ffffffff16565b6182a890919063ffffffff16565b6183cf90919063ffffffff16565b9050919050565b600080616d2a83616d1c8661695e565b6182a890919063ffffffff16565b90506000616dd6616dc7600d60010154616d426181ad565b73ffffffffffffffffffffffffffffffffffffffff1663517f6d336040518163ffffffff1660e01b815260040160206040518083038186803b158015616d8757600080fd5b505afa158015616d9b573d6000803e3d6000fd5b505050506040513d6020811015616db157600080fd5b81019080805190602001909291905050506183b6565b8361833090919063ffffffff16565b90506000616f45616de56180b2565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b158015616e2a57600080fd5b505afa158015616e3e573d6000803e3d6000fd5b505050506040513d6020811015616e5457600080fd5b8101908080519060200190929190505050616f376001616e726181ad565b73ffffffffffffffffffffffffffffffffffffffff166339e618e88b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015616eee57600080fd5b505afa158015616f02573d6000803e3d6000fd5b505050506040513d6020811015616f1857600080fd5b81019080805190602001909291905050506182a890919063ffffffff16565b61833090919063ffffffff16565b905080821115935050505092915050565b60008060008714158015616f6b575060008514155b616fdd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b602083106170775780518252602082019150602081019050602083039250617054565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146170d7576040519150601f19603f3d011682016040523d82523d6000602084013e6170dc565b606091505b5080925081935050508161713b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061ab3b6027913960400191505060405180910390fd5b6171468160006179a2565b93506171538160206179a2565b925083839550955050505050965096945050505050565b6000806171756181ad565b90508073ffffffffffffffffffffffffffffffffffffffff1663c54c1cd4876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156171f457600080fd5b505afa158015617208573d6000803e3d6000fd5b505050506040513d602081101561721e57600080fd5b810190808051906020019092919050505015806172445750600060036002016000015411155b1561725357600091505061749c565b61725b61a85f565b6172b5600360020160010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600360020160000154619c5c565b90506172bf61a85f565b6173828373ffffffffffffffffffffffffffffffffffffffff166376f7425d88886040518363ffffffff1660e01b815260040180806020018281038252848482818152602001925060200280828437600081840152601f19601f820116905080830192505050935050505060206040518083038186803b15801561734257600080fd5b505afa158015617356573d6000803e3d6000fd5b505050506040513d602081101561736c57600080fd5b8101908080519060200190929190505050618860565b905061738c61a85f565b61744c8473ffffffffffffffffffffffffffffffffffffffff1663dba94fcd8b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561740c57600080fd5b505afa158015617420573d6000803e3d6000fd5b505050506040513d602081101561743657600080fd5b8101908080519060200190929190505050618860565b90506174956174908261748285617474886174668f618efc565b618f8690919063ffffffff16565b618f8690919063ffffffff16565b618f8690919063ffffffff16565b6193e5565b9450505050505b949350505050565b6174ac61481c565b61751e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61752781619c9e565b50565b600061753461481c565b6175a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b826000106175ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061ac2b602b913960400191505060405180910390fd5b81831115617658576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061a8c4603b913960400191505060405180910390fd5b600d60000154831415806176715750600d600101548214155b6176e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f456c65637461626c652076616c696461746f7273206e6f74206368616e67656481525060200191505060405180910390fd5b604051806040016040528084815260200183815250600d60008201518160000155602082015181600101559050507fb3ae64819ff89f6136eb58b8563cb32c6550f17eaf97f9ecc32f23783229f6de8383604051808381526020018281526020019250505060405180910390a16001905092915050565b600260009054906101000a900460ff16156177dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600260006101000a81548160ff02191690831515021790555061780133619c9e565b61780a856161b8565b617814848461752a565b5061781e82612933565b506178288161363f565b505050505050565b600d8060000154908060010154905082565b600080600d60000154600d60010154915091509091565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106178ca57805182526020820191506020810190506020830392506178a7565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461792a576040519150601f19603f3d011682016040523d82523d6000602084013e61792f565b606091505b5080935081925050508061798e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061abce602c913960400191505060405180910390fd5b617999826000618461565b92505050919050565b60006179ae8383618461565b60001c905092915050565b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091866040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015617a4557600080fd5b505af4158015617a59573d6000803e3d6000fd5b505050506040513d6020811015617a6f57600080fd5b810190808051906020019092919050505015617c78576000617b60846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015617b1757600080fd5b505af4158015617b2b573d6000803e3d6000fd5b505050506040513d6020811015617b4157600080fd5b81019080805190602001909291905050506182a890919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b158015617c5e57600080fd5b505af4158015617c72573d6000803e3d6000fd5b50505050505b617cd383600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546182a890919063ffffffff16565b600360020160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550617d3a836003600201600001546182a890919063ffffffff16565b6003600201600001819055508373ffffffffffffffffffffffffffffffffffffffff167f91ba34d62474c14d6c623cd322f4256666c7a45b7fdaa3378e009d39dfcec2a7846040518082815260200191505060405180910390a250505050565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015617e5557600080fd5b505afa158015617e69573d6000803e3d6000fd5b505050506040513d6020811015617e7f57600080fd5b8101908080519060200190929190505050905090565b600080600360000160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050617f27615429565b816001015410617f9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f50656e64696e6720766f74652065706f6368206e6f742070617373656400000081525060200191505060405180910390fd5b6000816000015490506000811161801e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b61802985858361956f565b6000618036868684619de2565b90508573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f45aac85f38083b18efe2d441a65b9c1ae177c78307cb5a5d4aec8f7dbcaeabfe8484604051808381526020018281526020019250505060405180910390a36001935050505092915050565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561816d57600080fd5b505afa158015618181573d6000803e3d6000fd5b505050506040513d602081101561819757600080fd5b8101908080519060200190929190505050905090565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561826857600080fd5b505afa15801561827c573d6000803e3d6000fd5b505050506040513d602081101561829257600080fd5b8101908080519060200190929190505050905090565b600080828401905083811015618326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60008083141561834357600090506183b0565b600082840290508284828161835457fe5b04146183ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061ab1a6021913960400191505060405180910390fd5b809150505b92915050565b60008183106183c557816183c7565b825b905092915050565b600061841183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250619f42565b905092915050565b60008082848161842557fe5b049050600083858161843357fe5b061415618443578091505061845b565b6184576001826182a890919063ffffffff16565b9150505b92915050565b60006184776020836182a890919063ffffffff16565b835110156184ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b6000600360000190506185228282600001546182a890919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506185868382600001546182a890919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506185ea8482600001546182a890919063ffffffff16565b81600001819055506185fa615429565b8160010181905550505050505050565b60006186e5846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561869c57600080fd5b505af41580156186b0573d6000803e3d6000fd5b505050506040513d60208110156186c657600080fd5b81019080805190602001909291905050506182a890919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b1580156187e357600080fd5b505af41580156187f7573d6000803e3d6000fd5b50505050601160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615618858576188578686612729565b5b505050505050565b61886861a85f565b6040518060200160405280838152509050919050565b61888661a85f565b604051806020016040528069d3c21bcecceda1000000815250905090565b60008160000151836000015110905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561895d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f75702061646472657373207a65726f000000000000000000000000000081525060200191505060405180910390fd5b6000618967617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156189e357600080fd5b505afa1580156189f7573d6000803e3d6000fd5b505050506040513d6020811015618a0d57600080fd5b8101908080519060200190929190505050905085600010618a96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b618aa08782616469565b861115618af8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061aa4f6023913960400191505060405180910390fd5b6000618b0588838961a008565b9050618b14828989898961967f565b618b1c6180b2565b73ffffffffffffffffffffffffffffffffffffffff16636edf77a583896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015618ba257600080fd5b505af1158015618bb6573d6000803e3d6000fd5b505050506000618bc689846128df565b1415618c1957618c18600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002089866199a2565b5b8773ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fae7458f8697a680da6be36406ea0b8f40164915ac9cc40c0dad05a2ff6e8c6a88984604051808381526020018281526020019250505060405180910390a360019250505095945050505050565b6000618cd783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061a1cc565b905092915050565b6000808590506000618cf1888a615582565b90506000811115618d91576000618d0883836183b6565b9050618d15898b8361956f565b8873ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff167f148075455e24d5cf538793db3e917a157cbadac69dd6a304186daf11b23f76fe836040518082815260200191505060405180910390a3618d8d8184618c9590919063ffffffff16565b9250505b6000618d9d898b616469565b9050600081118015618daf5750600083115b15618e56576000618dc084836183b6565b90506000618dcf8b8d8461a008565b90508a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fae7458f8697a680da6be36406ea0b8f40164915ac9cc40c0dad05a2ff6e8c6a88484604051808381526020018281526020019250505060405180910390a3618e518286618c9590919063ffffffff16565b945050505b6000618e6b848a618c9590919063ffffffff16565b90506000811115618ee357618e838b8b838b8b61967f565b6000618e8f8b8d6128df565b1415618ee257618ee1600360090160008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208b886199a2565b5b5b809450505050509695505050505050565b600033905090565b618f0461a85f565b618f0c61a28c565b821115618f64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061aa196036913960400191505060405180910390fd5b604051806020016040528069d3c21bcecceda100000084028152509050919050565b618f8e61a85f565b600083600001511480618fa5575060008260000151145b15618fc1576040518060200160405280600081525090506193df565b69d3c21bcecceda100000082600001511415618fdf578290506193df565b69d3c21bcecceda100000083600001511415618ffd578190506193df565b600069d3c21bcecceda10000006190138561a2ab565b600001518161901e57fe5b049050600061902c8561a2e2565b600001519050600069d3c21bcecceda10000006190488661a2ab565b600001518161905357fe5b04905060006190618661a2e2565b60000151905060008285029050600085146190f5578285828161908057fe5b04146190f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600069d3c21bcecceda100000082029050600082146191975769d3c21bcecceda100000082828161912257fe5b0414619196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6f766572666c6f772078317931202a206669786564312064657465637465640081525060200191505060405180910390fd5b5b809150600084860290506000861461922857848682816191b357fe5b0414619227576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b60008488029050600088146192b6578488828161924157fe5b04146192b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b6192be61a31f565b87816192c657fe5b0496506192d161a31f565b85816192d957fe5b049450600085880290506000881461936a57858882816192f557fe5b0414619369576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b61937261a85f565b604051806020016040528087815250905061939b8160405180602001604052808781525061a32c565b90506193b58160405180602001604052808681525061a32c565b90506193cf8160405180602001604052808581525061a32c565b9050809a50505050505050505050505b92915050565b600069d3c21bcecceda10000008260000151816193fe57fe5b049050919050565b600081600001519050919050565b61941c61a85f565b600082600001511415619497576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f63616e277420646976696465206279203000000000000000000000000000000081525060200191505060405180910390fd5b600069d3c21bcecceda10000008460000151029050836000015169d3c21bcecceda100000082816194c457fe5b0414619538576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f766572666c6f7720617420646976696465000000000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808460000151838161955057fe5b0481525091505092915050565b61956b82826000855161a3d5565b5050565b60006003600001905061958f828260000154618c9590919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506195f3838260000154618c9590919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050619657848260000154618c9590919063ffffffff16565b816000018190555060008160000154141561967757600081600101819055505b505050505050565b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091866040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561970b57600080fd5b505af415801561971f573d6000803e3d6000fd5b505050506040513d602081101561973557600080fd5b81019080805190602001909291905050501561993e576000619826846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156197dd57600080fd5b505af41580156197f1573d6000803e3d6000fd5b505050506040513d602081101561980757600080fd5b8101908080519060200190929190505050618c9590919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561992457600080fd5b505af4158015619938573d6000803e3d6000fd5b50505050505b601160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561999b5761999a8585612729565b5b5050505050565b828054905081108015619a1657508173ffffffffffffffffffffffffffffffffffffffff168382815481106199d357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b619a88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f42616420696e646578000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000619aa260018580549050618c9590919063ffffffff16565b9050838181548110619ab057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848381548110619ae757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808481619b3c919061a872565b5050505050565b600080600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541415619b9e5760009050619c56565b619c53600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154619c45600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001548561833090919063ffffffff16565b6183cf90919063ffffffff16565b90505b92915050565b619c6461a85f565b619c6c61a85f565b619c7584618efc565b9050619c7f61a85f565b619c8884618efc565b9050619c948282619414565b9250505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415619d24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061a92d6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060036002019050619e038382600001546182a890919063ffffffff16565b81600001819055506000619e17868561a6ea565b905060008260010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050619e758582600001546182a890919063ffffffff16565b8160000181905550619e948282600101546182a890919063ffffffff16565b8160010181905550619ef0828260020160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546182a890919063ffffffff16565b8160020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508193505050509392505050565b60008083118290619fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015619fb3578082015181840152602081019050619f98565b50505050905090810190601f168015619fe05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581619ffa57fe5b049050809150509392505050565b6000806003600201905061a029838260000154618c9590919063ffffffff16565b81600001819055506000809050600061a0428787616469565b905060008360010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508582141561a0da578060020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925061a0e7565b61a0e4888761a6ea565b92505b61a0fe868260000154618c9590919063ffffffff16565b816000018190555061a11d838260010154618c9590919063ffffffff16565b816001018190555061a179838260020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054618c9590919063ffffffff16565b8160020160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550829450505050509392505050565b600083831115829061a279576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561a23e57808201518184015260208101905061a223565b50505050905090810190601f16801561a26b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60007601357c299a88ea76a58924d52ce4f26a85af186c2b9e74905090565b61a2b361a85f565b604051806020016040528069d3c21bcecceda10000008085600001518161a2d657fe5b04028152509050919050565b61a2ea61a85f565b604051806020016040528069d3c21bcecceda10000008085600001518161a30d57fe5b04028460000151038152509050919050565b600064e8d4a51000905090565b61a33461a85f565b600082600001518460000151019050836000015181101561a3bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f616464206f766572666c6f77206465746563746564000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808281525091505092915050565b825184511461a42f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061abab6023913960400191505060405180910390fd5b8351821061a4a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f6865617020737461727420696e646578206f7574206f662072616e676500000081525060200191505060405180910390fd5b835181111561a51c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f68656170206c656e677468206f7574206f662072616e6765000000000000000081525060200191505060405180910390fd5b60008290505b60011561a6e357600061a552600161a54460028561833090919063ffffffff16565b6182a890919063ffffffff16565b9050600061a57d600261a56f60028661833090919063ffffffff16565b6182a890919063ffffffff16565b90506000839050848310801561a5ee575061a5ed8789838151811061a59e57fe5b60200260200101518151811061a5b057fe5b6020026020010151888a868151811061a5c557fe5b60200260200101518151811061a5d757fe5b602002602001015161a81d90919063ffffffff16565b5b1561a5f7578290505b848210801561a661575061a6608789838151811061a61157fe5b60200260200101518151811061a62357fe5b6020026020010151888a858151811061a63857fe5b60200260200101518151811061a64a57fe5b602002602001015161a81d90919063ffffffff16565b5b1561a66a578190505b8381141561a67a5750505061a6e3565b600088858151811061a68857fe5b6020026020010151905088828151811061a69e57fe5b602002602001015189868151811061a6b257fe5b6020026020010181815250508089838151811061a6cb57fe5b6020026020010181815250508194505050505061a522565b5050505050565b600080600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141561a75f5761a75868056bc75e2d631000008361833090919063ffffffff16565b905061a817565b61a814600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015461a806600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101548561833090919063ffffffff16565b6183cf90919063ffffffff16565b90505b92915050565b60008160000151836000015111905092915050565b604051806040016040528060608152602001600081525090565b6040518060200160405280600081525090565b6040518060200160405280600081525090565b81548183558181111561a8995781836000526020600020918201910161a898919061a89e565b5b505050565b61a8c091905b8082111561a8bc57600081600090555060010161a8a4565b5090565b9056fe4d6178696d756d20656c65637461626c652076616c696461746f72732063616e6e6f7420626520736d616c6c6572207468616e206d696e696d756d6572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e707574206c656e67746873206d75737420626520636f72726573706f6e642e56616c696461746f722067726f7570732063616e6e6f7420766f746520666f72206d6f7265207468616e206d6178206e756d626572206f662067726f757073456c6563746162696c697479207468726573686f6c64206d757374206265206c6f776572207468616e20313030256572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6563616e277420637265617465206669786964697479206e756d626572206c6172676572207468616e206d61784e657746697865642829566f74652076616c7565206c6172676572207468616e2061637469766520766f7465736572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c656572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c65566f74652076616c7565206c6172676572207468616e2070656e64696e6720766f7465736b657920616e642076616c7565206172726179206c656e677468206d69736d617463686572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c654d696e696d756d20656c65637461626c652076616c696461746f72732063616e6e6f74206265207a65726f44656372656d656e742076616c7565206d7573742062652067726561746572207468616e20302e6572726f722063616c6c696e67206861736848656164657220707265636f6d70696c6556616c696461746f72732063616e6e6f7420766f746520666f72206d6f7265207468616e206d6178206e756d626572206f662067726f757073a265627a7a72315820826d90b716a49f574a1418703603364ec7fb189856d86232ea84d060aa9fe65864736f6c634300050d00320000000000000000000000000000000000000000000000000000000000000000

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106103fc5760003560e01c80638f32d59b11610215578063cb08c99311610125578063e59ea3e8116100b8578063f911f0b711610087578063f911f0b714611da8578063f92ad21914611df8578063f9d7daae14611e64578063f9f41a7a14611e89578063fae8db0a14611eae576103fc565b8063e59ea3e814611bcc578063ec68307214611c32578063f23263f914611cad578063f2fde38b14611d64576103fc565b8063dedafeae116100f4578063dedafeae14611a6e578063df4da46114611ac6578063e0a2ab5214611ae4578063e50e652d14611b8a576103fc565b8063cb08c99314611912578063d190d5801461196e578063d3e242a4146119c6578063d52758aa14611a3e576103fc565b80639dfb6081116101a8578063a8e4587111610177578063a8e45871146117d2578063a91ee0dc14611816578063ac839d691461185a578063bdd1431814611878578063c14470c414611896576103fc565b80639dfb6081146115c7578063a18fb2db14611677578063a2fb4ddf146116fb578063a5826ab214611773576103fc565b80639a0e7d66116101e45780639a0e7d66146114d15780639a7b3be7146114ef5780639b2b592f1461150d5780639b95975f1461154f576103fc565b80638f32d59b1461137257806390a4dd5c14611394578063926d00ca1461142157806395128ce314611479576103fc565b806354255be0116103105780637046c96b116102a357806387ee8a0f1161027257806387ee8a0f1461107e5780638a8836261461109c5780638c6667751461116b5780638da5cb5b146111c75780638ef01def14611211576103fc565b80637046c96b14610f65578063715018a61461100c5780637385e5da146110165780637b10399914611034576103fc565b8063631db7e7116102df578063631db7e714610d4857806367960e9114610d8e5780636c781a2c14610e5d5780636e19847514610eb5576103fc565b806354255be014610b9f578063580d747a14610bd25780635bb5acfb14610c785780635d180adb14610cd0576103fc565b80632c3b7916116103935780633c55a73c116103625780633c55a73c14610974578063448144c8146109ba578063457578a314610a195780634b2c2f4414610ab25780634be8843b14610b81576103fc565b80632c3b7916146107fe57806335a8376b1461085657806338617272146108ba5780633b1eb4bf14610932576103fc565b80631f604243116103cf5780631f6042431461057b57806323f0ab6514610599578063263ecf74146107235780632ba38e691461079f576103fc565b8063123633ea1461040157806312541a6b1461046f578063158ef93e146104fd5780631c5a9d9c1461051f575b600080fd5b61042d6004803603602081101561041757600080fd5b8101908080359060200190929190505050611ef0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104fb6004803603608081101561048557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612041565b005b6105056120f5565b604051808215151515815260200191505060405180910390f35b6105616004803603602081101561053557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612108565b604051808215151515815260200191505060405180910390f35b61058361226e565b6040518082815260200191505060405180910390f35b610709600480360360608110156105af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156105ec57600080fd5b8201836020820111156105fe57600080fd5b8035906020019184600183028401116401000000008311171561062057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561068357600080fd5b82018360208201111561069557600080fd5b803590602001918460018302840111640100000000831117156106b757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061227e565b604051808215151515815260200191505060405180910390f35b6107856004803603604081101561073957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612437565b604051808215151515815260200191505060405180910390f35b6107a76124e8565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107ea5780820151818401526020810190506107cf565b505050509050019250505060405180910390f35b6108406004803603602081101561081457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612503565b6040518082815260200191505060405180910390f35b6108b86004803603604081101561086c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612729565b005b61091c600480360360408110156108d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128df565b6040518082815260200191505060405180910390f35b61095e6004803603602081101561094857600080fd5b8101908080359060200190929190505050612919565b6040518082815260200191505060405180910390f35b6109a06004803603602081101561098a57600080fd5b8101908080359060200190929190505050612933565b604051808215151515815260200191505060405180910390f35b6109c2612a6e565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a055780820151818401526020810190506109ea565b505050509050019250505060405180910390f35b610a5b60048036036020811015610a2f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612b31565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a9e578082015181840152602081019050610a83565b505050509050019250505060405180910390f35b610b6b60048036036020811015610ac857600080fd5b8101908080359060200190640100000000811115610ae557600080fd5b820183602082011115610af757600080fd5b80359060200191846001830284011164010000000083111715610b1957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612c01565b6040518082815260200191505060405180910390f35b610b89612d95565b6040518082815260200191505060405180910390f35b610ba7612da1565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610c5e60048036036080811015610be857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612dc8565b604051808215151515815260200191505060405180910390f35b610cba60048036036020811015610c8e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061349b565b6040518082815260200191505060405180910390f35b610d0660048036036040811015610ce657600080fd5b8101908080359060200190929190803590602001909291905050506134ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d7460048036036020811015610d5e57600080fd5b810190808035906020019092919050505061363f565b604051808215151515815260200191505060405180910390f35b610e4760048036036020811015610da457600080fd5b8101908080359060200190640100000000811115610dc157600080fd5b820183602082011115610dd357600080fd5b80359060200191846001830284011164010000000083111715610df557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613798565b6040518082815260200191505060405180910390f35b610e9f60048036036020811015610e7357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061392c565b6040518082815260200191505060405180910390f35b610f4b600480360360a0811015610ecb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613abb565b604051808215151515815260200191505060405180910390f35b610f6d613b64565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610fb4578082015181840152602081019050610f99565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610ff6578082015181840152602081019050610fdb565b5050505090500194505050505060405180910390f35b611014613d2f565b005b61101e613e68565b6040518082815260200191505060405180910390f35b61103c613e78565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b611086613e9e565b6040518082815260200191505060405180910390f35b611155600480360360208110156110b257600080fd5b81019080803590602001906401000000008111156110cf57600080fd5b8201836020820111156110e157600080fd5b8035906020019184600183028401116401000000008311171561110357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613fe5565b6040518082815260200191505060405180910390f35b6111ad6004803603602081101561118157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614179565b604051808215151515815260200191505060405180910390f35b6111cf614249565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61135c600480360360a081101561122757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561126e57600080fd5b82018360208201111561128057600080fd5b803590602001918460208302840111640100000000831117156112a257600080fd5b9091929391929390803590602001906401000000008111156112c357600080fd5b8201836020820111156112d557600080fd5b803590602001918460208302840111640100000000831117156112f757600080fd5b90919293919293908035906020019064010000000081111561131857600080fd5b82018360208201111561132a57600080fd5b8035906020019184602083028401116401000000008311171561134c57600080fd5b9091929391929390505050614272565b6040518082815260200191505060405180910390f35b61137a61481c565b604051808215151515815260200191505060405180910390f35b6113ca600480360360408110156113aa57600080fd5b81019080803590602001909291908035906020019092919050505061487a565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561140d5780820151818401526020810190506113f2565b505050509050019250505060405180910390f35b6114636004803603602081101561143757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061535b565b6040518082815260200191505060405180910390f35b6114bb6004803603602081101561148f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506153ad565b6040518082815260200191505060405180910390f35b6114d96153ff565b6040518082815260200191505060405180910390f35b6114f7615429565b6040518082815260200191505060405180910390f35b6115396004803603602081101561152357600080fd5b8101908080359060200190929190505050615439565b6040518082815260200191505060405180910390f35b6115b16004803603604081101561156557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615582565b6040518082815260200191505060405180910390f35b61165d600480360360a08110156115dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050615615565b604051808215151515815260200191505060405180910390f35b6116f96004803603606081101561168d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615a74565b005b61175d6004803603604081101561171157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615d74565b6040518082815260200191505060405180910390f35b61177b615e04565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156117be5780820151818401526020810190506117a3565b505050509050019250505060405180910390f35b611814600480360360208110156117e857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615f38565b005b6118586004803603602081101561182c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506161b8565b005b61186261635c565b6040518082815260200191505060405180910390f35b611880616362565b6040518082815260200191505060405180910390f35b6118f8600480360360408110156118ac57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050616388565b604051808215151515815260200191505060405180910390f35b6119546004803603602081101561192857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061642b565b604051808215151515815260200191505060405180910390f35b6119b06004803603602081101561198457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061644b565b6040518082815260200191505060405180910390f35b611a28600480360360408110156119dc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050616469565b6040518082815260200191505060405180910390f35b611a6c60048036036020811015611a5457600080fd5b81019080803515159060200190929190505050616502565b005b611ab060048036036020811015611a8457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061695e565b6040518082815260200191505060405180910390f35b611ace616a0a565b6040518082815260200191505060405180910390f35b611b7060048036036080811015611afa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050616b46565b604051808215151515815260200191505060405180910390f35b611bb660048036036020811015611ba057600080fd5b8101908080359060200190929190505050616cc1565b6040518082815260200191505060405180910390f35b611c1860048036036040811015611be257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050616d0c565b604051808215151515815260200191505060405180910390f35b611c90600480360360c0811015611c4857600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050616f56565b604051808381526020018281526020019250505060405180910390f35b611d4e60048036036060811015611cc357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115611d0a57600080fd5b820183602082011115611d1c57600080fd5b80359060200191846020830284011164010000000083111715611d3e57600080fd5b909192939192939050505061716a565b6040518082815260200191505060405180910390f35b611da660048036036020811015611d7a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506174a4565b005b611dde60048036036040811015611dbe57600080fd5b81019080803590602001909291908035906020019092919050505061752a565b604051808215151515815260200191505060405180910390f35b611e62600480360360a0811015611e0e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919050505061775a565b005b611e6c617830565b604051808381526020018281526020019250505060405180910390f35b611e91617842565b604051808381526020018281526020019250505060405180910390f35b611eda60048036036020811015611ec457600080fd5b8101908080359060200190929190505050617859565b6040518082815260200191505060405180910390f35b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611f695780518252602082019150602081019050602083039250611f46565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611fc9576040519150601f19603f3d011682016040523d82523d6000602084013e611fce565b606091505b5080935081925050508061202d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061aa72603d913960400191505060405180910390fd5b6120388260006179a2565b92505050919050565b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c7920564d2063616e2063616c6c0000000000000000000000000000000081525060200191505060405180910390fd5b6120ef848484846179b9565b50505050565b600260009054906101000a900460ff1681565b60006001806000828254019250508190555060006001549050600061212b617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121a757600080fd5b505afa1580156121bb573d6000803e3d6000fd5b505050506040513d60208110156121d157600080fd5b810190808051906020019092919050505090506121ee8482617e95565b9250506001548114612268576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50919050565b6000600360020160000154905090565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b6020831061230757805182526020820191506020810190506020830392506122e4565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b602083106123585780518252602082019150602081019050602083039250612335565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b602083106123c1578051825260208201915060208101905060208303925061239e565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612421576040519150601f19603f3d011682016040523d82523d6000602084013e612426565b606091505b505080915050809150509392505050565b600080600360000160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506124c9615429565b81600101541080156124df575060008160000154115b91505092915050565b60606124fe600d60000154600d6001015461487a565b905090565b6000806126716125116180b2565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b15801561255657600080fd5b505afa15801561256a573d6000803e3d6000fd5b505050506040513d602081101561258057600080fd5b8101908080519060200190929190505050612663600161259e6181ad565b73ffffffffffffffffffffffffffffffffffffffff166339e618e8886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561261a57600080fd5b505afa15801561262e573d6000803e3d6000fd5b505050506040513d602081101561264457600080fd5b81019080805190602001909291905050506182a890919063ffffffff16565b61833090919063ffffffff16565b9050600061270b600d600101546126866181ad565b73ffffffffffffffffffffffffffffffffffffffff1663517f6d336040518163ffffffff1660e01b815260040160206040518083038186803b1580156126cb57600080fd5b505afa1580156126df573d6000803e3d6000fd5b505050506040513d60208110156126f557600080fd5b81019080805190602001909291905050506183b6565b905061272081836183cf90919063ffffffff16565b92505050919050565b601260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282540392505081905550600061280482846128df565b905080601260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080601260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282540192505081905550505050565b6000806128ec8484615582565b905060006128fa8585616469565b905061290f81836182a890919063ffffffff16565b9250505092915050565b600061292c82612927616a0a565b618419565b9050919050565b600061293d61481c565b6129af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600f54821415612a27576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4d61782067726f75707320766f74656420666f72206e6f74206368616e67656481525060200191505060405180910390fd5b81600f819055507f1993a3864c31265ef86eec51d147eff697dee0466c92ac9abddcc4c4c6829348826040518082815260200191505060405180910390a160019050919050565b60606000612a7a613e9e565b9050606081604051908082528060200260200182016040528015612aad5781602001602082028038833980820191505090505b50905060008090505b82811015612b2857612ac781611ef0565b828281518110612ad357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612b216001826182a890919063ffffffff16565b9050612ab6565b50809250505090565b6060600360090160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015612bf557602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612bab575b50505050509050919050565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310612c565780518252602082019150602081019050602083039250612c33565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310612cbd5780518252602082019150602081019050602083039250612c9a565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612d1d576040519150601f19603f3d011682016040523d82523d6000602084013e612d22565b606091505b50809350819250505080612d81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018061a9e16038913960400191505060405180910390fd5b612d8c826000618461565b92505050919050565b60108060000154905081565b60008060008060018060036000839350829250819150809050935093509350935090919293565b600060018060008282540192505081905550600060015490506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091886040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612e6d57600080fd5b505af4158015612e81573d6000803e3d6000fd5b505050506040513d6020811015612e9757600080fd5b8101908080519060200190929190505050612f1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f7570206e6f7420656c696769626c65000000000000000000000000000081525060200191505060405180910390fd5b84600010612f90576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b612f9a8686616d0c565b61300c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f47726f75702063616e6e6f74207265636569766520766f74657300000000000081525060200191505060405180910390fd5b6000613016617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561309257600080fd5b505afa1580156130a6573d6000803e3d6000fd5b505050506040513d60208110156130bc57600080fd5b8101908080519060200190929190505050905060008090506000600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008090505b81805490508110156131b657828061319957508973ffffffffffffffffffffffffffffffffffffffff1682828154811061315657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b92506131af6001826182a890919063ffffffff16565b9050613120565b50816132f157601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806132195750600f548180549050105b61328b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74656420666f7220746f6f206d616e792067726f7570730000000000000081525060200191505060405180910390fd5b808990806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b6132fc89848a618502565b613309838a8a8a8a61860a565b6133116180b2565b73ffffffffffffffffffffffffffffffffffffffff166318a4ff8c848a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561339757600080fd5b505af11580156133ab573d6000803e3d6000fd5b505050508873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd3532f70444893db82221041edb4dc26c94593aeb364b0b14dfc77d5ee9051528a6040518082815260200191505060405180910390a3600194505050506001548114613492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50949350505050565b6000600360020160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106135665780518252602082019150602081019050602083039250613543565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146135c6576040519150601f19603f3d011682016040523d82523d6000602084013e6135cb565b606091505b5080935081925050508061362a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061aae46036913960400191505060405180910390fd5b6136358260006179a2565b9250505092915050565b600061364961481c565b6136bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6136c482618860565b6010600082015181600001559050506137036136de61887e565b60106040518060200160405290816000820154815250506188a490919063ffffffff16565b613758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061a9b3602e913960400191505060405180910390fd5b7f9854be03126e38f9c318d8aabe1b150d09cb3a57059b21855b1e11d44e082c1a826040518082815260200191505060405180910390a160019050919050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b602083106137ed57805182526020820191506020810190506020830392506137ca565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106138545780518252602082019150602081019050602083039250613831565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146138b4576040519150601f19603f3d011682016040523d82523d6000602084013e6138b9565b606091505b50809350819250505080613918576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061ac7d6023913960400191505060405180910390fd5b613923826000618461565b92505050919050565b60006060600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156139f257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116139a8575b50505050509050600f5481511115613a4f57601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154915050613ab6565b600080905060008090505b8251811015613aaf57613a92613a83848381518110613a7557fe5b6020026020010151876128df565b836182a890919063ffffffff16565b9150613aa86001826182a890919063ffffffff16565b9050613a5a565b5080925050505b919050565b60006001806000828254019250508190555060006001549050613ae187878787876188b9565b91506001548114613b5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b6060806003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6369b317e390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015613bbf57600080fd5b505af4158015613bd3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506040811015613bfd57600080fd5b8101908080516040519392919084640100000000821115613c1d57600080fd5b83820191506020820185811115613c3357600080fd5b8251866020820283011164010000000082111715613c5057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613c87578082015181840152602081019050613c6c565b5050505090500160405260200180516040519392919084640100000000821115613cb057600080fd5b83820191506020820185811115613cc657600080fd5b8251866020820283011164010000000082111715613ce357600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613d1a578082015181840152602081019050613cff565b50505050905001604052505050915091509091565b613d3761481c565b613da9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000613e7343616cc1565b905090565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310613f0f5780518252602082019150602081019050602083039250613eec565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613f6f576040519150601f19603f3d011682016040523d82523d6000602084013e613f74565b606091505b50809350819250505080613fd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061aaaf6035913960400191505060405180910390fd5b613fde8260006179a2565b9250505090565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061403a5780518252602082019150602081019050602083039250614017565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106140a1578051825260208201915060208101905060208303925061407e565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114614101576040519150601f19603f3d011682016040523d82523d6000602084013e614106565b606091505b50809350819250505080614165576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603181526020018061abfa6031913960400191505060405180910390fd5b6141708260006179a2565b92505050919050565b60006003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561420757600080fd5b505af415801561421b573d6000803e3d6000fd5b505050506040513d602081101561423157600080fd5b81019080805190602001909291905050509050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600180600082825401925050819055506000600154905060405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561435c57600080fd5b505afa158015614370573d6000803e3d6000fd5b505050506040513d602081101561438657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614614420576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b60008a11614479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061ac566027913960400191505060405180910390fd5b61448161a832565b6040518060400160405280600360090160008f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561454e57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311614504575b505050505081526020018c81525090508060000151518a8a90501115801561457b5750878790508a8a9050145b801561458c57508585905088889050145b6145e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061a9536021913960400191505060405180910390fd5b600081600001515190505b6000811115614718576146e26146cf8e8460000151614615600186618c9590919063ffffffff16565b8151811061461f57fe5b602002602001015185602001518f8f614642600189618c9590919063ffffffff16565b81811061464b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168e8e61467e60018a618c9590919063ffffffff16565b81811061468757fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168d8d6146ba60018b618c9590919063ffffffff16565b8181106146c357fe5b90506020020135618cdf565b8360200151618c9590919063ffffffff16565b8260200181815250506000826020015114156146fd57614718565b614711600182618c9590919063ffffffff16565b90506145ec565b506000816020015114614793576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4661696c75726520746f2064656372656d656e7420616c6c20766f7465732e0081525060200191505060405180910390fd5b8a93505050600154811461480f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5098975050505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661485e618ef4565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606060006148be6148b961489461488f6153ff565b618efc565b6010604051806020016040529081600082015481525050618f8690919063ffffffff16565b6193e5565b905060006003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6342b6351a909184876040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561492a57600080fd5b505af415801561493e573d6000803e3d6000fd5b505050506040513d602081101561495457600080fd5b8101908080519060200190929190505050905060606003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63dcb2a4dd9091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b1580156149c957600080fd5b505af41580156149dd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a0757600080fd5b8101908080516040519392919084640100000000821115614a2757600080fd5b83820191506020820185811115614a3d57600080fd5b8251866020820283011164010000000082111715614a5a57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614a91578082015181840152602081019050614a76565b5050505090500160405250505090506060614aaa6181ad565b73ffffffffffffffffffffffffffffffffffffffff166370447754836040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015614b18578082015181840152602081019050614afd565b505050509050019250505060006040518083038186803b158015614b3b57600080fd5b505afa158015614b4f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614b7957600080fd5b8101908080516040519392919084640100000000821115614b9957600080fd5b83820191506020820185811115614baf57600080fd5b8251866020820283011164010000000082111715614bcc57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614c03578082015181840152602081019050614be8565b50505050905001604052505050905060608251604051908082528060200260200182016040528015614c445781602001602082028038833980820191505090505b509050600080905060608451604051908082528060200260200182016040528015614c7e5781602001602082028038833980820191505090505b50905060608551604051908082528060200260200182016040528015614cbe57816020015b614cab61a84c565b815260200190600190039081614ca35790505b50905060008090505b8651811015614dfd5780838281518110614cdd57fe5b602002602001018181525050614dcb6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b390918a8581518110614d1c57fe5b60200260200101516040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015614d8b57600080fd5b505af4158015614d9f573d6000803e3d6000fd5b505050506040513d6020811015614db557600080fd5b8101908080519060200190929190505050618efc565b828281518110614dd757fe5b6020026020010181905250614df66001826182a890919063ffffffff16565b9050614cc7565b505b8983108015614e0f575060008651115b1561504957600082600081518110614e2357fe5b602002602001015190506000614e4b838381518110614e3e57fe5b6020026020010151619406565b1415614e575750615049565b848181518110614e6357fe5b6020026020010151868281518110614e7757fe5b602002602001015111614eaa57614e8e6000618860565b828281518110614e9a57fe5b6020026020010181905250615039565b614ed16001868381518110614ebb57fe5b60200260200101516182a890919063ffffffff16565b858281518110614edd57fe5b602002602001018181525050614efd6001856182a890919063ffffffff16565b9350615021614f31614f2c6001888581518110614f1657fe5b60200260200101516182a890919063ffffffff16565b618efc565b6150136003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b390918c8781518110614f6457fe5b60200260200101516040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015614fd357600080fd5b505af4158015614fe7573d6000803e3d6000fd5b505050506040513d6020811015614ffd57600080fd5b8101908080519060200190929190505050618efc565b61941490919063ffffffff16565b82828151811061502d57fe5b60200260200101819052505b615043838361955d565b50614dff565b8a8310156150bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420656e6f75676820656c65637465642076616c696461746f727300000081525060200191505060405180910390fd5b6060836040519080825280602002602001820160405280156150f05781602001602082028038833980820191505090505b5090506000935060008090505b87518110156153485760606151106181ad565b73ffffffffffffffffffffffffffffffffffffffff16638dd31e398a848151811061513757fe5b602002602001015189858151811061514b57fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060006040518083038186803b1580156151ba57600080fd5b505afa1580156151ce573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156151f857600080fd5b810190808051604051939291908464010000000082111561521857600080fd5b8382019150602082018581111561522e57600080fd5b825186602082028301116401000000008211171561524b57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615282578082015181840152602081019050615267565b50505050905001604052505050905060008090505b815181101561532b578181815181106152ac57fe5b60200260200101518488815181106152c057fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061530e6001886182a890919063ffffffff16565b96506153246001826182a890919063ffffffff16565b9050615297565b50506153416001826182a890919063ffffffff16565b90506150fd565b5080995050505050505050505092915050565b6000600360020160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b6000600360000160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b60006154246003600001600001546003600201600001546182a890919063ffffffff16565b905090565b600061543443612919565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106154aa5780518252602082019150602081019050602083039250615487565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461550a576040519150601f19603f3d011682016040523d82523d6000602084013e61550f565b606091505b5080935081925050508061556e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061a8ff602e913960400191505060405180910390fd5b6155798260006179a2565b92505050919050565b6000600360000160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905092915050565b60006001806000828254019250508190555060006001549050600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614156156d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f75702061646472657373207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60006156db617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561575757600080fd5b505afa15801561576b573d6000803e3d6000fd5b505050506040513d602081101561578157600080fd5b810190808051906020019092919050505090508660001061580a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b6158148882615582565b87111561586c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061ab876024913960400191505060405180910390fd5b61587788828961956f565b615884818989898961967f565b61588c6180b2565b73ffffffffffffffffffffffffffffffffffffffff16636edf77a582896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561591257600080fd5b505af1158015615926573d6000803e3d6000fd5b50505050600061593689836128df565b141561598957615988600360090160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002089866199a2565b5b8773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f148075455e24d5cf538793db3e917a157cbadac69dd6a304186daf11b23f76fe896040518082815260200191505060405180910390a360019250506001548114615a6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015615b4557600080fd5b505afa158015615b59573d6000803e3d6000fd5b505050506040513d6020811015615b6f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614615c09576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b6000615c148561695e565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab632dedbbf09091878488886040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b158015615d1257600080fd5b505af4158015615d26573d6000803e3d6000fd5b505050508473ffffffffffffffffffffffffffffffffffffffff167f8f21dc7ff6f55d73e4fca52a4ef4fcc14fbda43ac338d24922519d51455d39c160405160405180910390a25050505050565b6000600360020160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60606003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab633a72e80290916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015615e5e57600080fd5b505af4158015615e72573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015615e9c57600080fd5b8101908080516040519392919084640100000000821115615ebc57600080fd5b83820191506020820185811115615ed257600080fd5b8251866020820283011164010000000082111715615eef57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615f26578082015181840152602081019050615f0b565b50505050905001604052505050905090565b60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561600957600080fd5b505afa15801561601d573d6000803e3d6000fd5b505050506040513d602081101561603357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146160cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63281359299091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b15801561615957600080fd5b505af415801561616d573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff167f5c8cd4e832f3a7d79f9208c2acf25a412143aa3f751cfd3728c42a0fea4921a860405160405180910390a25050565b6161c061481c565b616232576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156162d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b600f5481565b60006163836010604051806020016040529081600082015481525050619406565b905090565b600060018060008282540192505081905550600060015490506163ab8484617e95565b91506001548114616424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b60126020528060005260406000206000915090508060010154905081565b60006164fa83600360020160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054619b43565b905092915050565b600061650c617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561658857600080fd5b505afa15801561659c573d6000803e3d6000fd5b505050506040513d60208110156165b257600080fd5b8101908080519060200190929190505050905060006165cf6181ad565b90508073ffffffffffffffffffffffffffffffffffffffff1663facd743b836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561664e57600080fd5b505afa158015616662573d6000803e3d6000fd5b505050506040513d602081101561667857600080fd5b8101908080519060200190929190505050156166df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603981526020018061aca06039913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166352f13a4e836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561675c57600080fd5b505afa158015616770573d6000803e3d6000fd5b505050506040513d602081101561678657600080fd5b8101908080519060200190929190505050156167ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f81526020018061a974603f913960400191505060405180910390fd5b826168b057600f54600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905011156168af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f546f6f206d616e792067726f75707320766f74656420666f722100000000000081525060200191505060405180910390fd5b5b82601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fd9ff9bf9c0aa22c57c14972fe77841756843243a74e331dabcb04a4d8dbf11ff84604051808215151515815260200191505060405180910390a2505050565b6000616a03600360020160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600360000160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546182a890919063ffffffff16565b9050919050565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b60208310616a705780518252602082019150602081019050602083039250616a4d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114616ad0576040519150601f19603f3d011682016040523d82523d6000602084013e616ad5565b606091505b50809350819250505080616b34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061ab626025913960400191505060405180910390fd5b616b3f8260006179a2565b9250505090565b600060018060008282540192505081905550600060015490506000616b69617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015616be557600080fd5b505afa158015616bf9573d6000803e3d6000fd5b505050506040513d6020811015616c0f57600080fd5b810190808051906020019092919050505090506000616c2e8883616469565b9050616c3d88828989896188b9565b935050506001548114616cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50949350505050565b6000616d056003616cf76002616ce96002616cdb88615439565b61833090919063ffffffff16565b6182a890919063ffffffff16565b6183cf90919063ffffffff16565b9050919050565b600080616d2a83616d1c8661695e565b6182a890919063ffffffff16565b90506000616dd6616dc7600d60010154616d426181ad565b73ffffffffffffffffffffffffffffffffffffffff1663517f6d336040518163ffffffff1660e01b815260040160206040518083038186803b158015616d8757600080fd5b505afa158015616d9b573d6000803e3d6000fd5b505050506040513d6020811015616db157600080fd5b81019080805190602001909291905050506183b6565b8361833090919063ffffffff16565b90506000616f45616de56180b2565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b158015616e2a57600080fd5b505afa158015616e3e573d6000803e3d6000fd5b505050506040513d6020811015616e5457600080fd5b8101908080519060200190929190505050616f376001616e726181ad565b73ffffffffffffffffffffffffffffffffffffffff166339e618e88b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015616eee57600080fd5b505afa158015616f02573d6000803e3d6000fd5b505050506040513d6020811015616f1857600080fd5b81019080805190602001909291905050506182a890919063ffffffff16565b61833090919063ffffffff16565b905080821115935050505092915050565b60008060008714158015616f6b575060008514155b616fdd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b602083106170775780518252602082019150602081019050602083039250617054565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146170d7576040519150601f19603f3d011682016040523d82523d6000602084013e6170dc565b606091505b5080925081935050508161713b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061ab3b6027913960400191505060405180910390fd5b6171468160006179a2565b93506171538160206179a2565b925083839550955050505050965096945050505050565b6000806171756181ad565b90508073ffffffffffffffffffffffffffffffffffffffff1663c54c1cd4876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156171f457600080fd5b505afa158015617208573d6000803e3d6000fd5b505050506040513d602081101561721e57600080fd5b810190808051906020019092919050505015806172445750600060036002016000015411155b1561725357600091505061749c565b61725b61a85f565b6172b5600360020160010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600360020160000154619c5c565b90506172bf61a85f565b6173828373ffffffffffffffffffffffffffffffffffffffff166376f7425d88886040518363ffffffff1660e01b815260040180806020018281038252848482818152602001925060200280828437600081840152601f19601f820116905080830192505050935050505060206040518083038186803b15801561734257600080fd5b505afa158015617356573d6000803e3d6000fd5b505050506040513d602081101561736c57600080fd5b8101908080519060200190929190505050618860565b905061738c61a85f565b61744c8473ffffffffffffffffffffffffffffffffffffffff1663dba94fcd8b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561740c57600080fd5b505afa158015617420573d6000803e3d6000fd5b505050506040513d602081101561743657600080fd5b8101908080519060200190929190505050618860565b90506174956174908261748285617474886174668f618efc565b618f8690919063ffffffff16565b618f8690919063ffffffff16565b618f8690919063ffffffff16565b6193e5565b9450505050505b949350505050565b6174ac61481c565b61751e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61752781619c9e565b50565b600061753461481c565b6175a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b826000106175ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061ac2b602b913960400191505060405180910390fd5b81831115617658576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061a8c4603b913960400191505060405180910390fd5b600d60000154831415806176715750600d600101548214155b6176e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f456c65637461626c652076616c696461746f7273206e6f74206368616e67656481525060200191505060405180910390fd5b604051806040016040528084815260200183815250600d60008201518160000155602082015181600101559050507fb3ae64819ff89f6136eb58b8563cb32c6550f17eaf97f9ecc32f23783229f6de8383604051808381526020018281526020019250505060405180910390a16001905092915050565b600260009054906101000a900460ff16156177dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600260006101000a81548160ff02191690831515021790555061780133619c9e565b61780a856161b8565b617814848461752a565b5061781e82612933565b506178288161363f565b505050505050565b600d8060000154908060010154905082565b600080600d60000154600d60010154915091509091565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106178ca57805182526020820191506020810190506020830392506178a7565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461792a576040519150601f19603f3d011682016040523d82523d6000602084013e61792f565b606091505b5080935081925050508061798e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061abce602c913960400191505060405180910390fd5b617999826000618461565b92505050919050565b60006179ae8383618461565b60001c905092915050565b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091866040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015617a4557600080fd5b505af4158015617a59573d6000803e3d6000fd5b505050506040513d6020811015617a6f57600080fd5b810190808051906020019092919050505015617c78576000617b60846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015617b1757600080fd5b505af4158015617b2b573d6000803e3d6000fd5b505050506040513d6020811015617b4157600080fd5b81019080805190602001909291905050506182a890919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b158015617c5e57600080fd5b505af4158015617c72573d6000803e3d6000fd5b50505050505b617cd383600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546182a890919063ffffffff16565b600360020160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550617d3a836003600201600001546182a890919063ffffffff16565b6003600201600001819055508373ffffffffffffffffffffffffffffffffffffffff167f91ba34d62474c14d6c623cd322f4256666c7a45b7fdaa3378e009d39dfcec2a7846040518082815260200191505060405180910390a250505050565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015617e5557600080fd5b505afa158015617e69573d6000803e3d6000fd5b505050506040513d6020811015617e7f57600080fd5b8101908080519060200190929190505050905090565b600080600360000160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050617f27615429565b816001015410617f9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f50656e64696e6720766f74652065706f6368206e6f742070617373656400000081525060200191505060405180910390fd5b6000816000015490506000811161801e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b61802985858361956f565b6000618036868684619de2565b90508573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f45aac85f38083b18efe2d441a65b9c1ae177c78307cb5a5d4aec8f7dbcaeabfe8484604051808381526020018281526020019250505060405180910390a36001935050505092915050565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561816d57600080fd5b505afa158015618181573d6000803e3d6000fd5b505050506040513d602081101561819757600080fd5b8101908080519060200190929190505050905090565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561826857600080fd5b505afa15801561827c573d6000803e3d6000fd5b505050506040513d602081101561829257600080fd5b8101908080519060200190929190505050905090565b600080828401905083811015618326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60008083141561834357600090506183b0565b600082840290508284828161835457fe5b04146183ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061ab1a6021913960400191505060405180910390fd5b809150505b92915050565b60008183106183c557816183c7565b825b905092915050565b600061841183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250619f42565b905092915050565b60008082848161842557fe5b049050600083858161843357fe5b061415618443578091505061845b565b6184576001826182a890919063ffffffff16565b9150505b92915050565b60006184776020836182a890919063ffffffff16565b835110156184ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b6000600360000190506185228282600001546182a890919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506185868382600001546182a890919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506185ea8482600001546182a890919063ffffffff16565b81600001819055506185fa615429565b8160010181905550505050505050565b60006186e5846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561869c57600080fd5b505af41580156186b0573d6000803e3d6000fd5b505050506040513d60208110156186c657600080fd5b81019080805190602001909291905050506182a890919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b1580156187e357600080fd5b505af41580156187f7573d6000803e3d6000fd5b50505050601160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615618858576188578686612729565b5b505050505050565b61886861a85f565b6040518060200160405280838152509050919050565b61888661a85f565b604051806020016040528069d3c21bcecceda1000000815250905090565b60008160000151836000015110905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561895d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f75702061646472657373207a65726f000000000000000000000000000081525060200191505060405180910390fd5b6000618967617d9a565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156189e357600080fd5b505afa1580156189f7573d6000803e3d6000fd5b505050506040513d6020811015618a0d57600080fd5b8101908080519060200190929190505050905085600010618a96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b618aa08782616469565b861115618af8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061aa4f6023913960400191505060405180910390fd5b6000618b0588838961a008565b9050618b14828989898961967f565b618b1c6180b2565b73ffffffffffffffffffffffffffffffffffffffff16636edf77a583896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015618ba257600080fd5b505af1158015618bb6573d6000803e3d6000fd5b505050506000618bc689846128df565b1415618c1957618c18600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002089866199a2565b5b8773ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fae7458f8697a680da6be36406ea0b8f40164915ac9cc40c0dad05a2ff6e8c6a88984604051808381526020018281526020019250505060405180910390a360019250505095945050505050565b6000618cd783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061a1cc565b905092915050565b6000808590506000618cf1888a615582565b90506000811115618d91576000618d0883836183b6565b9050618d15898b8361956f565b8873ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff167f148075455e24d5cf538793db3e917a157cbadac69dd6a304186daf11b23f76fe836040518082815260200191505060405180910390a3618d8d8184618c9590919063ffffffff16565b9250505b6000618d9d898b616469565b9050600081118015618daf5750600083115b15618e56576000618dc084836183b6565b90506000618dcf8b8d8461a008565b90508a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fae7458f8697a680da6be36406ea0b8f40164915ac9cc40c0dad05a2ff6e8c6a88484604051808381526020018281526020019250505060405180910390a3618e518286618c9590919063ffffffff16565b945050505b6000618e6b848a618c9590919063ffffffff16565b90506000811115618ee357618e838b8b838b8b61967f565b6000618e8f8b8d6128df565b1415618ee257618ee1600360090160008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208b886199a2565b5b5b809450505050509695505050505050565b600033905090565b618f0461a85f565b618f0c61a28c565b821115618f64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061aa196036913960400191505060405180910390fd5b604051806020016040528069d3c21bcecceda100000084028152509050919050565b618f8e61a85f565b600083600001511480618fa5575060008260000151145b15618fc1576040518060200160405280600081525090506193df565b69d3c21bcecceda100000082600001511415618fdf578290506193df565b69d3c21bcecceda100000083600001511415618ffd578190506193df565b600069d3c21bcecceda10000006190138561a2ab565b600001518161901e57fe5b049050600061902c8561a2e2565b600001519050600069d3c21bcecceda10000006190488661a2ab565b600001518161905357fe5b04905060006190618661a2e2565b60000151905060008285029050600085146190f5578285828161908057fe5b04146190f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600069d3c21bcecceda100000082029050600082146191975769d3c21bcecceda100000082828161912257fe5b0414619196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6f766572666c6f772078317931202a206669786564312064657465637465640081525060200191505060405180910390fd5b5b809150600084860290506000861461922857848682816191b357fe5b0414619227576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b60008488029050600088146192b6578488828161924157fe5b04146192b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b6192be61a31f565b87816192c657fe5b0496506192d161a31f565b85816192d957fe5b049450600085880290506000881461936a57858882816192f557fe5b0414619369576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b61937261a85f565b604051806020016040528087815250905061939b8160405180602001604052808781525061a32c565b90506193b58160405180602001604052808681525061a32c565b90506193cf8160405180602001604052808581525061a32c565b9050809a50505050505050505050505b92915050565b600069d3c21bcecceda10000008260000151816193fe57fe5b049050919050565b600081600001519050919050565b61941c61a85f565b600082600001511415619497576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f63616e277420646976696465206279203000000000000000000000000000000081525060200191505060405180910390fd5b600069d3c21bcecceda10000008460000151029050836000015169d3c21bcecceda100000082816194c457fe5b0414619538576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f766572666c6f7720617420646976696465000000000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808460000151838161955057fe5b0481525091505092915050565b61956b82826000855161a3d5565b5050565b60006003600001905061958f828260000154618c9590919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506195f3838260000154618c9590919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050619657848260000154618c9590919063ffffffff16565b816000018190555060008160000154141561967757600081600101819055505b505050505050565b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091866040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561970b57600080fd5b505af415801561971f573d6000803e3d6000fd5b505050506040513d602081101561973557600080fd5b81019080805190602001909291905050501561993e576000619826846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156197dd57600080fd5b505af41580156197f1573d6000803e3d6000fd5b505050506040513d602081101561980757600080fd5b8101908080519060200190929190505050618c9590919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561992457600080fd5b505af4158015619938573d6000803e3d6000fd5b50505050505b601160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561999b5761999a8585612729565b5b5050505050565b828054905081108015619a1657508173ffffffffffffffffffffffffffffffffffffffff168382815481106199d357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b619a88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f42616420696e646578000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000619aa260018580549050618c9590919063ffffffff16565b9050838181548110619ab057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848381548110619ae757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808481619b3c919061a872565b5050505050565b600080600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541415619b9e5760009050619c56565b619c53600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154619c45600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001548561833090919063ffffffff16565b6183cf90919063ffffffff16565b90505b92915050565b619c6461a85f565b619c6c61a85f565b619c7584618efc565b9050619c7f61a85f565b619c8884618efc565b9050619c948282619414565b9250505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415619d24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061a92d6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060036002019050619e038382600001546182a890919063ffffffff16565b81600001819055506000619e17868561a6ea565b905060008260010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050619e758582600001546182a890919063ffffffff16565b8160000181905550619e948282600101546182a890919063ffffffff16565b8160010181905550619ef0828260020160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546182a890919063ffffffff16565b8160020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508193505050509392505050565b60008083118290619fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015619fb3578082015181840152602081019050619f98565b50505050905090810190601f168015619fe05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581619ffa57fe5b049050809150509392505050565b6000806003600201905061a029838260000154618c9590919063ffffffff16565b81600001819055506000809050600061a0428787616469565b905060008360010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508582141561a0da578060020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925061a0e7565b61a0e4888761a6ea565b92505b61a0fe868260000154618c9590919063ffffffff16565b816000018190555061a11d838260010154618c9590919063ffffffff16565b816001018190555061a179838260020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054618c9590919063ffffffff16565b8160020160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550829450505050509392505050565b600083831115829061a279576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561a23e57808201518184015260208101905061a223565b50505050905090810190601f16801561a26b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60007601357c299a88ea76a58924d52ce4f26a85af186c2b9e74905090565b61a2b361a85f565b604051806020016040528069d3c21bcecceda10000008085600001518161a2d657fe5b04028152509050919050565b61a2ea61a85f565b604051806020016040528069d3c21bcecceda10000008085600001518161a30d57fe5b04028460000151038152509050919050565b600064e8d4a51000905090565b61a33461a85f565b600082600001518460000151019050836000015181101561a3bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f616464206f766572666c6f77206465746563746564000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808281525091505092915050565b825184511461a42f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061abab6023913960400191505060405180910390fd5b8351821061a4a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f6865617020737461727420696e646578206f7574206f662072616e676500000081525060200191505060405180910390fd5b835181111561a51c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f68656170206c656e677468206f7574206f662072616e6765000000000000000081525060200191505060405180910390fd5b60008290505b60011561a6e357600061a552600161a54460028561833090919063ffffffff16565b6182a890919063ffffffff16565b9050600061a57d600261a56f60028661833090919063ffffffff16565b6182a890919063ffffffff16565b90506000839050848310801561a5ee575061a5ed8789838151811061a59e57fe5b60200260200101518151811061a5b057fe5b6020026020010151888a868151811061a5c557fe5b60200260200101518151811061a5d757fe5b602002602001015161a81d90919063ffffffff16565b5b1561a5f7578290505b848210801561a661575061a6608789838151811061a61157fe5b60200260200101518151811061a62357fe5b6020026020010151888a858151811061a63857fe5b60200260200101518151811061a64a57fe5b602002602001015161a81d90919063ffffffff16565b5b1561a66a578190505b8381141561a67a5750505061a6e3565b600088858151811061a68857fe5b6020026020010151905088828151811061a69e57fe5b602002602001015189868151811061a6b257fe5b6020026020010181815250508089838151811061a6cb57fe5b6020026020010181815250508194505050505061a522565b5050505050565b600080600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141561a75f5761a75868056bc75e2d631000008361833090919063ffffffff16565b905061a817565b61a814600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015461a806600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101548561833090919063ffffffff16565b6183cf90919063ffffffff16565b90505b92915050565b60008160000151836000015111905092915050565b604051806040016040528060608152602001600081525090565b6040518060200160405280600081525090565b6040518060200160405280600081525090565b81548183558181111561a8995781836000526020600020918201910161a898919061a89e565b5b505050565b61a8c091905b8082111561a8bc57600081600090555060010161a8a4565b5090565b9056fe4d6178696d756d20656c65637461626c652076616c696461746f72732063616e6e6f7420626520736d616c6c6572207468616e206d696e696d756d6572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e707574206c656e67746873206d75737420626520636f72726573706f6e642e56616c696461746f722067726f7570732063616e6e6f7420766f746520666f72206d6f7265207468616e206d6178206e756d626572206f662067726f757073456c6563746162696c697479207468726573686f6c64206d757374206265206c6f776572207468616e20313030256572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6563616e277420637265617465206669786964697479206e756d626572206c6172676572207468616e206d61784e657746697865642829566f74652076616c7565206c6172676572207468616e2061637469766520766f7465736572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c656572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c65566f74652076616c7565206c6172676572207468616e2070656e64696e6720766f7465736b657920616e642076616c7565206172726179206c656e677468206d69736d617463686572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c654d696e696d756d20656c65637461626c652076616c696461746f72732063616e6e6f74206265207a65726f44656372656d656e742076616c7565206d7573742062652067726561746572207468616e20302e6572726f722063616c6c696e67206861736848656164657220707265636f6d70696c6556616c696461746f72732063616e6e6f7420766f746520666f72206d6f7265207468616e206d6178206e756d626572206f662067726f757073a265627a7a72315820826d90b716a49f574a1418703603364ec7fb189856d86232ea84d060aa9fe65864736f6c634300050d0032