Address Details
contract
0xAaa9CB9f0afCc60d8fb21F82D5D47c4557924115
- Contract Name
- Election
- Creator
- 0xe1207b–0408ee at 0x6b57ea–e086e7
- 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
- 19293545
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
- 2022-03-28T13:29:02.986024Z
/home/eruiz/Projects/celo/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; } 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; event ElectableValidatorsSet(uint256 min, uint256 max); event MaxNumGroupsVotedForSet(uint256 maxNumGroupsVotedFor); event ElectabilityThresholdSet(uint256 electabilityThreshold); 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 The storage, major, minor, and patch version of the contract. */ function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) { return (1, 1, 2, 1); } /** * @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 and 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(groups.length < maxNumGroupsVotedFor, "Voted for too many groups"); groups.push(group); } incrementPendingVotes(group, account, value); incrementTotalVotes(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(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(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(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) { uint256 total = 0; address[] memory groups = votes.groupsVotedFor[account]; for (uint256 i = 0; i < groups.length; i = i.add(1)) { total = total.add(getTotalVotesForGroupByAccount(groups[i], account)); } return total; } /** * @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 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); } /** * @notice Decrements the number of total votes for `group` by `value`. * @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 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); } } /** * @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 lists of all validator groups and the number of votes they've received. * @return Lists of all validator groups and the number of votes they've 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; } // 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; } }
/home/eruiz/Projects/celo/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"); _; } }
/home/eruiz/Projects/celo/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()); } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/Initializable.sol
pragma solidity ^0.5.13; contract Initializable { bool public initialized; constructor(bool testingDeployment) public { if (!testingDeployment) { initialized = true; } } modifier initializer() { require(!initialized, "contract already initialized"); initialized = true; _; } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/UsingPrecompiles.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "../common/interfaces/ICeloVersionedContract.sol"; contract UsingPrecompiles { using SafeMath for uint256; address constant TRANSFER = address(0xff - 2); address constant FRACTION_MUL = address(0xff - 3); address constant PROOF_OF_POSSESSION = address(0xff - 4); address constant GET_VALIDATOR = address(0xff - 5); address constant NUMBER_VALIDATORS = address(0xff - 6); address constant EPOCH_SIZE = address(0xff - 7); address constant BLOCK_NUMBER_FROM_HEADER = address(0xff - 8); address constant HASH_HEADER = address(0xff - 9); address constant GET_PARENT_SEAL_BITMAP = address(0xff - 10); address constant GET_VERIFIED_SEAL_BITMAP = address(0xff - 11); /** * @notice calculate a * b^x for fractions a, b to `decimals` precision * @param aNumerator Numerator of first fraction * @param aDenominator Denominator of first fraction * @param bNumerator Numerator of exponentiated fraction * @param bDenominator Denominator of exponentiated fraction * @param exponent exponent to raise b to * @param _decimals precision * @return numerator/denominator of the computed quantity (not reduced). */ function fractionMulExp( uint256 aNumerator, uint256 aDenominator, uint256 bNumerator, uint256 bDenominator, uint256 exponent, uint256 _decimals ) public view returns (uint256, uint256) { require(aDenominator != 0 && bDenominator != 0, "a denominator is zero"); uint256 returnNumerator; uint256 returnDenominator; bool success; bytes memory out; (success, out) = FRACTION_MUL.staticcall( abi.encodePacked(aNumerator, aDenominator, bNumerator, bDenominator, exponent, _decimals) ); require(success, "error calling fractionMulExp precompile"); returnNumerator = getUint256FromBytes(out, 0); returnDenominator = getUint256FromBytes(out, 32); return (returnNumerator, returnDenominator); } /** * @notice Returns the current epoch size in blocks. * @return The current epoch size in blocks. */ function getEpochSize() public view returns (uint256) { bytes memory out; bool success; (success, out) = EPOCH_SIZE.staticcall(abi.encodePacked()); require(success, "error calling getEpochSize precompile"); return getUint256FromBytes(out, 0); } /** * @notice Returns the epoch number at a block. * @param blockNumber Block number where epoch number is calculated. * @return Epoch number. */ function getEpochNumberOfBlock(uint256 blockNumber) public view returns (uint256) { return epochNumberOfBlock(blockNumber, getEpochSize()); } /** * @notice Returns the epoch number at a block. * @return Current epoch number. */ function getEpochNumber() public view returns (uint256) { return getEpochNumberOfBlock(block.number); } /** * @notice Returns the epoch number at a block. * @param blockNumber Block number where epoch number is calculated. * @param epochSize The epoch size in blocks. * @return Epoch number. */ function epochNumberOfBlock(uint256 blockNumber, uint256 epochSize) internal pure returns (uint256) { // Follows GetEpochNumber from celo-blockchain/blob/master/consensus/istanbul/utils.go uint256 epochNumber = blockNumber / epochSize; if (blockNumber % epochSize == 0) { return epochNumber; } else { return epochNumber.add(1); } } /** * @notice Gets a validator address from the current validator set. * @param index Index of requested validator in the validator set. * @return Address of validator at the requested index. */ function validatorSignerAddressFromCurrentSet(uint256 index) public view returns (address) { bytes memory out; bool success; (success, out) = GET_VALIDATOR.staticcall(abi.encodePacked(index, uint256(block.number))); require(success, "error calling validatorSignerAddressFromCurrentSet precompile"); return address(getUint256FromBytes(out, 0)); } /** * @notice Gets a validator address from the validator set at the given block number. * @param index Index of requested validator in the validator set. * @param blockNumber Block number to retrieve the validator set from. * @return Address of validator at the requested index. */ function validatorSignerAddressFromSet(uint256 index, uint256 blockNumber) public view returns (address) { bytes memory out; bool success; (success, out) = GET_VALIDATOR.staticcall(abi.encodePacked(index, blockNumber)); require(success, "error calling validatorSignerAddressFromSet precompile"); return address(getUint256FromBytes(out, 0)); } /** * @notice Gets the size of the current elected validator set. * @return Size of the current elected validator set. */ function numberValidatorsInCurrentSet() public view returns (uint256) { bytes memory out; bool success; (success, out) = NUMBER_VALIDATORS.staticcall(abi.encodePacked(uint256(block.number))); require(success, "error calling numberValidatorsInCurrentSet precompile"); return getUint256FromBytes(out, 0); } /** * @notice Gets the size of the validator set that must sign the given block number. * @param blockNumber Block number to retrieve the validator set from. * @return Size of the validator set. */ function numberValidatorsInSet(uint256 blockNumber) public view returns (uint256) { bytes memory out; bool success; (success, out) = NUMBER_VALIDATORS.staticcall(abi.encodePacked(blockNumber)); require(success, "error calling numberValidatorsInSet precompile"); return getUint256FromBytes(out, 0); } /** * @notice Checks a BLS proof of possession. * @param sender The address signed by the BLS key to generate the proof of possession. * @param blsKey The BLS public key that the validator is using for consensus, should pass proof * of possession. 48 bytes. * @param blsPop The BLS public key proof-of-possession, which consists of a signature on the * account address. 96 bytes. * @return True upon success. */ function checkProofOfPossession(address sender, bytes memory blsKey, bytes memory blsPop) public view returns (bool) { bool success; (success, ) = PROOF_OF_POSSESSION.staticcall(abi.encodePacked(sender, blsKey, blsPop)); return success; } /** * @notice Parses block number out of header. * @param header RLP encoded header * @return Block number. */ function getBlockNumberFromHeader(bytes memory header) public view returns (uint256) { bytes memory out; bool success; (success, out) = BLOCK_NUMBER_FROM_HEADER.staticcall(abi.encodePacked(header)); require(success, "error calling getBlockNumberFromHeader precompile"); return getUint256FromBytes(out, 0); } /** * @notice Computes hash of header. * @param header RLP encoded header * @return Header hash. */ function hashHeader(bytes memory header) public view returns (bytes32) { bytes memory out; bool success; (success, out) = HASH_HEADER.staticcall(abi.encodePacked(header)); require(success, "error calling hashHeader precompile"); return getBytes32FromBytes(out, 0); } /** * @notice Gets the parent seal bitmap from the header at the given block number. * @param blockNumber Block number to retrieve. Must be within 4 epochs of the current number. * @return Bitmap parent seal with set bits at indices corresponding to signing validators. */ function getParentSealBitmap(uint256 blockNumber) public view returns (bytes32) { bytes memory out; bool success; (success, out) = GET_PARENT_SEAL_BITMAP.staticcall(abi.encodePacked(blockNumber)); require(success, "error calling getParentSealBitmap precompile"); return getBytes32FromBytes(out, 0); } /** * @notice Verifies the BLS signature on the header and returns the seal bitmap. * The validator set used for verification is retrieved based on the parent hash field of the * header. If the parent hash is not in the blockchain, verification fails. * @param header RLP encoded header * @return Bitmap parent seal with set bits at indices correspoinding to signing validators. */ function getVerifiedSealBitmapFromHeader(bytes memory header) public view returns (bytes32) { bytes memory out; bool success; (success, out) = GET_VERIFIED_SEAL_BITMAP.staticcall(abi.encodePacked(header)); require(success, "error calling getVerifiedSealBitmapFromHeader precompile"); return getBytes32FromBytes(out, 0); } /** * @notice Converts bytes to uint256. * @param bs byte[] data * @param start offset into byte data to convert * @return uint256 data */ function getUint256FromBytes(bytes memory bs, uint256 start) internal pure returns (uint256) { return uint256(getBytes32FromBytes(bs, start)); } /** * @notice Converts bytes to bytes32. * @param bs byte[] data * @param start offset into byte data to convert * @return bytes32 data */ function getBytes32FromBytes(bytes memory bs, uint256 start) internal pure returns (bytes32) { require(bs.length >= start.add(32), "slicing out of range"); bytes32 x; assembly { x := mload(add(bs, add(start, 32))) } return x; } /** * @notice Returns the minimum number of required signers for a given block number. * @dev Computed in celo-blockchain as int(math.Ceil(float64(2*valSet.Size()) / 3)) */ function minQuorumSize(uint256 blockNumber) public view returns (uint256) { return numberValidatorsInSet(blockNumber).mul(2).add(2).div(3); } /** * @notice Computes byzantine quorum from current validator set size * @return Byzantine quorum of validators. */ function minQuorumSizeInCurrentSet() public view returns (uint256) { return minQuorumSize(block.number); } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/UsingRegistry.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; import "./interfaces/IAccounts.sol"; import "./interfaces/IFeeCurrencyWhitelist.sol"; import "./interfaces/IFreezer.sol"; import "./interfaces/IRegistry.sol"; import "../governance/interfaces/IElection.sol"; import "../governance/interfaces/IGovernance.sol"; import "../governance/interfaces/ILockedGold.sol"; import "../governance/interfaces/IValidators.sol"; import "../identity/interfaces/IRandom.sol"; import "../identity/interfaces/IAttestations.sol"; import "../stability/interfaces/IExchange.sol"; import "../stability/interfaces/IReserve.sol"; import "../stability/interfaces/ISortedOracles.sol"; import "../stability/interfaces/IStableToken.sol"; contract UsingRegistry is Ownable { event RegistrySet(address indexed registryAddress); // solhint-disable state-visibility bytes32 constant ACCOUNTS_REGISTRY_ID = keccak256(abi.encodePacked("Accounts")); bytes32 constant ATTESTATIONS_REGISTRY_ID = keccak256(abi.encodePacked("Attestations")); bytes32 constant DOWNTIME_SLASHER_REGISTRY_ID = keccak256(abi.encodePacked("DowntimeSlasher")); bytes32 constant DOUBLE_SIGNING_SLASHER_REGISTRY_ID = keccak256( abi.encodePacked("DoubleSigningSlasher") ); bytes32 constant ELECTION_REGISTRY_ID = keccak256(abi.encodePacked("Election")); bytes32 constant EXCHANGE_REGISTRY_ID = keccak256(abi.encodePacked("Exchange")); bytes32 constant FEE_CURRENCY_WHITELIST_REGISTRY_ID = keccak256( abi.encodePacked("FeeCurrencyWhitelist") ); bytes32 constant FREEZER_REGISTRY_ID = keccak256(abi.encodePacked("Freezer")); bytes32 constant GOLD_TOKEN_REGISTRY_ID = keccak256(abi.encodePacked("GoldToken")); bytes32 constant GOVERNANCE_REGISTRY_ID = keccak256(abi.encodePacked("Governance")); bytes32 constant GOVERNANCE_SLASHER_REGISTRY_ID = keccak256( abi.encodePacked("GovernanceSlasher") ); bytes32 constant LOCKED_GOLD_REGISTRY_ID = keccak256(abi.encodePacked("LockedGold")); bytes32 constant RESERVE_REGISTRY_ID = keccak256(abi.encodePacked("Reserve")); bytes32 constant RANDOM_REGISTRY_ID = keccak256(abi.encodePacked("Random")); bytes32 constant SORTED_ORACLES_REGISTRY_ID = keccak256(abi.encodePacked("SortedOracles")); bytes32 constant STABLE_TOKEN_REGISTRY_ID = keccak256(abi.encodePacked("StableToken")); bytes32 constant VALIDATORS_REGISTRY_ID = keccak256(abi.encodePacked("Validators")); // solhint-enable state-visibility IRegistry public registry; modifier onlyRegisteredContract(bytes32 identifierHash) { require(registry.getAddressForOrDie(identifierHash) == msg.sender, "only registered contract"); _; } modifier onlyRegisteredContracts(bytes32[] memory identifierHashes) { require(registry.isOneOf(identifierHashes, msg.sender), "only registered contracts"); _; } /** * @notice Updates the address pointing to a Registry contract. * @param registryAddress The address of a registry contract for routing to other contracts. */ function setRegistry(address registryAddress) public onlyOwner { require(registryAddress != address(0), "Cannot register the null address"); registry = IRegistry(registryAddress); emit RegistrySet(registryAddress); } function getAccounts() internal view returns (IAccounts) { return IAccounts(registry.getAddressForOrDie(ACCOUNTS_REGISTRY_ID)); } function getAttestations() internal view returns (IAttestations) { return IAttestations(registry.getAddressForOrDie(ATTESTATIONS_REGISTRY_ID)); } function getElection() internal view returns (IElection) { return IElection(registry.getAddressForOrDie(ELECTION_REGISTRY_ID)); } function getExchange() internal view returns (IExchange) { return IExchange(registry.getAddressForOrDie(EXCHANGE_REGISTRY_ID)); } function getFeeCurrencyWhitelistRegistry() internal view returns (IFeeCurrencyWhitelist) { return IFeeCurrencyWhitelist(registry.getAddressForOrDie(FEE_CURRENCY_WHITELIST_REGISTRY_ID)); } function getFreezer() internal view returns (IFreezer) { return IFreezer(registry.getAddressForOrDie(FREEZER_REGISTRY_ID)); } function getGoldToken() internal view returns (IERC20) { return IERC20(registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID)); } function getGovernance() internal view returns (IGovernance) { return IGovernance(registry.getAddressForOrDie(GOVERNANCE_REGISTRY_ID)); } function getLockedGold() internal view returns (ILockedGold) { return ILockedGold(registry.getAddressForOrDie(LOCKED_GOLD_REGISTRY_ID)); } function getRandom() internal view returns (IRandom) { return IRandom(registry.getAddressForOrDie(RANDOM_REGISTRY_ID)); } function getReserve() internal view returns (IReserve) { return IReserve(registry.getAddressForOrDie(RESERVE_REGISTRY_ID)); } function getSortedOracles() internal view returns (ISortedOracles) { return ISortedOracles(registry.getAddressForOrDie(SORTED_ORACLES_REGISTRY_ID)); } function getStableToken() internal view returns (IStableToken) { return IStableToken(registry.getAddressForOrDie(STABLE_TOKEN_REGISTRY_ID)); } function getValidators() internal view returns (IValidators) { return IValidators(registry.getAddressForOrDie(VALIDATORS_REGISTRY_ID)); } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IAccounts.sol
pragma solidity ^0.5.13; interface IAccounts { function isAccount(address) external view returns (bool); function voteSignerToAccount(address) external view returns (address); function validatorSignerToAccount(address) external view returns (address); function attestationSignerToAccount(address) external view returns (address); function signerToAccount(address) external view returns (address); function getAttestationSigner(address) external view returns (address); function getValidatorSigner(address) external view returns (address); function getVoteSigner(address) external view returns (address); function hasAuthorizedVoteSigner(address) external view returns (bool); function hasAuthorizedValidatorSigner(address) external view returns (bool); function hasAuthorizedAttestationSigner(address) external view returns (bool); function setAccountDataEncryptionKey(bytes calldata) external; function setMetadataURL(string calldata) external; function setName(string calldata) external; function setWalletAddress(address, uint8, bytes32, bytes32) external; function setAccount(string calldata, bytes calldata, address, uint8, bytes32, bytes32) external; function getDataEncryptionKey(address) external view returns (bytes memory); function getWalletAddress(address) external view returns (address); function getMetadataURL(address) external view returns (string memory); function batchGetMetadataURL(address[] calldata) external view returns (uint256[] memory, bytes memory); function getName(address) external view returns (string memory); function authorizeVoteSigner(address, uint8, bytes32, bytes32) external; function authorizeValidatorSigner(address, uint8, bytes32, bytes32) external; function authorizeValidatorSignerWithPublicKey(address, uint8, bytes32, bytes32, bytes calldata) external; function authorizeValidatorSignerWithKeys( address, uint8, bytes32, bytes32, bytes calldata, bytes calldata, bytes calldata ) external; function authorizeAttestationSigner(address, uint8, bytes32, bytes32) external; function createAccount() external returns (bool); function setPaymentDelegation(address, uint256) external; function getPaymentDelegation(address) external view returns (address, uint256); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/ICeloVersionedContract.sol
pragma solidity ^0.5.13; interface ICeloVersionedContract { /** * @notice Returns the storage, major, minor, and patch version of the contract. * @return The storage, major, minor, and patch version of the contract. */ function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IFeeCurrencyWhitelist.sol
pragma solidity ^0.5.13; interface IFeeCurrencyWhitelist { function addToken(address) external; function getWhitelist() external view returns (address[] memory); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IFreezer.sol
pragma solidity ^0.5.13; interface IFreezer { function isFrozen(address) external view returns (bool); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IRegistry.sol
pragma solidity ^0.5.13; interface IRegistry { function setAddressFor(string calldata, address) external; function getAddressForOrDie(bytes32) external view returns (address); function getAddressFor(bytes32) external view returns (address); function getAddressForStringOrDie(string calldata identifier) external view returns (address); function getAddressForString(string calldata identifier) external view returns (address); function isOneOf(bytes32[] calldata, address) external view returns (bool); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/libraries/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); } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/libraries/ReentrancyGuard.sol
pragma solidity ^0.5.13; /** * @title Helps contracts guard against reentrancy attacks. * @author Remco Bloemen <remco@2π.com>, Eenae <alexey@mixbytes.io> * @dev If you mark a function `nonReentrant`, you should also * mark it `external`. */ contract ReentrancyGuard { /// @dev counter to allow mutex lock with only one SSTORE operation uint256 private _guardCounter; constructor() internal { // The counter starts at one to prevent changing it from zero to a non-zero // value, which is a more expensive operation. _guardCounter = 1; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter, "reentrant call"); } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/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 An unpacked list of elements from 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); } }
/home/eruiz/Projects/celo/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); } }
/home/eruiz/Projects/celo/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 An unpacked list of elements from 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/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; } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/IElection.sol
pragma solidity ^0.5.13; interface IElection { function electValidatorSigners() external view returns (address[] memory); function electNValidatorSigners(uint256, uint256) external view returns (address[] memory); function vote(address, uint256, address, address) external returns (bool); function activate(address) external returns (bool); function revokeActive(address, uint256, address, address, uint256) external returns (bool); function revokeAllActive(address, address, address, uint256) external returns (bool); function revokePending(address, uint256, address, address, uint256) external returns (bool); function markGroupIneligible(address) external; function markGroupEligible(address, address, address) external; function forceDecrementVotes( address, uint256, address[] calldata, address[] calldata, uint256[] calldata ) external returns (uint256); // view functions function getElectableValidators() external view returns (uint256, uint256); function getElectabilityThreshold() external view returns (uint256); function getNumVotesReceivable(address) external view returns (uint256); function getTotalVotes() external view returns (uint256); function getActiveVotes() external view returns (uint256); function getTotalVotesByAccount(address) external view returns (uint256); function getPendingVotesForGroupByAccount(address, address) external view returns (uint256); function getActiveVotesForGroupByAccount(address, address) external view returns (uint256); function getTotalVotesForGroupByAccount(address, address) external view returns (uint256); function getActiveVoteUnitsForGroupByAccount(address, address) external view returns (uint256); function getTotalVotesForGroup(address) external view returns (uint256); function getActiveVotesForGroup(address) external view returns (uint256); function getPendingVotesForGroup(address) external view returns (uint256); function getGroupEligibility(address) external view returns (bool); function getGroupEpochRewards(address, uint256, uint256[] calldata) external view returns (uint256); function getGroupsVotedForByAccount(address) external view returns (address[] memory); function getEligibleValidatorGroups() external view returns (address[] memory); function getTotalVotesForEligibleValidatorGroups() external view returns (address[] memory, uint256[] memory); function getCurrentValidatorSigners() external view returns (address[] memory); function canReceiveVotes(address, uint256) external view returns (bool); function hasActivatablePendingVotes(address, address) external view returns (bool); // only owner function setElectableValidators(uint256, uint256) external returns (bool); function setMaxNumGroupsVotedFor(uint256) external returns (bool); function setElectabilityThreshold(uint256) external returns (bool); // only VM function distributeEpochRewards(address, uint256, address, address) external; }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/IGovernance.sol
pragma solidity ^0.5.13; interface IGovernance { function isVoting(address) external view returns (bool); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/ILockedGold.sol
pragma solidity ^0.5.13; interface ILockedGold { function incrementNonvotingAccountBalance(address, uint256) external; function decrementNonvotingAccountBalance(address, uint256) external; function getAccountTotalLockedGold(address) external view returns (uint256); function getTotalLockedGold() external view returns (uint256); function getPendingWithdrawals(address) external view returns (uint256[] memory, uint256[] memory); function getTotalPendingWithdrawals(address) external view returns (uint256); function lock() external payable; function unlock(uint256) external; function relock(uint256, uint256) external; function withdraw(uint256) external; function slash( address account, uint256 penalty, address reporter, uint256 reward, address[] calldata lessers, address[] calldata greaters, uint256[] calldata indices ) external; function isSlasher(address) external view returns (bool); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/IValidators.sol
pragma solidity ^0.5.13; interface IValidators { function registerValidator(bytes calldata, bytes calldata, bytes calldata) external returns (bool); function deregisterValidator(uint256) external returns (bool); function affiliate(address) external returns (bool); function deaffiliate() external returns (bool); function updateBlsPublicKey(bytes calldata, bytes calldata) external returns (bool); function registerValidatorGroup(uint256) external returns (bool); function deregisterValidatorGroup(uint256) external returns (bool); function addMember(address) external returns (bool); function addFirstMember(address, address, address) external returns (bool); function removeMember(address) external returns (bool); function reorderMember(address, address, address) external returns (bool); function updateCommission() external; function setNextCommissionUpdate(uint256) external; function resetSlashingMultiplier() external; // only owner function setCommissionUpdateDelay(uint256) external; function setMaxGroupSize(uint256) external returns (bool); function setMembershipHistoryLength(uint256) external returns (bool); function setValidatorScoreParameters(uint256, uint256) external returns (bool); function setGroupLockedGoldRequirements(uint256, uint256) external returns (bool); function setValidatorLockedGoldRequirements(uint256, uint256) external returns (bool); function setSlashingMultiplierResetPeriod(uint256) external; // view functions function getMaxGroupSize() external view returns (uint256); function getCommissionUpdateDelay() external view returns (uint256); function getValidatorScoreParameters() external view returns (uint256, uint256); function getMembershipHistory(address) external view returns (uint256[] memory, address[] memory, uint256, uint256); function calculateEpochScore(uint256) external view returns (uint256); function calculateGroupEpochScore(uint256[] calldata) external view returns (uint256); function getAccountLockedGoldRequirement(address) external view returns (uint256); function meetsAccountLockedGoldRequirements(address) external view returns (bool); function getValidatorBlsPublicKeyFromSigner(address) external view returns (bytes memory); function getValidator(address account) external view returns (bytes memory, bytes memory, address, uint256, address); function getValidatorGroup(address) external view returns (address[] memory, uint256, uint256, uint256, uint256[] memory, uint256, uint256); function getGroupNumMembers(address) external view returns (uint256); function getTopGroupValidators(address, uint256) external view returns (address[] memory); function getGroupsNumMembers(address[] calldata accounts) external view returns (uint256[] memory); function getNumRegisteredValidators() external view returns (uint256); function groupMembershipInEpoch(address, uint256, uint256) external view returns (address); // only registered contract function updateEcdsaPublicKey(address, address, bytes calldata) external returns (bool); function updatePublicKeys(address, address, bytes calldata, bytes calldata, bytes calldata) external returns (bool); function getValidatorLockedGoldRequirements() external view returns (uint256, uint256); function getGroupLockedGoldRequirements() external view returns (uint256, uint256); function getRegisteredValidators() external view returns (address[] memory); function getRegisteredValidatorSigners() external view returns (address[] memory); function getRegisteredValidatorGroups() external view returns (address[] memory); function isValidatorGroup(address) external view returns (bool); function isValidator(address) external view returns (bool); function getValidatorGroupSlashingMultiplier(address) external view returns (uint256); function getMembershipInLastEpoch(address) external view returns (address); function getMembershipInLastEpochFromSigner(address) external view returns (address); // only VM function updateValidatorScoreFromSigner(address, uint256) external; function distributeEpochPaymentsFromSigner(address, uint256) external returns (uint256); // only slasher function forceDeaffiliateIfValidator(address) external; function halveSlashingMultiplier(address) external; }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/identity/interfaces/IAttestations.sol
pragma solidity ^0.5.13; interface IAttestations { function request(bytes32, uint256, address) external; function selectIssuers(bytes32) external; function complete(bytes32, uint8, bytes32, bytes32) external; function revoke(bytes32, uint256) external; function withdraw(address) external; function approveTransfer(bytes32, uint256, address, address, bool) external; // view functions function getUnselectedRequest(bytes32, address) external view returns (uint32, uint32, address); function getAttestationIssuers(bytes32, address) external view returns (address[] memory); function getAttestationStats(bytes32, address) external view returns (uint32, uint32); function batchGetAttestationStats(bytes32[] calldata) external view returns (uint256[] memory, address[] memory, uint64[] memory, uint64[] memory); function getAttestationState(bytes32, address, address) external view returns (uint8, uint32, address); function getCompletableAttestations(bytes32, address) external view returns (uint32[] memory, address[] memory, uint256[] memory, bytes memory); function getAttestationRequestFee(address) external view returns (uint256); function getMaxAttestations() external view returns (uint256); function validateAttestationCode(bytes32, address, uint8, bytes32, bytes32) external view returns (address); function lookupAccountsForIdentifier(bytes32) external view returns (address[] memory); function requireNAttestationsRequested(bytes32, address, uint32) external view; // only owner function setAttestationRequestFee(address, uint256) external; function setAttestationExpiryBlocks(uint256) external; function setSelectIssuersWaitBlocks(uint256) external; function setMaxAttestations(uint256) external; }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/identity/interfaces/IRandom.sol
pragma solidity ^0.5.13; interface IRandom { function revealAndCommit(bytes32, bytes32, address) external; function randomnessBlockRetentionWindow() external view returns (uint256); function random() external view returns (bytes32); function getBlockRandomness(uint256) external view returns (bytes32); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/IExchange.sol
pragma solidity ^0.5.13; interface IExchange { function buy(uint256, uint256, bool) external returns (uint256); function sell(uint256, uint256, bool) external returns (uint256); function exchange(uint256, uint256, bool) external returns (uint256); function setUpdateFrequency(uint256) external; function getBuyTokenAmount(uint256, bool) external view returns (uint256); function getSellTokenAmount(uint256, bool) external view returns (uint256); function getBuyAndSellBuckets(bool) external view returns (uint256, uint256); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/IReserve.sol
pragma solidity ^0.5.13; interface IReserve { function setTobinTaxStalenessThreshold(uint256) external; function addToken(address) external returns (bool); function removeToken(address, uint256) external returns (bool); function transferGold(address payable, uint256) external returns (bool); function transferExchangeGold(address payable, uint256) external returns (bool); function getReserveGoldBalance() external view returns (uint256); function getUnfrozenReserveGoldBalance() external view returns (uint256); function getOrComputeTobinTax() external returns (uint256, uint256); function getTokens() external view returns (address[] memory); function getReserveRatio() external view returns (uint256); function addExchangeSpender(address) external; function removeExchangeSpender(address, uint256) external; function addSpender(address) external; function removeSpender(address) external; }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/ISortedOracles.sol
pragma solidity ^0.5.13; interface ISortedOracles { function addOracle(address, address) external; function removeOracle(address, address, uint256) external; function report(address, uint256, address, address) external; function removeExpiredReports(address, uint256) external; function isOldestReportExpired(address token) external view returns (bool, address); function numRates(address) external view returns (uint256); function medianRate(address) external view returns (uint256, uint256); function numTimestamps(address) external view returns (uint256); function medianTimestamp(address) external view returns (uint256); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/IStableToken.sol
pragma solidity ^0.5.13; /** * @title This interface describes the functions specific to Celo Stable Tokens, and in the * absence of interface inheritance is intended as a companion to IERC20.sol and ICeloToken.sol. */ interface IStableToken { function mint(address, uint256) external returns (bool); function burn(uint256) external returns (bool); function setInflationParameters(uint256, uint256) external; function valueToUnits(uint256) external view returns (uint256); function unitsToValue(uint256) external view returns (uint256); function getInflationParameters() external view returns (uint256, uint256, uint256, uint256); // NOTE: duplicated with IERC20.sol, remove once interface inheritance is supported. function balanceOf(address) external view returns (uint256); }
/openzeppelin-solidity/contracts/GSN/Context.sol
pragma solidity ^0.5.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
/openzeppelin-solidity/contracts/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); }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"bool","name":"test","internalType":"bool"}]},{"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":"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":[{"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":"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
0x60806040523480156200001157600080fd5b506040516200a4a83803806200a4a8833981810160405260208110156200003757600080fd5b81019080805190602001909291905050508060006200005b6200012a60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600180819055508062000122576001600260006101000a81548160ff0219169083151502179055505b505062000132565b600033905090565b61a36680620001426000396000f3fe608060405234801561001057600080fd5b50600436106103d05760003560e01c80638ef01def116101ff578063bdd143181161011a578063ec683072116100ad578063f92ad2191161007c578063f92ad21914611c84578063f9d7daae14611cf0578063f9f41a7a14611d15578063fae8db0a14611d3a576103d0565b8063ec68307214611abe578063f23263f914611b39578063f2fde38b14611bf0578063f911f0b714611c34576103d0565b8063df4da461116100e9578063df4da46114611952578063e0a2ab5214611970578063e50e652d14611a16578063e59ea3e814611a58576103d0565b8063bdd14318146117e8578063c14470c414611806578063d3e242a414611882578063dedafeae146118fa576103d0565b80639b95975f11610192578063a5826ab211610161578063a5826ab2146116e3578063a8e4587114611742578063a91ee0dc14611786578063ac839d69146117ca576103d0565b80639b95975f146114bf5780639dfb608114611537578063a18fb2db146115e7578063a2fb4ddf1461166b576103d0565b806395128ce3116101ce57806395128ce3146113e95780639a0e7d66146114415780639a7b3be71461145f5780639b2b592f1461147d576103d0565b80638ef01def146111815780638f32d59b146112e257806390a4dd5c14611304578063926d00ca14611391576103d0565b806354255be0116102ef5780637046c96b1161028257806387ee8a0f1161025157806387ee8a0f14610fee5780638a8836261461100c5780638c666775146110db5780638da5cb5b14611137576103d0565b80637046c96b14610ed5578063715018a614610f7c5780637385e5da14610f865780637b10399914610fa4576103d0565b8063631db7e7116102be578063631db7e714610cb857806367960e9114610cfe5780636c781a2c14610dcd5780636e19847514610e25576103d0565b806354255be014610b0f578063580d747a14610b425780635bb5acfb14610be85780635d180adb14610c40576103d0565b80632c3b791611610367578063448144c811610336578063448144c81461092a578063457578a3146109895780634b2c2f4414610a225780634be8843b14610af1576103d0565b80632c3b7916146107d2578063386172721461082a5780633b1eb4bf146108a25780633c55a73c146108e4576103d0565b80631f604243116103a35780631f6042431461054f57806323f0ab651461056d578063263ecf74146106f75780632ba38e6914610773576103d0565b8063123633ea146103d557806312541a6b14610443578063158ef93e146104d15780631c5a9d9c146104f3575b600080fd5b610401600480360360208110156103eb57600080fd5b8101908080359060200190929190505050611d7c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cf6004803603608081101561045957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ecd565b005b6104d9611f81565b604051808215151515815260200191505060405180910390f35b6105356004803603602081101561050957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f94565b604051808215151515815260200191505060405180910390f35b6105576120fa565b6040518082815260200191505060405180910390f35b6106dd6004803603606081101561058357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156105c057600080fd5b8201836020820111156105d257600080fd5b803590602001918460018302840111640100000000831117156105f457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561065757600080fd5b82018360208201111561066957600080fd5b8035906020019184600183028401116401000000008311171561068b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061210a565b604051808215151515815260200191505060405180910390f35b6107596004803603604081101561070d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506122c3565b604051808215151515815260200191505060405180910390f35b61077b612374565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107be5780820151818401526020810190506107a3565b505050509050019250505060405180910390f35b610814600480360360208110156107e857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061238f565b6040518082815260200191505060405180910390f35b61088c6004803603604081101561084057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125b5565b6040518082815260200191505060405180910390f35b6108ce600480360360208110156108b857600080fd5b81019080803590602001909291905050506125ef565b6040518082815260200191505060405180910390f35b610910600480360360208110156108fa57600080fd5b8101908080359060200190929190505050612609565b604051808215151515815260200191505060405180910390f35b610932612744565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561097557808201518184015260208101905061095a565b505050509050019250505060405180910390f35b6109cb6004803603602081101561099f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612807565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a0e5780820151818401526020810190506109f3565b505050509050019250505060405180910390f35b610adb60048036036020811015610a3857600080fd5b8101908080359060200190640100000000811115610a5557600080fd5b820183602082011115610a6757600080fd5b80359060200191846001830284011164010000000083111715610a8957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506128d7565b6040518082815260200191505060405180910390f35b610af9612a6b565b6040518082815260200191505060405180910390f35b610b17612a77565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610bce60048036036080811015610b5857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612a9e565b604051808215151515815260200191505060405180910390f35b610c2a60048036036020811015610bfe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061311c565b6040518082815260200191505060405180910390f35b610c7660048036036040811015610c5657600080fd5b81019080803590602001909291908035906020019092919050505061316e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ce460048036036020811015610cce57600080fd5b81019080803590602001909291905050506132c0565b604051808215151515815260200191505060405180910390f35b610db760048036036020811015610d1457600080fd5b8101908080359060200190640100000000811115610d3157600080fd5b820183602082011115610d4357600080fd5b80359060200191846001830284011164010000000083111715610d6557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613419565b6040518082815260200191505060405180910390f35b610e0f60048036036020811015610de357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135ad565b6040518082815260200191505060405180910390f35b610ebb600480360360a0811015610e3b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506136e5565b604051808215151515815260200191505060405180910390f35b610edd61378e565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610f24578082015181840152602081019050610f09565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610f66578082015181840152602081019050610f4b565b5050505090500194505050505060405180910390f35b610f84613959565b005b610f8e613a92565b6040518082815260200191505060405180910390f35b610fac613aa2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ff6613ac8565b6040518082815260200191505060405180910390f35b6110c56004803603602081101561102257600080fd5b810190808035906020019064010000000081111561103f57600080fd5b82018360208201111561105157600080fd5b8035906020019184600183028401116401000000008311171561107357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613c0f565b6040518082815260200191505060405180910390f35b61111d600480360360208110156110f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613da3565b604051808215151515815260200191505060405180910390f35b61113f613e73565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6112cc600480360360a081101561119757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156111de57600080fd5b8201836020820111156111f057600080fd5b8035906020019184602083028401116401000000008311171561121257600080fd5b90919293919293908035906020019064010000000081111561123357600080fd5b82018360208201111561124557600080fd5b8035906020019184602083028401116401000000008311171561126757600080fd5b90919293919293908035906020019064010000000081111561128857600080fd5b82018360208201111561129a57600080fd5b803590602001918460208302840111640100000000831117156112bc57600080fd5b9091929391929390505050613e9c565b6040518082815260200191505060405180910390f35b6112ea614446565b604051808215151515815260200191505060405180910390f35b61133a6004803603604081101561131a57600080fd5b8101908080359060200190929190803590602001909291905050506144a4565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561137d578082015181840152602081019050611362565b505050509050019250505060405180910390f35b6113d3600480360360208110156113a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614f85565b6040518082815260200191505060405180910390f35b61142b600480360360208110156113ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614fd7565b6040518082815260200191505060405180910390f35b611449615029565b6040518082815260200191505060405180910390f35b611467615053565b6040518082815260200191505060405180910390f35b6114a96004803603602081101561149357600080fd5b8101908080359060200190929190505050615063565b6040518082815260200191505060405180910390f35b611521600480360360408110156114d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506151ac565b6040518082815260200191505060405180910390f35b6115cd600480360360a081101561154d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061523f565b604051808215151515815260200191505060405180910390f35b611669600480360360608110156115fd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061569d565b005b6116cd6004803603604081101561168157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061599d565b6040518082815260200191505060405180910390f35b6116eb615a2d565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561172e578082015181840152602081019050611713565b505050509050019250505060405180910390f35b6117846004803603602081101561175857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615b61565b005b6117c86004803603602081101561179c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615de1565b005b6117d2615f85565b6040518082815260200191505060405180910390f35b6117f0615f8b565b6040518082815260200191505060405180910390f35b6118686004803603604081101561181c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615fb1565b604051808215151515815260200191505060405180910390f35b6118e46004803603604081101561189857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050616054565b6040518082815260200191505060405180910390f35b61193c6004803603602081101561191057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506160ed565b6040518082815260200191505060405180910390f35b61195a616199565b6040518082815260200191505060405180910390f35b6119fc6004803603608081101561198657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506162d5565b604051808215151515815260200191505060405180910390f35b611a4260048036036020811015611a2c57600080fd5b8101908080359060200190929190505050616450565b6040518082815260200191505060405180910390f35b611aa460048036036040811015611a6e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061649b565b604051808215151515815260200191505060405180910390f35b611b1c600480360360c0811015611ad457600080fd5b810190808035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506166e5565b604051808381526020018281526020019250505060405180910390f35b611bda60048036036060811015611b4f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115611b9657600080fd5b820183602082011115611ba857600080fd5b80359060200191846020830284011164010000000083111715611bca57600080fd5b90919293919293905050506168f9565b6040518082815260200191505060405180910390f35b611c3260048036036020811015611c0657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050616c33565b005b611c6a60048036036040811015611c4a57600080fd5b810190808035906020019092919080359060200190929190505050616cb9565b604051808215151515815260200191505060405180910390f35b611cee600480360360a0811015611c9a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050616ee9565b005b611cf8616fbf565b604051808381526020018281526020019250505060405180910390f35b611d1d616fd1565b604051808381526020018281526020019250505060405180910390f35b611d6660048036036020811015611d5057600080fd5b8101908080359060200190929190505050616fe8565b6040518082815260200191505060405180910390f35b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611df55780518252602082019150602081019050602083039250611dd2565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611e55576040519150601f19603f3d011682016040523d82523d6000602084013e611e5a565b606091505b50809350819250505080611eb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061a104603d913960400191505060405180910390fd5b611ec4826000617131565b92505050919050565b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c7920564d2063616e2063616c6c0000000000000000000000000000000081525060200191505060405180910390fd5b611f7b84848484617148565b50505050565b600260009054906101000a900460ff1681565b600060018060008282540192505081905550600060015490506000611fb7617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561203357600080fd5b505afa158015612047573d6000803e3d6000fd5b505050506040513d602081101561205d57600080fd5b8101908080519060200190929190505050905061207a8482617624565b92505060015481146120f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50919050565b6000600360020160000154905090565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b602083106121935780518252602082019150602081019050602083039250612170565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b602083106121e457805182526020820191506020810190506020830392506121c1565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b6020831061224d578051825260208201915060208101905060208303925061222a565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146122ad576040519150601f19603f3d011682016040523d82523d6000602084013e6122b2565b606091505b505080915050809150509392505050565b600080600360000160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050612355615053565b816001015410801561236b575060008160000154115b91505092915050565b606061238a600d60000154600d600101546144a4565b905090565b6000806124fd61239d617841565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b1580156123e257600080fd5b505afa1580156123f6573d6000803e3d6000fd5b505050506040513d602081101561240c57600080fd5b81019080805190602001909291905050506124ef600161242a61793c565b73ffffffffffffffffffffffffffffffffffffffff166339e618e8886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156124a657600080fd5b505afa1580156124ba573d6000803e3d6000fd5b505050506040513d60208110156124d057600080fd5b8101908080519060200190929190505050617a3790919063ffffffff16565b617abf90919063ffffffff16565b90506000612597600d6001015461251261793c565b73ffffffffffffffffffffffffffffffffffffffff1663517f6d336040518163ffffffff1660e01b815260040160206040518083038186803b15801561255757600080fd5b505afa15801561256b573d6000803e3d6000fd5b505050506040513d602081101561258157600080fd5b8101908080519060200190929190505050617b45565b90506125ac8183617b5e90919063ffffffff16565b92505050919050565b6000806125c284846151ac565b905060006125d08585616054565b90506125e58183617a3790919063ffffffff16565b9250505092915050565b6000612602826125fd616199565b617ba8565b9050919050565b6000612613614446565b612685576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600f548214156126fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4d61782067726f75707320766f74656420666f72206e6f74206368616e67656481525060200191505060405180910390fd5b81600f819055507f1993a3864c31265ef86eec51d147eff697dee0466c92ac9abddcc4c4c6829348826040518082815260200191505060405180910390a160019050919050565b60606000612750613ac8565b90506060816040519080825280602002602001820160405280156127835781602001602082028038833980820191505090505b50905060008090505b828110156127fe5761279d81611d7c565b8282815181106127a957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506127f7600182617a3790919063ffffffff16565b905061278c565b50809250505090565b6060600360090160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156128cb57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612881575b50505050509050919050565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061292c5780518252602082019150602081019050602083039250612909565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106129935780518252602082019150602081019050602083039250612970565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146129f3576040519150601f19603f3d011682016040523d82523d6000602084013e6129f8565b606091505b50809350819250505080612a57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018061a0736038913960400191505060405180910390fd5b612a62826000617bf0565b92505050919050565b60108060000154905081565b60008060008060018060026001839350829250819150809050935093509350935090919293565b600060018060008282540192505081905550600060015490506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091886040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612b4357600080fd5b505af4158015612b57573d6000803e3d6000fd5b505050506040513d6020811015612b6d57600080fd5b8101908080519060200190929190505050612bf0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f7570206e6f7420656c696769626c65000000000000000000000000000081525060200191505060405180910390fd5b84600010612c66576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b612c70868661649b565b612ce2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f47726f75702063616e6e6f74207265636569766520766f74657300000000000081525060200191505060405180910390fd5b6000612cec617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d6857600080fd5b505afa158015612d7c573d6000803e3d6000fd5b505050506040513d6020811015612d9257600080fd5b8101908080519060200190929190505050905060008090506000600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008090505b8180549050811015612e8c578280612e6f57508973ffffffffffffffffffffffffffffffffffffffff16828281548110612e2c57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b9250612e85600182617a3790919063ffffffff16565b9050612df6565b5081612f7357600f54818054905010612f0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74656420666f7220746f6f206d616e792067726f7570730000000000000081525060200191505060405180910390fd5b808990806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b612f7e89848a617c91565b612f8a89898989617d99565b612f92617841565b73ffffffffffffffffffffffffffffffffffffffff166318a4ff8c848a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561301857600080fd5b505af115801561302c573d6000803e3d6000fd5b505050508873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd3532f70444893db82221041edb4dc26c94593aeb364b0b14dfc77d5ee9051528a6040518082815260200191505060405180910390a3600194505050506001548114613113576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50949350505050565b6000600360020160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106131e757805182526020820191506020810190506020830392506131c4565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613247576040519150601f19603f3d011682016040523d82523d6000602084013e61324c565b606091505b508093508192505050806132ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061a1766036913960400191505060405180910390fd5b6132b6826000617131565b9250505092915050565b60006132ca614446565b61333c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61334582617f91565b60106000820151816000015590505061338461335f617faf565b6010604051806020016040529081600082015481525050617fd590919063ffffffff16565b6133d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061a045602e913960400191505060405180910390fd5b7f9854be03126e38f9c318d8aabe1b150d09cb3a57059b21855b1e11d44e082c1a826040518082815260200191505060405180910390a160019050919050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061346e578051825260208201915060208101905060208303925061344b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106134d557805182526020820191506020810190506020830392506134b2565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613535576040519150601f19603f3d011682016040523d82523d6000602084013e61353a565b606091505b50809350819250505080613599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061a30f6023913960400191505060405180910390fd5b6135a4826000617bf0565b92505050919050565b600080600090506060600360090160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561367857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161362e575b5050505050905060008090505b81518110156136da576136bd6136ae8383815181106136a057fe5b6020026020010151876125b5565b84617a3790919063ffffffff16565b92506136d3600182617a3790919063ffffffff16565b9050613685565b508192505050919050565b6000600180600082825401925050819055506000600154905061370b8787878787617fea565b91506001548114613784576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b6060806003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6369b317e390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b1580156137e957600080fd5b505af41580156137fd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250604081101561382757600080fd5b810190808051604051939291908464010000000082111561384757600080fd5b8382019150602082018581111561385d57600080fd5b825186602082028301116401000000008211171561387a57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156138b1578082015181840152602081019050613896565b50505050905001604052602001805160405193929190846401000000008211156138da57600080fd5b838201915060208201858111156138f057600080fd5b825186602082028301116401000000008211171561390d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613944578082015181840152602081019050613929565b50505050905001604052505050915091509091565b613961614446565b6139d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000613a9d43616450565b905090565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310613b395780518252602082019150602081019050602083039250613b16565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613b99576040519150601f19603f3d011682016040523d82523d6000602084013e613b9e565b606091505b50809350819250505080613bfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061a1416035913960400191505060405180910390fd5b613c08826000617131565b9250505090565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310613c645780518252602082019150602081019050602083039250613c41565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310613ccb5780518252602082019150602081019050602083039250613ca8565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613d2b576040519150601f19603f3d011682016040523d82523d6000602084013e613d30565b606091505b50809350819250505080613d8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603181526020018061a28c6031913960400191505060405180910390fd5b613d9a826000617131565b92505050919050565b60006003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613e3157600080fd5b505af4158015613e45573d6000803e3d6000fd5b505050506040513d6020811015613e5b57600080fd5b81019080805190602001909291905050509050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600180600082825401925050819055506000600154905060405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015613f8657600080fd5b505afa158015613f9a573d6000803e3d6000fd5b505050506040513d6020811015613fb057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461404a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b60008a116140a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061a2e86027913960400191505060405180910390fd5b6140ab619f03565b6040518060400160405280600360090160008f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561417857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161412e575b505050505081526020018c81525090508060000151518a8a9050111580156141a55750878790508a8a9050145b80156141b657508585905088889050145b61420b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061a0246021913960400191505060405180910390fd5b600081600001515190505b60008111156143425761430c6142f98e846000015161423f6001866183c590919063ffffffff16565b8151811061424957fe5b602002602001015185602001518f8f61426c6001896183c590919063ffffffff16565b81811061427557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168e8e6142a860018a6183c590919063ffffffff16565b8181106142b157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168d8d6142e460018b6183c590919063ffffffff16565b8181106142ed57fe5b9050602002013561840f565b83602001516183c590919063ffffffff16565b82602001818152505060008260200151141561432757614342565b61433b6001826183c590919063ffffffff16565b9050614216565b5060008160200151146143bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4661696c75726520746f2064656372656d656e7420616c6c20766f7465732e0081525060200191505060405180910390fd5b8a935050506001548114614439576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5098975050505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16614488618623565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606060006144e86144e36144be6144b9615029565b61862b565b60106040518060200160405290816000820154815250506186b590919063ffffffff16565b618b14565b905060006003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6342b6351a909184876040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561455457600080fd5b505af4158015614568573d6000803e3d6000fd5b505050506040513d602081101561457e57600080fd5b8101908080519060200190929190505050905060606003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63dcb2a4dd9091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b1580156145f357600080fd5b505af4158015614607573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561463157600080fd5b810190808051604051939291908464010000000082111561465157600080fd5b8382019150602082018581111561466757600080fd5b825186602082028301116401000000008211171561468457600080fd5b8083526020830192505050908051906020019060200280838360005b838110156146bb5780820151818401526020810190506146a0565b50505050905001604052505050905060606146d461793c565b73ffffffffffffffffffffffffffffffffffffffff166370447754836040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015614742578082015181840152602081019050614727565b505050509050019250505060006040518083038186803b15801561476557600080fd5b505afa158015614779573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156147a357600080fd5b81019080805160405193929190846401000000008211156147c357600080fd5b838201915060208201858111156147d957600080fd5b82518660208202830111640100000000821117156147f657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561482d578082015181840152602081019050614812565b5050505090500160405250505090506060825160405190808252806020026020018201604052801561486e5781602001602082028038833980820191505090505b5090506000809050606084516040519080825280602002602001820160405280156148a85781602001602082028038833980820191505090505b509050606085516040519080825280602002602001820160405280156148e857816020015b6148d5619f1d565b8152602001906001900390816148cd5790505b50905060008090505b8651811015614a27578083828151811061490757fe5b6020026020010181815250506149f56003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b390918a858151811061494657fe5b60200260200101516040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156149b557600080fd5b505af41580156149c9573d6000803e3d6000fd5b505050506040513d60208110156149df57600080fd5b810190808051906020019092919050505061862b565b828281518110614a0157fe5b6020026020010181905250614a20600182617a3790919063ffffffff16565b90506148f1565b505b8983108015614a39575060008651115b15614c7357600082600081518110614a4d57fe5b602002602001015190506000614a75838381518110614a6857fe5b6020026020010151618b35565b1415614a815750614c73565b848181518110614a8d57fe5b6020026020010151868281518110614aa157fe5b602002602001015111614ad457614ab86000617f91565b828281518110614ac457fe5b6020026020010181905250614c63565b614afb6001868381518110614ae557fe5b6020026020010151617a3790919063ffffffff16565b858281518110614b0757fe5b602002602001018181525050614b27600185617a3790919063ffffffff16565b9350614c4b614b5b614b566001888581518110614b4057fe5b6020026020010151617a3790919063ffffffff16565b61862b565b614c3d6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b390918c8781518110614b8e57fe5b60200260200101516040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015614bfd57600080fd5b505af4158015614c11573d6000803e3d6000fd5b505050506040513d6020811015614c2757600080fd5b810190808051906020019092919050505061862b565b618b4390919063ffffffff16565b828281518110614c5757fe5b60200260200101819052505b614c6d8383618c8c565b50614a29565b8a831015614ce9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420656e6f75676820656c65637465642076616c696461746f727300000081525060200191505060405180910390fd5b606083604051908082528060200260200182016040528015614d1a5781602001602082028038833980820191505090505b5090506000935060008090505b8751811015614f72576060614d3a61793c565b73ffffffffffffffffffffffffffffffffffffffff16638dd31e398a8481518110614d6157fe5b6020026020010151898581518110614d7557fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060006040518083038186803b158015614de457600080fd5b505afa158015614df8573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614e2257600080fd5b8101908080516040519392919084640100000000821115614e4257600080fd5b83820191506020820185811115614e5857600080fd5b8251866020820283011164010000000082111715614e7557600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614eac578082015181840152602081019050614e91565b50505050905001604052505050905060008090505b8151811015614f5557818181518110614ed657fe5b6020026020010151848881518110614eea57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050614f38600188617a3790919063ffffffff16565b9650614f4e600182617a3790919063ffffffff16565b9050614ec1565b5050614f6b600182617a3790919063ffffffff16565b9050614d27565b5080995050505050505050505092915050565b6000600360020160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b6000600360000160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b600061504e600360000160000154600360020160000154617a3790919063ffffffff16565b905090565b600061505e436125ef565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106150d457805182526020820191506020810190506020830392506150b1565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114615134576040519150601f19603f3d011682016040523d82523d6000602084013e615139565b606091505b50809350819250505080615198576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180619fd0602e913960400191505060405180910390fd5b6151a3826000617131565b92505050919050565b6000600360000160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905092915050565b60006001806000828254019250508190555060006001549050600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614156152fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f75702061646472657373207a65726f000000000000000000000000000081525060200191505060405180910390fd5b6000615305617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561538157600080fd5b505afa158015615395573d6000803e3d6000fd5b505050506040513d60208110156153ab57600080fd5b8101908080519060200190929190505050905086600010615434576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b61543e88826151ac565b871115615496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061a2196024913960400191505060405180910390fd5b6154a1888289618c9e565b6154ad88888888618dae565b6154b5617841565b73ffffffffffffffffffffffffffffffffffffffff16636edf77a582896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561553b57600080fd5b505af115801561554f573d6000803e3d6000fd5b50505050600061555f89836125b5565b14156155b2576155b1600360090160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208986619073565b5b8773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f148075455e24d5cf538793db3e917a157cbadac69dd6a304186daf11b23f76fe896040518082815260200191505060405180910390a360019250506001548114615693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561576e57600080fd5b505afa158015615782573d6000803e3d6000fd5b505050506040513d602081101561579857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614615832576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b600061583d856160ed565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab632dedbbf09091878488886040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561593b57600080fd5b505af415801561594f573d6000803e3d6000fd5b505050508473ffffffffffffffffffffffffffffffffffffffff167f8f21dc7ff6f55d73e4fca52a4ef4fcc14fbda43ac338d24922519d51455d39c160405160405180910390a25050505050565b6000600360020160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60606003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab633a72e80290916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015615a8757600080fd5b505af4158015615a9b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015615ac557600080fd5b8101908080516040519392919084640100000000821115615ae557600080fd5b83820191506020820185811115615afb57600080fd5b8251866020820283011164010000000082111715615b1857600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615b4f578082015181840152602081019050615b34565b50505050905001604052505050905090565b60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015615c3257600080fd5b505afa158015615c46573d6000803e3d6000fd5b505050506040513d6020811015615c5c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614615cf6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63281359299091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b158015615d8257600080fd5b505af4158015615d96573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff167f5c8cd4e832f3a7d79f9208c2acf25a412143aa3f751cfd3728c42a0fea4921a860405160405180910390a25050565b615de9614446565b615e5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415615efe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b600f5481565b6000615fac6010604051806020016040529081600082015481525050618b35565b905090565b60006001806000828254019250508190555060006001549050615fd48484617624565b9150600154811461604d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5092915050565b60006160e583600360020160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054619214565b905092915050565b6000616192600360020160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600360000160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154617a3790919063ffffffff16565b9050919050565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b602083106161ff57805182526020820191506020810190506020830392506161dc565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461625f576040519150601f19603f3d011682016040523d82523d6000602084013e616264565b606091505b508093508192505050806162c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061a1f46025913960400191505060405180910390fd5b6162ce826000617131565b9250505090565b6000600180600082825401925050819055506000600154905060006162f8617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561637457600080fd5b505afa158015616388573d6000803e3d6000fd5b505050506040513d602081101561639e57600080fd5b8101908080519060200190929190505050905060006163bd8883616054565b90506163cc8882898989617fea565b935050506001548114616447576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50949350505050565b600061649460036164866002616478600261646a88615063565b617abf90919063ffffffff16565b617a3790919063ffffffff16565b617b5e90919063ffffffff16565b9050919050565b6000806164b9836164ab866160ed565b617a3790919063ffffffff16565b90506000616565616556600d600101546164d161793c565b73ffffffffffffffffffffffffffffffffffffffff1663517f6d336040518163ffffffff1660e01b815260040160206040518083038186803b15801561651657600080fd5b505afa15801561652a573d6000803e3d6000fd5b505050506040513d602081101561654057600080fd5b8101908080519060200190929190505050617b45565b83617abf90919063ffffffff16565b905060006166d4616574617841565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b1580156165b957600080fd5b505afa1580156165cd573d6000803e3d6000fd5b505050506040513d60208110156165e357600080fd5b81019080805190602001909291905050506166c6600161660161793c565b73ffffffffffffffffffffffffffffffffffffffff166339e618e88b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561667d57600080fd5b505afa158015616691573d6000803e3d6000fd5b505050506040513d60208110156166a757600080fd5b8101908080519060200190929190505050617a3790919063ffffffff16565b617abf90919063ffffffff16565b905080821115935050505092915050565b600080600087141580156166fa575060008514155b61676c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b6020831061680657805182526020820191506020810190506020830392506167e3565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114616866576040519150601f19603f3d011682016040523d82523d6000602084013e61686b565b606091505b508092508193505050816168ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061a1cd6027913960400191505060405180910390fd5b6168d5816000617131565b93506168e2816020617131565b925083839550955050505050965096945050505050565b60008061690461793c565b90508073ffffffffffffffffffffffffffffffffffffffff1663c54c1cd4876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561698357600080fd5b505afa158015616997573d6000803e3d6000fd5b505050506040513d60208110156169ad57600080fd5b810190808051906020019092919050505015806169d35750600060036002016000015411155b156169e2576000915050616c2b565b6169ea619f30565b616a44600360020160010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015460036002016000015461932d565b9050616a4e619f30565b616b118373ffffffffffffffffffffffffffffffffffffffff166376f7425d88886040518363ffffffff1660e01b815260040180806020018281038252848482818152602001925060200280828437600081840152601f19601f820116905080830192505050935050505060206040518083038186803b158015616ad157600080fd5b505afa158015616ae5573d6000803e3d6000fd5b505050506040513d6020811015616afb57600080fd5b8101908080519060200190929190505050617f91565b9050616b1b619f30565b616bdb8473ffffffffffffffffffffffffffffffffffffffff1663dba94fcd8b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015616b9b57600080fd5b505afa158015616baf573d6000803e3d6000fd5b505050506040513d6020811015616bc557600080fd5b8101908080519060200190929190505050617f91565b9050616c24616c1f82616c1185616c0388616bf58f61862b565b6186b590919063ffffffff16565b6186b590919063ffffffff16565b6186b590919063ffffffff16565b618b14565b9450505050505b949350505050565b616c3b614446565b616cad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b616cb68161936f565b50565b6000616cc3614446565b616d35576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b82600010616d8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061a2bd602b913960400191505060405180910390fd5b81831115616de7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180619f95603b913960400191505060405180910390fd5b600d6000015483141580616e005750600d600101548214155b616e72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f456c65637461626c652076616c696461746f7273206e6f74206368616e67656481525060200191505060405180910390fd5b604051806040016040528084815260200183815250600d60008201518160000155602082015181600101559050507fb3ae64819ff89f6136eb58b8563cb32c6550f17eaf97f9ecc32f23783229f6de8383604051808381526020018281526020019250505060405180910390a16001905092915050565b600260009054906101000a900460ff1615616f6c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600260006101000a81548160ff021916908315150217905550616f903361936f565b616f9985615de1565b616fa38484616cb9565b50616fad82612609565b50616fb7816132c0565b505050505050565b600d8060000154908060010154905082565b600080600d60000154600d60010154915091509091565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106170595780518252602082019150602081019050602083039250617036565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146170b9576040519150601f19603f3d011682016040523d82523d6000602084013e6170be565b606091505b5080935081925050508061711d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061a260602c913960400191505060405180910390fd5b617128826000617bf0565b92505050919050565b600061713d8383617bf0565b60001c905092915050565b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091866040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156171d457600080fd5b505af41580156171e8573d6000803e3d6000fd5b505050506040513d60208110156171fe57600080fd5b8101908080519060200190929190505050156174075760006172ef846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156172a657600080fd5b505af41580156172ba573d6000803e3d6000fd5b505050506040513d60208110156172d057600080fd5b8101908080519060200190929190505050617a3790919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b1580156173ed57600080fd5b505af4158015617401573d6000803e3d6000fd5b50505050505b61746283600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154617a3790919063ffffffff16565b600360020160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055506174c983600360020160000154617a3790919063ffffffff16565b6003600201600001819055508373ffffffffffffffffffffffffffffffffffffffff167f91ba34d62474c14d6c623cd322f4256666c7a45b7fdaa3378e009d39dfcec2a7846040518082815260200191505060405180910390a250505050565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156175e457600080fd5b505afa1580156175f8573d6000803e3d6000fd5b505050506040513d602081101561760e57600080fd5b8101908080519060200190929190505050905090565b600080600360000160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506176b6615053565b81600101541061772e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f50656e64696e6720766f74652065706f6368206e6f742070617373656400000081525060200191505060405180910390fd5b600081600001549050600081116177ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b6177b8858583618c9e565b60006177c58686846194b3565b90508573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f45aac85f38083b18efe2d441a65b9c1ae177c78307cb5a5d4aec8f7dbcaeabfe8484604051808381526020018281526020019250505060405180910390a36001935050505092915050565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156178fc57600080fd5b505afa158015617910573d6000803e3d6000fd5b505050506040513d602081101561792657600080fd5b8101908080519060200190929190505050905090565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156179f757600080fd5b505afa158015617a0b573d6000803e3d6000fd5b505050506040513d6020811015617a2157600080fd5b8101908080519060200190929190505050905090565b600080828401905083811015617ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600080831415617ad25760009050617b3f565b6000828402905082848281617ae357fe5b0414617b3a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061a1ac6021913960400191505060405180910390fd5b809150505b92915050565b6000818310617b545781617b56565b825b905092915050565b6000617ba083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250619613565b905092915050565b600080828481617bb457fe5b0490506000838581617bc257fe5b061415617bd25780915050617bea565b617be6600182617a3790919063ffffffff16565b9150505b92915050565b6000617c06602083617a3790919063ffffffff16565b83511015617c7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b600060036000019050617cb1828260000154617a3790919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050617d15838260000154617a3790919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050617d79848260000154617a3790919063ffffffff16565b8160000181905550617d89615053565b8160010181905550505050505050565b6000617e74846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015617e2b57600080fd5b505af4158015617e3f573d6000803e3d6000fd5b505050506040513d6020811015617e5557600080fd5b8101908080519060200190929190505050617a3790919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b158015617f7257600080fd5b505af4158015617f86573d6000803e3d6000fd5b505050505050505050565b617f99619f30565b6040518060200160405280838152509050919050565b617fb7619f30565b604051806020016040528069d3c21bcecceda1000000815250905090565b60008160000151836000015110905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561808e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f75702061646472657373207a65726f000000000000000000000000000081525060200191505060405180910390fd5b6000618098617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561811457600080fd5b505afa158015618128573d6000803e3d6000fd5b505050506040513d602081101561813e57600080fd5b81019080805190602001909291905050509050856000106181c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b6181d18782616054565b861115618229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061a0e16023913960400191505060405180910390fd5b60006182368883896196d9565b905061824488888888618dae565b61824c617841565b73ffffffffffffffffffffffffffffffffffffffff16636edf77a583896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156182d257600080fd5b505af11580156182e6573d6000803e3d6000fd5b5050505060006182f689846125b5565b141561834957618348600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208986619073565b5b8773ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fae7458f8697a680da6be36406ea0b8f40164915ac9cc40c0dad05a2ff6e8c6a88984604051808381526020018281526020019250505060405180910390a360019250505095945050505050565b600061840783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061989d565b905092915050565b6000808590506000618421888a6151ac565b905060008111156184c15760006184388383617b45565b9050618445898b83618c9e565b8873ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff167f148075455e24d5cf538793db3e917a157cbadac69dd6a304186daf11b23f76fe836040518082815260200191505060405180910390a36184bd81846183c590919063ffffffff16565b9250505b60006184cd898b616054565b90506000811180156184df5750600083115b156185865760006184f08483617b45565b905060006184ff8b8d846196d9565b90508a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fae7458f8697a680da6be36406ea0b8f40164915ac9cc40c0dad05a2ff6e8c6a88484604051808381526020018281526020019250505060405180910390a361858182866183c590919063ffffffff16565b945050505b600061859b848a6183c590919063ffffffff16565b90506000811115618612576185b28a828a8a618dae565b60006185be8b8d6125b5565b141561861157618610600360090160008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208b88619073565b5b5b809450505050509695505050505050565b600033905090565b618633619f30565b61863b61995d565b821115618693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061a0ab6036913960400191505060405180910390fd5b604051806020016040528069d3c21bcecceda100000084028152509050919050565b6186bd619f30565b6000836000015114806186d4575060008260000151145b156186f057604051806020016040528060008152509050618b0e565b69d3c21bcecceda10000008260000151141561870e57829050618b0e565b69d3c21bcecceda10000008360000151141561872c57819050618b0e565b600069d3c21bcecceda10000006187428561997c565b600001518161874d57fe5b049050600061875b856199b3565b600001519050600069d3c21bcecceda10000006187778661997c565b600001518161878257fe5b0490506000618790866199b3565b600001519050600082850290506000851461882457828582816187af57fe5b0414618823576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600069d3c21bcecceda100000082029050600082146188c65769d3c21bcecceda100000082828161885157fe5b04146188c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6f766572666c6f772078317931202a206669786564312064657465637465640081525060200191505060405180910390fd5b5b809150600084860290506000861461895757848682816188e257fe5b0414618956576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b60008488029050600088146189e5578488828161897057fe5b04146189e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b6189ed6199f0565b87816189f557fe5b049650618a006199f0565b8581618a0857fe5b0494506000858802905060008814618a995785888281618a2457fe5b0414618a98576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b618aa1619f30565b6040518060200160405280878152509050618aca816040518060200160405280878152506199fd565b9050618ae4816040518060200160405280868152506199fd565b9050618afe816040518060200160405280858152506199fd565b9050809a50505050505050505050505b92915050565b600069d3c21bcecceda1000000826000015181618b2d57fe5b049050919050565b600081600001519050919050565b618b4b619f30565b600082600001511415618bc6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f63616e277420646976696465206279203000000000000000000000000000000081525060200191505060405180910390fd5b600069d3c21bcecceda10000008460000151029050836000015169d3c21bcecceda10000008281618bf357fe5b0414618c67576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f766572666c6f7720617420646976696465000000000000000000000000000081525060200191505060405180910390fd5b604051806020016040528084600001518381618c7f57fe5b0481525091505092915050565b618c9a828260008551619aa6565b5050565b600060036000019050618cbe8282600001546183c590919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050618d228382600001546183c590919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050618d868482600001546183c590919063ffffffff16565b8160000181905550600081600001541415618da657600081600101819055505b505050505050565b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091866040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015618e3a57600080fd5b505af4158015618e4e573d6000803e3d6000fd5b505050506040513d6020811015618e6457600080fd5b81019080805190602001909291905050501561906d576000618f55846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015618f0c57600080fd5b505af4158015618f20573d6000803e3d6000fd5b505050506040513d6020811015618f3657600080fd5b81019080805190602001909291905050506183c590919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561905357600080fd5b505af4158015619067573d6000803e3d6000fd5b50505050505b50505050565b8280549050811080156190e757508173ffffffffffffffffffffffffffffffffffffffff168382815481106190a457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b619159576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f42616420696e646578000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000619173600185805490506183c590919063ffffffff16565b905083818154811061918157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168483815481106191b857fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080848161920d9190619f43565b5050505050565b600080600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141561926f5760009050619327565b619324600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154619316600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015485617abf90919063ffffffff16565b617b5e90919063ffffffff16565b90505b92915050565b619335619f30565b61933d619f30565b6193468461862b565b9050619350619f30565b6193598461862b565b90506193658282618b43565b9250505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156193f5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180619ffe6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600360020190506194d4838260000154617a3790919063ffffffff16565b816000018190555060006194e88685619dbb565b905060008260010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050619546858260000154617a3790919063ffffffff16565b8160000181905550619565828260010154617a3790919063ffffffff16565b81600101819055506195c1828260020160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054617a3790919063ffffffff16565b8160020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508193505050509392505050565b600080831182906196bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015619684578082015181840152602081019050619669565b50505050905090810190601f1680156196b15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816196cb57fe5b049050809150509392505050565b600080600360020190506196fa8382600001546183c590919063ffffffff16565b8160000181905550600080905060006197138787616054565b905060008360010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050858214156197ab578060020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205492506197b8565b6197b58887619dbb565b92505b6197cf8682600001546183c590919063ffffffff16565b81600001819055506197ee8382600101546183c590919063ffffffff16565b816001018190555061984a838260020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546183c590919063ffffffff16565b8160020160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550829450505050509392505050565b600083831115829061994a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561990f5780820151818401526020810190506198f4565b50505050905090810190601f16801561993c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60007601357c299a88ea76a58924d52ce4f26a85af186c2b9e74905090565b619984619f30565b604051806020016040528069d3c21bcecceda1000000808560000151816199a757fe5b04028152509050919050565b6199bb619f30565b604051806020016040528069d3c21bcecceda1000000808560000151816199de57fe5b04028460000151038152509050919050565b600064e8d4a51000905090565b619a05619f30565b6000826000015184600001510190508360000151811015619a8e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f616464206f766572666c6f77206465746563746564000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808281525091505092915050565b8251845114619b00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061a23d6023913960400191505060405180910390fd5b83518210619b76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f6865617020737461727420696e646578206f7574206f662072616e676500000081525060200191505060405180910390fd5b8351811115619bed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f68656170206c656e677468206f7574206f662072616e6765000000000000000081525060200191505060405180910390fd5b60008290505b600115619db4576000619c236001619c15600285617abf90919063ffffffff16565b617a3790919063ffffffff16565b90506000619c4e6002619c40600286617abf90919063ffffffff16565b617a3790919063ffffffff16565b905060008390508483108015619cbf5750619cbe87898381518110619c6f57fe5b602002602001015181518110619c8157fe5b6020026020010151888a8681518110619c9657fe5b602002602001015181518110619ca857fe5b6020026020010151619eee90919063ffffffff16565b5b15619cc8578290505b8482108015619d325750619d3187898381518110619ce257fe5b602002602001015181518110619cf457fe5b6020026020010151888a8581518110619d0957fe5b602002602001015181518110619d1b57fe5b6020026020010151619eee90919063ffffffff16565b5b15619d3b578190505b83811415619d4b57505050619db4565b6000888581518110619d5957fe5b60200260200101519050888281518110619d6f57fe5b6020026020010151898681518110619d8357fe5b60200260200101818152505080898381518110619d9c57fe5b60200260200101818152505081945050505050619bf3565b5050505050565b600080600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541415619e3057619e2968056bc75e2d6310000083617abf90919063ffffffff16565b9050619ee8565b619ee5600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154619ed7600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015485617abf90919063ffffffff16565b617b5e90919063ffffffff16565b90505b92915050565b60008160000151836000015111905092915050565b604051806040016040528060608152602001600081525090565b6040518060200160405280600081525090565b6040518060200160405280600081525090565b815481835581811115619f6a57818360005260206000209182019101619f699190619f6f565b5b505050565b619f9191905b80821115619f8d576000816000905550600101619f75565b5090565b9056fe4d6178696d756d20656c65637461626c652076616c696461746f72732063616e6e6f7420626520736d616c6c6572207468616e206d696e696d756d6572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e707574206c656e67746873206d75737420626520636f72726573706f6e642e456c6563746162696c697479207468726573686f6c64206d757374206265206c6f776572207468616e20313030256572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6563616e277420637265617465206669786964697479206e756d626572206c6172676572207468616e206d61784e657746697865642829566f74652076616c7565206c6172676572207468616e2061637469766520766f7465736572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c656572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c65566f74652076616c7565206c6172676572207468616e2070656e64696e6720766f7465736b657920616e642076616c7565206172726179206c656e677468206d69736d617463686572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c654d696e696d756d20656c65637461626c652076616c696461746f72732063616e6e6f74206265207a65726f44656372656d656e742076616c7565206d7573742062652067726561746572207468616e20302e6572726f722063616c6c696e67206861736848656164657220707265636f6d70696c65a265627a7a72315820977f5c762e9522175d246d3ebe62c7b03a5821c600045e3f64d91de56c9f6bd964736f6c634300050d00320000000000000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106103d05760003560e01c80638ef01def116101ff578063bdd143181161011a578063ec683072116100ad578063f92ad2191161007c578063f92ad21914611c84578063f9d7daae14611cf0578063f9f41a7a14611d15578063fae8db0a14611d3a576103d0565b8063ec68307214611abe578063f23263f914611b39578063f2fde38b14611bf0578063f911f0b714611c34576103d0565b8063df4da461116100e9578063df4da46114611952578063e0a2ab5214611970578063e50e652d14611a16578063e59ea3e814611a58576103d0565b8063bdd14318146117e8578063c14470c414611806578063d3e242a414611882578063dedafeae146118fa576103d0565b80639b95975f11610192578063a5826ab211610161578063a5826ab2146116e3578063a8e4587114611742578063a91ee0dc14611786578063ac839d69146117ca576103d0565b80639b95975f146114bf5780639dfb608114611537578063a18fb2db146115e7578063a2fb4ddf1461166b576103d0565b806395128ce3116101ce57806395128ce3146113e95780639a0e7d66146114415780639a7b3be71461145f5780639b2b592f1461147d576103d0565b80638ef01def146111815780638f32d59b146112e257806390a4dd5c14611304578063926d00ca14611391576103d0565b806354255be0116102ef5780637046c96b1161028257806387ee8a0f1161025157806387ee8a0f14610fee5780638a8836261461100c5780638c666775146110db5780638da5cb5b14611137576103d0565b80637046c96b14610ed5578063715018a614610f7c5780637385e5da14610f865780637b10399914610fa4576103d0565b8063631db7e7116102be578063631db7e714610cb857806367960e9114610cfe5780636c781a2c14610dcd5780636e19847514610e25576103d0565b806354255be014610b0f578063580d747a14610b425780635bb5acfb14610be85780635d180adb14610c40576103d0565b80632c3b791611610367578063448144c811610336578063448144c81461092a578063457578a3146109895780634b2c2f4414610a225780634be8843b14610af1576103d0565b80632c3b7916146107d2578063386172721461082a5780633b1eb4bf146108a25780633c55a73c146108e4576103d0565b80631f604243116103a35780631f6042431461054f57806323f0ab651461056d578063263ecf74146106f75780632ba38e6914610773576103d0565b8063123633ea146103d557806312541a6b14610443578063158ef93e146104d15780631c5a9d9c146104f3575b600080fd5b610401600480360360208110156103eb57600080fd5b8101908080359060200190929190505050611d7c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cf6004803603608081101561045957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ecd565b005b6104d9611f81565b604051808215151515815260200191505060405180910390f35b6105356004803603602081101561050957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f94565b604051808215151515815260200191505060405180910390f35b6105576120fa565b6040518082815260200191505060405180910390f35b6106dd6004803603606081101561058357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156105c057600080fd5b8201836020820111156105d257600080fd5b803590602001918460018302840111640100000000831117156105f457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561065757600080fd5b82018360208201111561066957600080fd5b8035906020019184600183028401116401000000008311171561068b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061210a565b604051808215151515815260200191505060405180910390f35b6107596004803603604081101561070d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506122c3565b604051808215151515815260200191505060405180910390f35b61077b612374565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107be5780820151818401526020810190506107a3565b505050509050019250505060405180910390f35b610814600480360360208110156107e857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061238f565b6040518082815260200191505060405180910390f35b61088c6004803603604081101561084057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125b5565b6040518082815260200191505060405180910390f35b6108ce600480360360208110156108b857600080fd5b81019080803590602001909291905050506125ef565b6040518082815260200191505060405180910390f35b610910600480360360208110156108fa57600080fd5b8101908080359060200190929190505050612609565b604051808215151515815260200191505060405180910390f35b610932612744565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561097557808201518184015260208101905061095a565b505050509050019250505060405180910390f35b6109cb6004803603602081101561099f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612807565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a0e5780820151818401526020810190506109f3565b505050509050019250505060405180910390f35b610adb60048036036020811015610a3857600080fd5b8101908080359060200190640100000000811115610a5557600080fd5b820183602082011115610a6757600080fd5b80359060200191846001830284011164010000000083111715610a8957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506128d7565b6040518082815260200191505060405180910390f35b610af9612a6b565b6040518082815260200191505060405180910390f35b610b17612a77565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610bce60048036036080811015610b5857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612a9e565b604051808215151515815260200191505060405180910390f35b610c2a60048036036020811015610bfe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061311c565b6040518082815260200191505060405180910390f35b610c7660048036036040811015610c5657600080fd5b81019080803590602001909291908035906020019092919050505061316e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ce460048036036020811015610cce57600080fd5b81019080803590602001909291905050506132c0565b604051808215151515815260200191505060405180910390f35b610db760048036036020811015610d1457600080fd5b8101908080359060200190640100000000811115610d3157600080fd5b820183602082011115610d4357600080fd5b80359060200191846001830284011164010000000083111715610d6557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613419565b6040518082815260200191505060405180910390f35b610e0f60048036036020811015610de357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135ad565b6040518082815260200191505060405180910390f35b610ebb600480360360a0811015610e3b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506136e5565b604051808215151515815260200191505060405180910390f35b610edd61378e565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610f24578082015181840152602081019050610f09565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610f66578082015181840152602081019050610f4b565b5050505090500194505050505060405180910390f35b610f84613959565b005b610f8e613a92565b6040518082815260200191505060405180910390f35b610fac613aa2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ff6613ac8565b6040518082815260200191505060405180910390f35b6110c56004803603602081101561102257600080fd5b810190808035906020019064010000000081111561103f57600080fd5b82018360208201111561105157600080fd5b8035906020019184600183028401116401000000008311171561107357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613c0f565b6040518082815260200191505060405180910390f35b61111d600480360360208110156110f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613da3565b604051808215151515815260200191505060405180910390f35b61113f613e73565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6112cc600480360360a081101561119757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156111de57600080fd5b8201836020820111156111f057600080fd5b8035906020019184602083028401116401000000008311171561121257600080fd5b90919293919293908035906020019064010000000081111561123357600080fd5b82018360208201111561124557600080fd5b8035906020019184602083028401116401000000008311171561126757600080fd5b90919293919293908035906020019064010000000081111561128857600080fd5b82018360208201111561129a57600080fd5b803590602001918460208302840111640100000000831117156112bc57600080fd5b9091929391929390505050613e9c565b6040518082815260200191505060405180910390f35b6112ea614446565b604051808215151515815260200191505060405180910390f35b61133a6004803603604081101561131a57600080fd5b8101908080359060200190929190803590602001909291905050506144a4565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561137d578082015181840152602081019050611362565b505050509050019250505060405180910390f35b6113d3600480360360208110156113a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614f85565b6040518082815260200191505060405180910390f35b61142b600480360360208110156113ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614fd7565b6040518082815260200191505060405180910390f35b611449615029565b6040518082815260200191505060405180910390f35b611467615053565b6040518082815260200191505060405180910390f35b6114a96004803603602081101561149357600080fd5b8101908080359060200190929190505050615063565b6040518082815260200191505060405180910390f35b611521600480360360408110156114d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506151ac565b6040518082815260200191505060405180910390f35b6115cd600480360360a081101561154d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061523f565b604051808215151515815260200191505060405180910390f35b611669600480360360608110156115fd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061569d565b005b6116cd6004803603604081101561168157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061599d565b6040518082815260200191505060405180910390f35b6116eb615a2d565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561172e578082015181840152602081019050611713565b505050509050019250505060405180910390f35b6117846004803603602081101561175857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615b61565b005b6117c86004803603602081101561179c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615de1565b005b6117d2615f85565b6040518082815260200191505060405180910390f35b6117f0615f8b565b6040518082815260200191505060405180910390f35b6118686004803603604081101561181c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615fb1565b604051808215151515815260200191505060405180910390f35b6118e46004803603604081101561189857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050616054565b6040518082815260200191505060405180910390f35b61193c6004803603602081101561191057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506160ed565b6040518082815260200191505060405180910390f35b61195a616199565b6040518082815260200191505060405180910390f35b6119fc6004803603608081101561198657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506162d5565b604051808215151515815260200191505060405180910390f35b611a4260048036036020811015611a2c57600080fd5b8101908080359060200190929190505050616450565b6040518082815260200191505060405180910390f35b611aa460048036036040811015611a6e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061649b565b604051808215151515815260200191505060405180910390f35b611b1c600480360360c0811015611ad457600080fd5b810190808035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506166e5565b604051808381526020018281526020019250505060405180910390f35b611bda60048036036060811015611b4f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115611b9657600080fd5b820183602082011115611ba857600080fd5b80359060200191846020830284011164010000000083111715611bca57600080fd5b90919293919293905050506168f9565b6040518082815260200191505060405180910390f35b611c3260048036036020811015611c0657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050616c33565b005b611c6a60048036036040811015611c4a57600080fd5b810190808035906020019092919080359060200190929190505050616cb9565b604051808215151515815260200191505060405180910390f35b611cee600480360360a0811015611c9a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050616ee9565b005b611cf8616fbf565b604051808381526020018281526020019250505060405180910390f35b611d1d616fd1565b604051808381526020018281526020019250505060405180910390f35b611d6660048036036020811015611d5057600080fd5b8101908080359060200190929190505050616fe8565b6040518082815260200191505060405180910390f35b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611df55780518252602082019150602081019050602083039250611dd2565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611e55576040519150601f19603f3d011682016040523d82523d6000602084013e611e5a565b606091505b50809350819250505080611eb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061a104603d913960400191505060405180910390fd5b611ec4826000617131565b92505050919050565b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c7920564d2063616e2063616c6c0000000000000000000000000000000081525060200191505060405180910390fd5b611f7b84848484617148565b50505050565b600260009054906101000a900460ff1681565b600060018060008282540192505081905550600060015490506000611fb7617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561203357600080fd5b505afa158015612047573d6000803e3d6000fd5b505050506040513d602081101561205d57600080fd5b8101908080519060200190929190505050905061207a8482617624565b92505060015481146120f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50919050565b6000600360020160000154905090565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b602083106121935780518252602082019150602081019050602083039250612170565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b602083106121e457805182526020820191506020810190506020830392506121c1565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b6020831061224d578051825260208201915060208101905060208303925061222a565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146122ad576040519150601f19603f3d011682016040523d82523d6000602084013e6122b2565b606091505b505080915050809150509392505050565b600080600360000160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050612355615053565b816001015410801561236b575060008160000154115b91505092915050565b606061238a600d60000154600d600101546144a4565b905090565b6000806124fd61239d617841565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b1580156123e257600080fd5b505afa1580156123f6573d6000803e3d6000fd5b505050506040513d602081101561240c57600080fd5b81019080805190602001909291905050506124ef600161242a61793c565b73ffffffffffffffffffffffffffffffffffffffff166339e618e8886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156124a657600080fd5b505afa1580156124ba573d6000803e3d6000fd5b505050506040513d60208110156124d057600080fd5b8101908080519060200190929190505050617a3790919063ffffffff16565b617abf90919063ffffffff16565b90506000612597600d6001015461251261793c565b73ffffffffffffffffffffffffffffffffffffffff1663517f6d336040518163ffffffff1660e01b815260040160206040518083038186803b15801561255757600080fd5b505afa15801561256b573d6000803e3d6000fd5b505050506040513d602081101561258157600080fd5b8101908080519060200190929190505050617b45565b90506125ac8183617b5e90919063ffffffff16565b92505050919050565b6000806125c284846151ac565b905060006125d08585616054565b90506125e58183617a3790919063ffffffff16565b9250505092915050565b6000612602826125fd616199565b617ba8565b9050919050565b6000612613614446565b612685576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600f548214156126fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4d61782067726f75707320766f74656420666f72206e6f74206368616e67656481525060200191505060405180910390fd5b81600f819055507f1993a3864c31265ef86eec51d147eff697dee0466c92ac9abddcc4c4c6829348826040518082815260200191505060405180910390a160019050919050565b60606000612750613ac8565b90506060816040519080825280602002602001820160405280156127835781602001602082028038833980820191505090505b50905060008090505b828110156127fe5761279d81611d7c565b8282815181106127a957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506127f7600182617a3790919063ffffffff16565b905061278c565b50809250505090565b6060600360090160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156128cb57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612881575b50505050509050919050565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061292c5780518252602082019150602081019050602083039250612909565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106129935780518252602082019150602081019050602083039250612970565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146129f3576040519150601f19603f3d011682016040523d82523d6000602084013e6129f8565b606091505b50809350819250505080612a57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018061a0736038913960400191505060405180910390fd5b612a62826000617bf0565b92505050919050565b60108060000154905081565b60008060008060018060026001839350829250819150809050935093509350935090919293565b600060018060008282540192505081905550600060015490506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091886040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612b4357600080fd5b505af4158015612b57573d6000803e3d6000fd5b505050506040513d6020811015612b6d57600080fd5b8101908080519060200190929190505050612bf0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f7570206e6f7420656c696769626c65000000000000000000000000000081525060200191505060405180910390fd5b84600010612c66576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b612c70868661649b565b612ce2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f47726f75702063616e6e6f74207265636569766520766f74657300000000000081525060200191505060405180910390fd5b6000612cec617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d6857600080fd5b505afa158015612d7c573d6000803e3d6000fd5b505050506040513d6020811015612d9257600080fd5b8101908080519060200190929190505050905060008090506000600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008090505b8180549050811015612e8c578280612e6f57508973ffffffffffffffffffffffffffffffffffffffff16828281548110612e2c57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b9250612e85600182617a3790919063ffffffff16565b9050612df6565b5081612f7357600f54818054905010612f0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74656420666f7220746f6f206d616e792067726f7570730000000000000081525060200191505060405180910390fd5b808990806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b612f7e89848a617c91565b612f8a89898989617d99565b612f92617841565b73ffffffffffffffffffffffffffffffffffffffff166318a4ff8c848a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561301857600080fd5b505af115801561302c573d6000803e3d6000fd5b505050508873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fd3532f70444893db82221041edb4dc26c94593aeb364b0b14dfc77d5ee9051528a6040518082815260200191505060405180910390a3600194505050506001548114613113576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50949350505050565b6000600360020160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106131e757805182526020820191506020810190506020830392506131c4565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613247576040519150601f19603f3d011682016040523d82523d6000602084013e61324c565b606091505b508093508192505050806132ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061a1766036913960400191505060405180910390fd5b6132b6826000617131565b9250505092915050565b60006132ca614446565b61333c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61334582617f91565b60106000820151816000015590505061338461335f617faf565b6010604051806020016040529081600082015481525050617fd590919063ffffffff16565b6133d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061a045602e913960400191505060405180910390fd5b7f9854be03126e38f9c318d8aabe1b150d09cb3a57059b21855b1e11d44e082c1a826040518082815260200191505060405180910390a160019050919050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061346e578051825260208201915060208101905060208303925061344b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106134d557805182526020820191506020810190506020830392506134b2565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613535576040519150601f19603f3d011682016040523d82523d6000602084013e61353a565b606091505b50809350819250505080613599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061a30f6023913960400191505060405180910390fd5b6135a4826000617bf0565b92505050919050565b600080600090506060600360090160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561367857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161362e575b5050505050905060008090505b81518110156136da576136bd6136ae8383815181106136a057fe5b6020026020010151876125b5565b84617a3790919063ffffffff16565b92506136d3600182617a3790919063ffffffff16565b9050613685565b508192505050919050565b6000600180600082825401925050819055506000600154905061370b8787878787617fea565b91506001548114613784576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b6060806003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6369b317e390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b1580156137e957600080fd5b505af41580156137fd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250604081101561382757600080fd5b810190808051604051939291908464010000000082111561384757600080fd5b8382019150602082018581111561385d57600080fd5b825186602082028301116401000000008211171561387a57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156138b1578082015181840152602081019050613896565b50505050905001604052602001805160405193929190846401000000008211156138da57600080fd5b838201915060208201858111156138f057600080fd5b825186602082028301116401000000008211171561390d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613944578082015181840152602081019050613929565b50505050905001604052505050915091509091565b613961614446565b6139d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000613a9d43616450565b905090565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310613b395780518252602082019150602081019050602083039250613b16565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613b99576040519150601f19603f3d011682016040523d82523d6000602084013e613b9e565b606091505b50809350819250505080613bfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061a1416035913960400191505060405180910390fd5b613c08826000617131565b9250505090565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310613c645780518252602082019150602081019050602083039250613c41565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310613ccb5780518252602082019150602081019050602083039250613ca8565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613d2b576040519150601f19603f3d011682016040523d82523d6000602084013e613d30565b606091505b50809350819250505080613d8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603181526020018061a28c6031913960400191505060405180910390fd5b613d9a826000617131565b92505050919050565b60006003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613e3157600080fd5b505af4158015613e45573d6000803e3d6000fd5b505050506040513d6020811015613e5b57600080fd5b81019080805190602001909291905050509050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600180600082825401925050819055506000600154905060405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015613f8657600080fd5b505afa158015613f9a573d6000803e3d6000fd5b505050506040513d6020811015613fb057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461404a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b60008a116140a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061a2e86027913960400191505060405180910390fd5b6140ab619f03565b6040518060400160405280600360090160008f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561417857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161412e575b505050505081526020018c81525090508060000151518a8a9050111580156141a55750878790508a8a9050145b80156141b657508585905088889050145b61420b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061a0246021913960400191505060405180910390fd5b600081600001515190505b60008111156143425761430c6142f98e846000015161423f6001866183c590919063ffffffff16565b8151811061424957fe5b602002602001015185602001518f8f61426c6001896183c590919063ffffffff16565b81811061427557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168e8e6142a860018a6183c590919063ffffffff16565b8181106142b157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168d8d6142e460018b6183c590919063ffffffff16565b8181106142ed57fe5b9050602002013561840f565b83602001516183c590919063ffffffff16565b82602001818152505060008260200151141561432757614342565b61433b6001826183c590919063ffffffff16565b9050614216565b5060008160200151146143bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4661696c75726520746f2064656372656d656e7420616c6c20766f7465732e0081525060200191505060405180910390fd5b8a935050506001548114614439576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5098975050505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16614488618623565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606060006144e86144e36144be6144b9615029565b61862b565b60106040518060200160405290816000820154815250506186b590919063ffffffff16565b618b14565b905060006003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6342b6351a909184876040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561455457600080fd5b505af4158015614568573d6000803e3d6000fd5b505050506040513d602081101561457e57600080fd5b8101908080519060200190929190505050905060606003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63dcb2a4dd9091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b1580156145f357600080fd5b505af4158015614607573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561463157600080fd5b810190808051604051939291908464010000000082111561465157600080fd5b8382019150602082018581111561466757600080fd5b825186602082028301116401000000008211171561468457600080fd5b8083526020830192505050908051906020019060200280838360005b838110156146bb5780820151818401526020810190506146a0565b50505050905001604052505050905060606146d461793c565b73ffffffffffffffffffffffffffffffffffffffff166370447754836040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015614742578082015181840152602081019050614727565b505050509050019250505060006040518083038186803b15801561476557600080fd5b505afa158015614779573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156147a357600080fd5b81019080805160405193929190846401000000008211156147c357600080fd5b838201915060208201858111156147d957600080fd5b82518660208202830111640100000000821117156147f657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561482d578082015181840152602081019050614812565b5050505090500160405250505090506060825160405190808252806020026020018201604052801561486e5781602001602082028038833980820191505090505b5090506000809050606084516040519080825280602002602001820160405280156148a85781602001602082028038833980820191505090505b509050606085516040519080825280602002602001820160405280156148e857816020015b6148d5619f1d565b8152602001906001900390816148cd5790505b50905060008090505b8651811015614a27578083828151811061490757fe5b6020026020010181815250506149f56003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b390918a858151811061494657fe5b60200260200101516040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156149b557600080fd5b505af41580156149c9573d6000803e3d6000fd5b505050506040513d60208110156149df57600080fd5b810190808051906020019092919050505061862b565b828281518110614a0157fe5b6020026020010181905250614a20600182617a3790919063ffffffff16565b90506148f1565b505b8983108015614a39575060008651115b15614c7357600082600081518110614a4d57fe5b602002602001015190506000614a75838381518110614a6857fe5b6020026020010151618b35565b1415614a815750614c73565b848181518110614a8d57fe5b6020026020010151868281518110614aa157fe5b602002602001015111614ad457614ab86000617f91565b828281518110614ac457fe5b6020026020010181905250614c63565b614afb6001868381518110614ae557fe5b6020026020010151617a3790919063ffffffff16565b858281518110614b0757fe5b602002602001018181525050614b27600185617a3790919063ffffffff16565b9350614c4b614b5b614b566001888581518110614b4057fe5b6020026020010151617a3790919063ffffffff16565b61862b565b614c3d6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b390918c8781518110614b8e57fe5b60200260200101516040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015614bfd57600080fd5b505af4158015614c11573d6000803e3d6000fd5b505050506040513d6020811015614c2757600080fd5b810190808051906020019092919050505061862b565b618b4390919063ffffffff16565b828281518110614c5757fe5b60200260200101819052505b614c6d8383618c8c565b50614a29565b8a831015614ce9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6f7420656e6f75676820656c65637465642076616c696461746f727300000081525060200191505060405180910390fd5b606083604051908082528060200260200182016040528015614d1a5781602001602082028038833980820191505090505b5090506000935060008090505b8751811015614f72576060614d3a61793c565b73ffffffffffffffffffffffffffffffffffffffff16638dd31e398a8481518110614d6157fe5b6020026020010151898581518110614d7557fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060006040518083038186803b158015614de457600080fd5b505afa158015614df8573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614e2257600080fd5b8101908080516040519392919084640100000000821115614e4257600080fd5b83820191506020820185811115614e5857600080fd5b8251866020820283011164010000000082111715614e7557600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614eac578082015181840152602081019050614e91565b50505050905001604052505050905060008090505b8151811015614f5557818181518110614ed657fe5b6020026020010151848881518110614eea57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050614f38600188617a3790919063ffffffff16565b9650614f4e600182617a3790919063ffffffff16565b9050614ec1565b5050614f6b600182617a3790919063ffffffff16565b9050614d27565b5080995050505050505050505092915050565b6000600360020160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b6000600360000160010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b600061504e600360000160000154600360020160000154617a3790919063ffffffff16565b905090565b600061505e436125ef565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106150d457805182526020820191506020810190506020830392506150b1565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114615134576040519150601f19603f3d011682016040523d82523d6000602084013e615139565b606091505b50809350819250505080615198576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180619fd0602e913960400191505060405180910390fd5b6151a3826000617131565b92505050919050565b6000600360000160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905092915050565b60006001806000828254019250508190555060006001549050600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614156152fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f75702061646472657373207a65726f000000000000000000000000000081525060200191505060405180910390fd5b6000615305617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561538157600080fd5b505afa158015615395573d6000803e3d6000fd5b505050506040513d60208110156153ab57600080fd5b8101908080519060200190929190505050905086600010615434576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b61543e88826151ac565b871115615496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061a2196024913960400191505060405180910390fd5b6154a1888289618c9e565b6154ad88888888618dae565b6154b5617841565b73ffffffffffffffffffffffffffffffffffffffff16636edf77a582896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561553b57600080fd5b505af115801561554f573d6000803e3d6000fd5b50505050600061555f89836125b5565b14156155b2576155b1600360090160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208986619073565b5b8773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f148075455e24d5cf538793db3e917a157cbadac69dd6a304186daf11b23f76fe896040518082815260200191505060405180910390a360019250506001548114615693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561576e57600080fd5b505afa158015615782573d6000803e3d6000fd5b505050506040513d602081101561579857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614615832576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b600061583d856160ed565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab632dedbbf09091878488886040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561593b57600080fd5b505af415801561594f573d6000803e3d6000fd5b505050508473ffffffffffffffffffffffffffffffffffffffff167f8f21dc7ff6f55d73e4fca52a4ef4fcc14fbda43ac338d24922519d51455d39c160405160405180910390a25050505050565b6000600360020160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60606003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab633a72e80290916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015615a8757600080fd5b505af4158015615a9b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015615ac557600080fd5b8101908080516040519392919084640100000000821115615ae557600080fd5b83820191506020820185811115615afb57600080fd5b8251866020820283011164010000000082111715615b1857600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615b4f578082015181840152602081019050615b34565b50505050905001604052505050905090565b60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015615c3257600080fd5b505afa158015615c46573d6000803e3d6000fd5b505050506040513d6020811015615c5c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614615cf6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63281359299091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b158015615d8257600080fd5b505af4158015615d96573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff167f5c8cd4e832f3a7d79f9208c2acf25a412143aa3f751cfd3728c42a0fea4921a860405160405180910390a25050565b615de9614446565b615e5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415615efe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b600f5481565b6000615fac6010604051806020016040529081600082015481525050618b35565b905090565b60006001806000828254019250508190555060006001549050615fd48484617624565b9150600154811461604d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5092915050565b60006160e583600360020160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054619214565b905092915050565b6000616192600360020160010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600360000160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154617a3790919063ffffffff16565b9050919050565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b602083106161ff57805182526020820191506020810190506020830392506161dc565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461625f576040519150601f19603f3d011682016040523d82523d6000602084013e616264565b606091505b508093508192505050806162c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061a1f46025913960400191505060405180910390fd5b6162ce826000617131565b9250505090565b6000600180600082825401925050819055506000600154905060006162f8617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561637457600080fd5b505afa158015616388573d6000803e3d6000fd5b505050506040513d602081101561639e57600080fd5b8101908080519060200190929190505050905060006163bd8883616054565b90506163cc8882898989617fea565b935050506001548114616447576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50949350505050565b600061649460036164866002616478600261646a88615063565b617abf90919063ffffffff16565b617a3790919063ffffffff16565b617b5e90919063ffffffff16565b9050919050565b6000806164b9836164ab866160ed565b617a3790919063ffffffff16565b90506000616565616556600d600101546164d161793c565b73ffffffffffffffffffffffffffffffffffffffff1663517f6d336040518163ffffffff1660e01b815260040160206040518083038186803b15801561651657600080fd5b505afa15801561652a573d6000803e3d6000fd5b505050506040513d602081101561654057600080fd5b8101908080519060200190929190505050617b45565b83617abf90919063ffffffff16565b905060006166d4616574617841565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b1580156165b957600080fd5b505afa1580156165cd573d6000803e3d6000fd5b505050506040513d60208110156165e357600080fd5b81019080805190602001909291905050506166c6600161660161793c565b73ffffffffffffffffffffffffffffffffffffffff166339e618e88b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561667d57600080fd5b505afa158015616691573d6000803e3d6000fd5b505050506040513d60208110156166a757600080fd5b8101908080519060200190929190505050617a3790919063ffffffff16565b617abf90919063ffffffff16565b905080821115935050505092915050565b600080600087141580156166fa575060008514155b61676c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b6020831061680657805182526020820191506020810190506020830392506167e3565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114616866576040519150601f19603f3d011682016040523d82523d6000602084013e61686b565b606091505b508092508193505050816168ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061a1cd6027913960400191505060405180910390fd5b6168d5816000617131565b93506168e2816020617131565b925083839550955050505050965096945050505050565b60008061690461793c565b90508073ffffffffffffffffffffffffffffffffffffffff1663c54c1cd4876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561698357600080fd5b505afa158015616997573d6000803e3d6000fd5b505050506040513d60208110156169ad57600080fd5b810190808051906020019092919050505015806169d35750600060036002016000015411155b156169e2576000915050616c2b565b6169ea619f30565b616a44600360020160010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015460036002016000015461932d565b9050616a4e619f30565b616b118373ffffffffffffffffffffffffffffffffffffffff166376f7425d88886040518363ffffffff1660e01b815260040180806020018281038252848482818152602001925060200280828437600081840152601f19601f820116905080830192505050935050505060206040518083038186803b158015616ad157600080fd5b505afa158015616ae5573d6000803e3d6000fd5b505050506040513d6020811015616afb57600080fd5b8101908080519060200190929190505050617f91565b9050616b1b619f30565b616bdb8473ffffffffffffffffffffffffffffffffffffffff1663dba94fcd8b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015616b9b57600080fd5b505afa158015616baf573d6000803e3d6000fd5b505050506040513d6020811015616bc557600080fd5b8101908080519060200190929190505050617f91565b9050616c24616c1f82616c1185616c0388616bf58f61862b565b6186b590919063ffffffff16565b6186b590919063ffffffff16565b6186b590919063ffffffff16565b618b14565b9450505050505b949350505050565b616c3b614446565b616cad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b616cb68161936f565b50565b6000616cc3614446565b616d35576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b82600010616d8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061a2bd602b913960400191505060405180910390fd5b81831115616de7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180619f95603b913960400191505060405180910390fd5b600d6000015483141580616e005750600d600101548214155b616e72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f456c65637461626c652076616c696461746f7273206e6f74206368616e67656481525060200191505060405180910390fd5b604051806040016040528084815260200183815250600d60008201518160000155602082015181600101559050507fb3ae64819ff89f6136eb58b8563cb32c6550f17eaf97f9ecc32f23783229f6de8383604051808381526020018281526020019250505060405180910390a16001905092915050565b600260009054906101000a900460ff1615616f6c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600260006101000a81548160ff021916908315150217905550616f903361936f565b616f9985615de1565b616fa38484616cb9565b50616fad82612609565b50616fb7816132c0565b505050505050565b600d8060000154908060010154905082565b600080600d60000154600d60010154915091509091565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106170595780518252602082019150602081019050602083039250617036565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146170b9576040519150601f19603f3d011682016040523d82523d6000602084013e6170be565b606091505b5080935081925050508061711d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061a260602c913960400191505060405180910390fd5b617128826000617bf0565b92505050919050565b600061713d8383617bf0565b60001c905092915050565b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091866040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156171d457600080fd5b505af41580156171e8573d6000803e3d6000fd5b505050506040513d60208110156171fe57600080fd5b8101908080519060200190929190505050156174075760006172ef846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156172a657600080fd5b505af41580156172ba573d6000803e3d6000fd5b505050506040513d60208110156172d057600080fd5b8101908080519060200190929190505050617a3790919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b1580156173ed57600080fd5b505af4158015617401573d6000803e3d6000fd5b50505050505b61746283600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154617a3790919063ffffffff16565b600360020160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055506174c983600360020160000154617a3790919063ffffffff16565b6003600201600001819055508373ffffffffffffffffffffffffffffffffffffffff167f91ba34d62474c14d6c623cd322f4256666c7a45b7fdaa3378e009d39dfcec2a7846040518082815260200191505060405180910390a250505050565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156175e457600080fd5b505afa1580156175f8573d6000803e3d6000fd5b505050506040513d602081101561760e57600080fd5b8101908080519060200190929190505050905090565b600080600360000160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506176b6615053565b81600101541061772e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f50656e64696e6720766f74652065706f6368206e6f742070617373656400000081525060200191505060405180910390fd5b600081600001549050600081116177ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b6177b8858583618c9e565b60006177c58686846194b3565b90508573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f45aac85f38083b18efe2d441a65b9c1ae177c78307cb5a5d4aec8f7dbcaeabfe8484604051808381526020018281526020019250505060405180910390a36001935050505092915050565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156178fc57600080fd5b505afa158015617910573d6000803e3d6000fd5b505050506040513d602081101561792657600080fd5b8101908080519060200190929190505050905090565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156179f757600080fd5b505afa158015617a0b573d6000803e3d6000fd5b505050506040513d6020811015617a2157600080fd5b8101908080519060200190929190505050905090565b600080828401905083811015617ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600080831415617ad25760009050617b3f565b6000828402905082848281617ae357fe5b0414617b3a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061a1ac6021913960400191505060405180910390fd5b809150505b92915050565b6000818310617b545781617b56565b825b905092915050565b6000617ba083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250619613565b905092915050565b600080828481617bb457fe5b0490506000838581617bc257fe5b061415617bd25780915050617bea565b617be6600182617a3790919063ffffffff16565b9150505b92915050565b6000617c06602083617a3790919063ffffffff16565b83511015617c7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b600060036000019050617cb1828260000154617a3790919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050617d15838260000154617a3790919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050617d79848260000154617a3790919063ffffffff16565b8160000181905550617d89615053565b8160010181905550505050505050565b6000617e74846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015617e2b57600080fd5b505af4158015617e3f573d6000803e3d6000fd5b505050506040513d6020811015617e5557600080fd5b8101908080519060200190929190505050617a3790919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b158015617f7257600080fd5b505af4158015617f86573d6000803e3d6000fd5b505050505050505050565b617f99619f30565b6040518060200160405280838152509050919050565b617fb7619f30565b604051806020016040528069d3c21bcecceda1000000815250905090565b60008160000151836000015110905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561808e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f47726f75702061646472657373207a65726f000000000000000000000000000081525060200191505060405180910390fd5b6000618098617529565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561811457600080fd5b505afa158015618128573d6000803e3d6000fd5b505050506040513d602081101561813e57600080fd5b81019080805190602001909291905050509050856000106181c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f566f74652076616c75652063616e6e6f74206265207a65726f0000000000000081525060200191505060405180910390fd5b6181d18782616054565b861115618229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061a0e16023913960400191505060405180910390fd5b60006182368883896196d9565b905061824488888888618dae565b61824c617841565b73ffffffffffffffffffffffffffffffffffffffff16636edf77a583896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156182d257600080fd5b505af11580156182e6573d6000803e3d6000fd5b5050505060006182f689846125b5565b141561834957618348600360090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208986619073565b5b8773ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fae7458f8697a680da6be36406ea0b8f40164915ac9cc40c0dad05a2ff6e8c6a88984604051808381526020018281526020019250505060405180910390a360019250505095945050505050565b600061840783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061989d565b905092915050565b6000808590506000618421888a6151ac565b905060008111156184c15760006184388383617b45565b9050618445898b83618c9e565b8873ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff167f148075455e24d5cf538793db3e917a157cbadac69dd6a304186daf11b23f76fe836040518082815260200191505060405180910390a36184bd81846183c590919063ffffffff16565b9250505b60006184cd898b616054565b90506000811180156184df5750600083115b156185865760006184f08483617b45565b905060006184ff8b8d846196d9565b90508a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fae7458f8697a680da6be36406ea0b8f40164915ac9cc40c0dad05a2ff6e8c6a88484604051808381526020018281526020019250505060405180910390a361858182866183c590919063ffffffff16565b945050505b600061859b848a6183c590919063ffffffff16565b90506000811115618612576185b28a828a8a618dae565b60006185be8b8d6125b5565b141561861157618610600360090160008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208b88619073565b5b5b809450505050509695505050505050565b600033905090565b618633619f30565b61863b61995d565b821115618693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061a0ab6036913960400191505060405180910390fd5b604051806020016040528069d3c21bcecceda100000084028152509050919050565b6186bd619f30565b6000836000015114806186d4575060008260000151145b156186f057604051806020016040528060008152509050618b0e565b69d3c21bcecceda10000008260000151141561870e57829050618b0e565b69d3c21bcecceda10000008360000151141561872c57819050618b0e565b600069d3c21bcecceda10000006187428561997c565b600001518161874d57fe5b049050600061875b856199b3565b600001519050600069d3c21bcecceda10000006187778661997c565b600001518161878257fe5b0490506000618790866199b3565b600001519050600082850290506000851461882457828582816187af57fe5b0414618823576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600069d3c21bcecceda100000082029050600082146188c65769d3c21bcecceda100000082828161885157fe5b04146188c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6f766572666c6f772078317931202a206669786564312064657465637465640081525060200191505060405180910390fd5b5b809150600084860290506000861461895757848682816188e257fe5b0414618956576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b60008488029050600088146189e5578488828161897057fe5b04146189e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b6189ed6199f0565b87816189f557fe5b049650618a006199f0565b8581618a0857fe5b0494506000858802905060008814618a995785888281618a2457fe5b0414618a98576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b618aa1619f30565b6040518060200160405280878152509050618aca816040518060200160405280878152506199fd565b9050618ae4816040518060200160405280868152506199fd565b9050618afe816040518060200160405280858152506199fd565b9050809a50505050505050505050505b92915050565b600069d3c21bcecceda1000000826000015181618b2d57fe5b049050919050565b600081600001519050919050565b618b4b619f30565b600082600001511415618bc6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f63616e277420646976696465206279203000000000000000000000000000000081525060200191505060405180910390fd5b600069d3c21bcecceda10000008460000151029050836000015169d3c21bcecceda10000008281618bf357fe5b0414618c67576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f766572666c6f7720617420646976696465000000000000000000000000000081525060200191505060405180910390fd5b604051806020016040528084600001518381618c7f57fe5b0481525091505092915050565b618c9a828260008551619aa6565b5050565b600060036000019050618cbe8282600001546183c590919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050618d228382600001546183c590919063ffffffff16565b816000018190555060008160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050618d868482600001546183c590919063ffffffff16565b8160000181905550600081600001541415618da657600081600101819055505b505050505050565b6003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab6302f130289091866040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015618e3a57600080fd5b505af4158015618e4e573d6000803e3d6000fd5b505050506040513d6020811015618e6457600080fd5b81019080805190602001909291905050501561906d576000618f55846003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63e0fe44b39091896040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015618f0c57600080fd5b505af4158015618f20573d6000803e3d6000fd5b505050506040513d6020811015618f3657600080fd5b81019080805190602001909291905050506183c590919063ffffffff16565b90506003600401600001734819ad0a0eb1304b1d7bc3afd7818017b52a87ab63cab455ae9091878487876040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561905357600080fd5b505af4158015619067573d6000803e3d6000fd5b50505050505b50505050565b8280549050811080156190e757508173ffffffffffffffffffffffffffffffffffffffff168382815481106190a457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b619159576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f42616420696e646578000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000619173600185805490506183c590919063ffffffff16565b905083818154811061918157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168483815481106191b857fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080848161920d9190619f43565b5050505050565b600080600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141561926f5760009050619327565b619324600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154619316600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015485617abf90919063ffffffff16565b617b5e90919063ffffffff16565b90505b92915050565b619335619f30565b61933d619f30565b6193468461862b565b9050619350619f30565b6193598461862b565b90506193658282618b43565b9250505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156193f5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180619ffe6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600360020190506194d4838260000154617a3790919063ffffffff16565b816000018190555060006194e88685619dbb565b905060008260010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050619546858260000154617a3790919063ffffffff16565b8160000181905550619565828260010154617a3790919063ffffffff16565b81600101819055506195c1828260020160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054617a3790919063ffffffff16565b8160020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508193505050509392505050565b600080831182906196bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015619684578082015181840152602081019050619669565b50505050905090810190601f1680156196b15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816196cb57fe5b049050809150509392505050565b600080600360020190506196fa8382600001546183c590919063ffffffff16565b8160000181905550600080905060006197138787616054565b905060008360010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050858214156197ab578060020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205492506197b8565b6197b58887619dbb565b92505b6197cf8682600001546183c590919063ffffffff16565b81600001819055506197ee8382600101546183c590919063ffffffff16565b816001018190555061984a838260020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546183c590919063ffffffff16565b8160020160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550829450505050509392505050565b600083831115829061994a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561990f5780820151818401526020810190506198f4565b50505050905090810190601f16801561993c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60007601357c299a88ea76a58924d52ce4f26a85af186c2b9e74905090565b619984619f30565b604051806020016040528069d3c21bcecceda1000000808560000151816199a757fe5b04028152509050919050565b6199bb619f30565b604051806020016040528069d3c21bcecceda1000000808560000151816199de57fe5b04028460000151038152509050919050565b600064e8d4a51000905090565b619a05619f30565b6000826000015184600001510190508360000151811015619a8e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f616464206f766572666c6f77206465746563746564000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808281525091505092915050565b8251845114619b00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061a23d6023913960400191505060405180910390fd5b83518210619b76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f6865617020737461727420696e646578206f7574206f662072616e676500000081525060200191505060405180910390fd5b8351811115619bed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f68656170206c656e677468206f7574206f662072616e6765000000000000000081525060200191505060405180910390fd5b60008290505b600115619db4576000619c236001619c15600285617abf90919063ffffffff16565b617a3790919063ffffffff16565b90506000619c4e6002619c40600286617abf90919063ffffffff16565b617a3790919063ffffffff16565b905060008390508483108015619cbf5750619cbe87898381518110619c6f57fe5b602002602001015181518110619c8157fe5b6020026020010151888a8681518110619c9657fe5b602002602001015181518110619ca857fe5b6020026020010151619eee90919063ffffffff16565b5b15619cc8578290505b8482108015619d325750619d3187898381518110619ce257fe5b602002602001015181518110619cf457fe5b6020026020010151888a8581518110619d0957fe5b602002602001015181518110619d1b57fe5b6020026020010151619eee90919063ffffffff16565b5b15619d3b578190505b83811415619d4b57505050619db4565b6000888581518110619d5957fe5b60200260200101519050888281518110619d6f57fe5b6020026020010151898681518110619d8357fe5b60200260200101818152505080898381518110619d9c57fe5b60200260200101818152505081945050505050619bf3565b5050505050565b600080600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541415619e3057619e2968056bc75e2d6310000083617abf90919063ffffffff16565b9050619ee8565b619ee5600360020160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154619ed7600360020160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015485617abf90919063ffffffff16565b617b5e90919063ffffffff16565b90505b92915050565b60008160000151836000015111905092915050565b604051806040016040528060608152602001600081525090565b6040518060200160405280600081525090565b6040518060200160405280600081525090565b815481835581811115619f6a57818360005260206000209182019101619f699190619f6f565b5b505050565b619f9191905b80821115619f8d576000816000905550600101619f75565b5090565b9056fe4d6178696d756d20656c65637461626c652076616c696461746f72732063616e6e6f7420626520736d616c6c6572207468616e206d696e696d756d6572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e707574206c656e67746873206d75737420626520636f72726573706f6e642e456c6563746162696c697479207468726573686f6c64206d757374206265206c6f776572207468616e20313030256572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6563616e277420637265617465206669786964697479206e756d626572206c6172676572207468616e206d61784e657746697865642829566f74652076616c7565206c6172676572207468616e2061637469766520766f7465736572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c656572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c65566f74652076616c7565206c6172676572207468616e2070656e64696e6720766f7465736b657920616e642076616c7565206172726179206c656e677468206d69736d617463686572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c654d696e696d756d20656c65637461626c652076616c696461746f72732063616e6e6f74206265207a65726f44656372656d656e742076616c7565206d7573742062652067726561746572207468616e20302e6572726f722063616c6c696e67206861736848656164657220707265636f6d70696c65a265627a7a72315820977f5c762e9522175d246d3ebe62c7b03a5821c600045e3f64d91de56c9f6bd964736f6c634300050d0032