Address Details
contract
0x46755b3E1841683C6925b3c710fFbf7fDf601227
- Contract Name
- Manager
- Creator
- 0x5bc1c4–68a788 at 0x10bd1d–3ad50c
- 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
- 25980286
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- Manager
- Optimization enabled
- false
- Compiler version
- v0.8.11+commit.d7f03943
- EVM Version
- istanbul
- Verified at
- 2024-04-15T21:53:42.579709Z
contracts/Manager.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "./common/UsingRegistryUpgradeable.sol"; import "./common/UUPSOwnableUpgradeable.sol"; import "./interfaces/IAccount.sol"; import "./interfaces/IStakedCelo.sol"; import "./interfaces/IVote.sol"; import "./interfaces/IGroupHealth.sol"; import "./interfaces/ISpecificGroupStrategy.sol"; import "./interfaces/IDefaultStrategy.sol"; import "./Pausable.sol"; import "./common/Errors.sol"; /** * @title Manages the StakedCelo system, by controlling the minting and burning * of stCELO and implementing strategies for voting and unvoting of deposited or * withdrawn CELO. */ contract Manager is Errors, UUPSOwnableUpgradeable, UsingRegistryUpgradeable, Pausable { using EnumerableSet for EnumerableSet.AddressSet; /** * @notice An instance of the StakedCelo contract this Manager manages. */ IStakedCelo internal stakedCelo; /** * @notice An instance of the Account contract this Manager manages. */ IAccount internal account; /** * @notice OBSOLETE */ EnumerableSet.AddressSet private activeGroups; /** * @notice OBSOLETE */ EnumerableSet.AddressSet private deprecatedGroups; /** * @notice Contract used during Governance voting. */ address public voteContract; /** * @notice An instance of the GroupHealth contract for the StakedCelo protocol. */ IGroupHealth public groupHealth; /** * @notice An instance of the SpecificGroupStrategy contract for the StakedCelo protocol. */ ISpecificGroupStrategy public specificGroupStrategy; /** * @notice An instance of the DefaultStrategy contract for the StakedCelo protocol. */ IDefaultStrategy public defaultStrategy; /** * @notice address -> strategy used by an address * strategy: address(0) = default strategy * strategy: !address(0) = vote for the group at that address if allowed * by GroupHealth.isGroupValid, otherwise vote according to the default strategy */ mapping(address => address) public strategies; /** * @notice Emitted when the vote contract is initially set or later modified. * @param voteContract The new vote contract address. */ event VoteContractSet(address indexed voteContract); /** * @notice Emitted when the voting strategy changes. * @param group The group's address. */ event StrategyChanged(address indexed group); /** * @notice Used when attempting to withdraw 0 value. */ error ZeroWithdrawal(); /** * @notice Used when a group does not meet the validator group health requirements. * @param group The group's address. */ error GroupNotEligible(address group); /** * @notice Used when an `onlyStCelo` function is called by a non-stCELO contract. * @param caller `msg.sender` that called the function. */ error CallerNotStakedCelo(address caller); /** * @notice Used when an `onlyStrategy` function * is called by a non-strategy contract. * @param caller `msg.sender` that called the function. */ error CallerNotStrategy(address caller); /** * @notice Used when rebalancing to non-active nor specific group. * @param group The group's address. */ error InvalidToGroup(address group); /** * @notice Used when rebalancing and fromGroup doesn't have any extra CELO. * @param group The group's address. * @param actualCelo The actual CELO value. * @param expectedCelo The expected CELO value. */ error RebalanceNoExtraCelo(address group, uint256 actualCelo, uint256 expectedCelo); /** * @notice Used when rebalancing and toGroup has enough CELO. * @param group The group's address. * @param actualCelo The actual CELO value. * @param expectedCelo The expected CELO value. */ error RebalanceEnoughCelo(address group, uint256 actualCelo, uint256 expectedCelo); /** * @notice Used when trying to overflow rebalance group that is not overflowing. * @param group The group's address. */ error FromGroupNotOverflowing(address group); /** * @notice Used when trying to rebalance to a group that is overflowing. * @param group The group's address. */ error ToGroupOverflowing(address group); /** * @dev Throws if called by any address other than StakedCelo. */ modifier onlyStakedCelo() { if (address(stakedCelo) != msg.sender) { revert CallerNotStakedCelo(msg.sender); } _; } /** * @dev Throws if called by any address other than one of the strategy contracts. */ modifier onlyStrategy() { if ( address(defaultStrategy) != msg.sender && address(specificGroupStrategy) != msg.sender ) { revert CallerNotStrategy(msg.sender); } _; } /** * @notice Empty constructor for proxy implementation, `initializer` modifer ensures the * implementation gets initialized. */ // solhint-disable-next-line no-empty-blocks constructor() initializer {} /** * @notice Initialize the contract with registry and owner. * @param _registry The address of the Celo Registry. * @param _owner The address of the contract owner. */ function initialize(address _registry, address _owner) external initializer { _transferOwnership(_owner); __UsingRegistry_init(_registry); } /** * @notice Set this contract's dependencies in the StakedCelo system. * @dev The StakedCelo contracts all reference each other * so we need a way of setting these after all contracts are * deployed and initialized. * @param _stakedCelo the address of the StakedCelo contract. * @param _account The address of the Account contract. * @param _vote The address of the Vote contract. * @param _groupHealth The address of the GroupHealth contract. * @param _specificGroupStrategy The address of the SpecificGroupStrategy contract. * @param _defaultStrategy The address of the DefaultStrategy contract. */ function setDependencies( address _stakedCelo, address _account, address _vote, address _groupHealth, address _specificGroupStrategy, address _defaultStrategy ) external onlyOwner { if ( _stakedCelo == address(0) || _account == address(0) || _vote == address(0) || _groupHealth == address(0) || _specificGroupStrategy == address(0) || _defaultStrategy == address(0) ) { revert AddressZeroNotAllowed(); } stakedCelo = IStakedCelo(_stakedCelo); account = IAccount(_account); voteContract = _vote; groupHealth = IGroupHealth(_groupHealth); specificGroupStrategy = ISpecificGroupStrategy(_specificGroupStrategy); defaultStrategy = IDefaultStrategy(_defaultStrategy); emit VoteContractSet(_vote); } /** * @notice Sets that address permissioned to pause/unpause this contract to * the owner of this contract. */ function setPauser() external onlyOwner { _setPauser(owner()); } /** * @notice Used to withdraw CELO from the system, in exchange for burning * stCELO. * @param stCeloAmount The amount of stCELO to burn. * @dev Calculates the CELO amount based on the ratio of outstanding stCELO * and the total amount of CELO owned and used for voting by Account. See * `toCelo`. * @dev The funds need to be withdrawn using calls to `Account.withdraw` and * `Account.finishPendingWithdrawal`. */ function withdraw(uint256 stCeloAmount) external onlyWhenNotPaused { ( address[] memory groupsWithdrawn, uint256[] memory withdrawalsPerGroup ) = distributeWithdrawals(stCeloAmount, strategies[msg.sender], false); account.scheduleWithdrawals(msg.sender, groupsWithdrawn, withdrawalsPerGroup); stakedCelo.burn(msg.sender, stCeloAmount); } /** * @notice Revokes votes on already voted proposal. * @param proposalId The ID of the proposal to revoke from. * @param index The index of the proposal ID in `dequeued`. */ function revokeVotes(uint256 proposalId, uint256 index) external onlyWhenNotPaused { IVote vote = IVote(voteContract); (uint256 totalYesVotes, uint256 totalNoVotes, uint256 totalAbstainVotes) = vote.revokeVotes( msg.sender, proposalId ); account.votePartially(proposalId, index, totalYesVotes, totalNoVotes, totalAbstainVotes); } /** * @notice Unlock balance of vote stCELO and update beneficiary vote history. * @param beneficiary The address to be unlocked. */ function updateHistoryAndReturnLockedStCeloInVoting(address beneficiary) external onlyWhenNotPaused returns (uint256) { IVote vote = IVote(voteContract); return vote.updateHistoryAndReturnLockedStCeloInVoting(beneficiary); } /** * @notice Used to deposit CELO into the StakedCelo system. The user will * receive an amount of stCELO proportional to their contribution. The CELO * will be scheduled to be voted for with the Account contract. * The CELO will be distributed based on address strategy. */ function deposit() external payable onlyWhenNotPaused { uint256 stCeloAmount = toStakedCelo(msg.value); (address[] memory finalGroups, uint256[] memory finalVotes) = distributeVotes( msg.value, stCeloAmount, strategies[msg.sender] ); stakedCelo.mint(msg.sender, stCeloAmount); account.scheduleVotes{value: msg.value}(finalGroups, finalVotes); } /** * @notice Returns which strategy an address is using * address(0) = default strategy * !address(0) = voting for specific validator group. * Unhealthy and blocked strategies are reverted to default. * @param accountAddress The account address. * @return The strategy. */ function getAddressStrategy(address accountAddress) external view returns (address) { address strategy = strategies[accountAddress]; if ( strategy != address(0) && (specificGroupStrategy.isBlockedGroup(strategy) || !groupHealth.isGroupValid(strategy)) ) { // strategy not allowed revert to default strategy return address(0); } return strategy; } /** * @notice Returns the storage, major, minor, and patch version of the contract. * @return Storage version of the contract. * @return Major version of the contract. * @return Minor version of the contract. * @return Patch version of the contract. */ function getVersionNumber() external pure returns ( uint256, uint256, uint256, uint256 ) { return (1, 3, 1, 0); } /** * @notice Whenever stCELO is being transferd we will check whether origin and target * account use same strategy. If strategy differs we will schedule votes for transfer. * @param from The from account. * @param to The to account. * @param stCeloAmount The stCELO amount. */ function transfer( address from, address to, uint256 stCeloAmount ) public onlyStakedCelo { _transfer(strategies[from], strategies[to], stCeloAmount); } /** * @notice Allows account to change strategy. * address(0) = default strategy * !address(0) = voting for allowed validator group. Group needs to be in allowed * @param newStrategy The from account. */ function changeStrategy(address newStrategy) public onlyWhenNotPaused { if ( newStrategy != address(0) && (specificGroupStrategy.isBlockedGroup(newStrategy) || !groupHealth.isGroupValid(newStrategy)) ) { revert GroupNotEligible(newStrategy); } uint256 stCeloAmount = stakedCelo.balanceOf(msg.sender); if (stCeloAmount != 0) { _transfer(strategies[msg.sender], newStrategy, stCeloAmount); } strategies[msg.sender] = newStrategy; emit StrategyChanged(newStrategy); } /** * @notice Unlock vote balance of stCELO. * @param accountAddress The account to be unlocked. */ function unlockBalance(address accountAddress) public { stakedCelo.unlockVoteBalance(accountAddress); } /** * @notice Rebalances CELO between groups that have incorrect CELO-stCELO ratio. * `fromGroup` is required to have more CELO than it should and `toGroup` needs * to have less CELO than it should. * @param fromGroup The from group. * @param toGroup The to group. */ function rebalance(address fromGroup, address toGroup) public onlyWhenNotPaused { if (!defaultStrategy.isActive(toGroup) && specificGroupStrategy.isBlockedGroup(toGroup)) { // rebalancing to deactivated/non-existent group is not allowed revert InvalidToGroup(toGroup); } (uint256 expectedFromCelo, uint256 actualFromCelo) = getExpectedAndActualCeloForGroup( fromGroup ); if (actualFromCelo <= expectedFromCelo) { // fromGroup needs to have more CELO than it should revert RebalanceNoExtraCelo(fromGroup, actualFromCelo, expectedFromCelo); } (uint256 expectedToCelo, uint256 actualToCelo) = getExpectedAndActualCeloForGroup(toGroup); if (actualToCelo >= expectedToCelo) { // toGroup needs to have less CELO than it should revert RebalanceEnoughCelo(toGroup, actualToCelo, expectedToCelo); } uint256 receivableVotes = getReceivableVotesForGroup(toGroup); if (receivableVotes == 0) { revert ToGroupOverflowing(toGroup); } uint256 toMove = Math.min( Math.min(actualFromCelo - expectedFromCelo, expectedToCelo - actualToCelo), receivableVotes ); scheduleRebalanceTransfer(fromGroup, toGroup, toMove); } /** * @notice Rebalance according to CELO overflow rather than stCELO ratio. * If one of the groups is overflowing and there are still some votes that * are scheduled for the group, this function allows to transfer these * votes to any active group in protocol that is not overflowing yet. * @param fromGroup The group to unschedule votes from. * @param toGroup The group to schedule votes to. */ function rebalanceOverflow(address fromGroup, address toGroup) public onlyWhenNotPaused { if (!defaultStrategy.isActive(toGroup)) { revert InvalidToGroup(toGroup); } uint256 fromReceivableVotesByElection = getElectionReceivableVotes(fromGroup); uint256 scheduledVotesToCancel = account.scheduledRevokeForGroup(fromGroup) + account.scheduledWithdrawalsForGroup(fromGroup); uint256 scheduledVotes = account.scheduledVotesForGroup(fromGroup); uint256 protocolScheduledVotes = scheduledVotes > scheduledVotesToCancel ? scheduledVotes - scheduledVotesToCancel : 0; uint256 overflowingCelo = protocolScheduledVotes > fromReceivableVotesByElection ? protocolScheduledVotes - fromReceivableVotesByElection : 0; if (overflowingCelo == 0) { revert FromGroupNotOverflowing(fromGroup); } uint256 toReceivableVotes = getReceivableVotesForGroup(toGroup); if (toReceivableVotes == 0) { revert ToGroupOverflowing(toGroup); } uint256 toMove = Math.min(overflowingCelo, toReceivableVotes); scheduleRebalanceTransfer(fromGroup, toGroup, toMove); } /** * @notice Allows strategy to initiate transfer without any checks. * This method is supposed to be used for transfers between groups * only within strategy * @param fromGroups The groups the deposited CELO is intended to be revoked from. * @param fromVotes The amount of CELO scheduled to be revoked from each respective group. * @param toGroups The groups the transferred CELO is intended to vote for. * @param toVotes The amount of CELO to schedule for each respective `toGroups`. */ function scheduleTransferWithinStrategy( address[] calldata fromGroups, address[] calldata toGroups, uint256[] calldata fromVotes, uint256[] calldata toVotes ) public onlyStrategy { account.scheduleTransfer(fromGroups, fromVotes, toGroups, toVotes); } /** * @notice Votes on a proposal in the referendum stage. * @param proposalId The ID of the proposal to vote on. * @param index The index of the proposal ID in `dequeued`. * @param yesVotes The yes votes weight. * @param noVotes The no votes weight. * @param abstainVotes The abstain votes weight. */ function voteProposal( uint256 proposalId, uint256 index, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ) public onlyWhenNotPaused { IVote vote = IVote(voteContract); ( uint256 stCeloUsedForVoting, uint256 totalYesVotes, uint256 totalNoVotes, uint256 totalAbstainVotes ) = vote.voteProposal(msg.sender, proposalId, yesVotes, noVotes, abstainVotes); stakedCelo.lockVoteBalance(msg.sender, stCeloUsedForVoting); account.votePartially(proposalId, index, totalYesVotes, totalNoVotes, totalAbstainVotes); } /** * @notice Returns expected CELO amount voted for by Account contract * vs actual amount voted for by Account contract. * @param group The group. * @return expectedCelo The CELO which group should have. * @return actualCelo The CELO which group has. */ function getExpectedAndActualCeloForGroup(address group) public view returns (uint256 expectedCelo, uint256 actualCelo) { uint256 celoScheduled = account.votesForGroup(group) + account.scheduledVotesForGroup(group); uint256 celoToRemove = account.scheduledRevokeForGroup(group) + account.scheduledWithdrawalsForGroup(group); if (celoToRemove > celoScheduled) { return (celoToRemove - celoScheduled, 0); } actualCelo = celoScheduled - celoToRemove; bool isSpecificGroupStrategy = !specificGroupStrategy.isBlockedGroup(group); bool isActiveGroup = defaultStrategy.isActive(group); uint256 stCeloFromSpecificStrategy; uint256 stCeloFromDefaultStrategy; if (isSpecificGroupStrategy) { uint256 overflow; uint256 unhealthy; (stCeloFromSpecificStrategy, overflow, unhealthy) = specificGroupStrategy .getStCeloInGroup(group); uint256 toSubtract = overflow + unhealthy; stCeloFromSpecificStrategy -= Math.min(stCeloFromSpecificStrategy, toSubtract); } if (isActiveGroup) { stCeloFromDefaultStrategy = defaultStrategy.stCeloInGroup(group); } expectedCelo = toCelo(stCeloFromSpecificStrategy + stCeloFromDefaultStrategy); } /** * @notice Computes the amount of stCELO that should be minted for a given * amount of CELO deposited. * @param celoAmount The amount of CELO deposited. * @return The amount of stCELO that should be minted. */ function toStakedCelo(uint256 celoAmount) public view returns (uint256) { uint256 stCeloSupply = stakedCelo.totalSupply(); uint256 celoBalance = account.getTotalCelo(); if (stCeloSupply == 0 || celoBalance == 0) { return celoAmount; } return (celoAmount * stCeloSupply) / celoBalance; } /** * @notice Computes the amount of CELO that should be withdrawn for a given * amount of stCELO burned. * @param stCeloAmount The amount of stCELO burned. * @return The amount of CELO that should be withdrawn. */ function toCelo(uint256 stCeloAmount) public view returns (uint256) { uint256 stCeloSupply = stakedCelo.totalSupply(); uint256 celoBalance = account.getTotalCelo(); if (stCeloSupply == 0 || celoBalance == 0) { return stCeloAmount; } return (stCeloAmount * celoBalance) / stCeloSupply; } /** * Returns votes count that can be received by group through stCELO protocol. * @param group The group that can receive votes. * @return The amount of CELO that can be received by group though stCELO protocol. */ function getReceivableVotesForGroup(address group) public view returns (uint256) { uint256 receivableVotes = getElectionReceivableVotes(group); if (receivableVotes == 0) { return 0; } uint256 totalVotesForGroupByAccount = getElection().getTotalVotesForGroupByAccount( group, address(account) ); uint256 votesForGroupByAccountInProtocol = account.getCeloForGroup(group); receivableVotes += totalVotesForGroupByAccount; if (receivableVotes < votesForGroupByAccountInProtocol) { return 0; } return receivableVotes - votesForGroupByAccountInProtocol; } /** * @notice Distributes votes according to chosen strategy. * @param votes The amount of votes to distribute. * @param stCeloAmount The amount of stCELO that was minted. * @param strategy The chosen strategy. */ function distributeVotes( uint256 votes, uint256 stCeloAmount, address strategy ) private returns (address[] memory finalGroups, uint256[] memory finalVotes) { if (strategy != address(0)) { (finalGroups, finalVotes) = specificGroupStrategy.generateDepositVoteDistribution( strategy, votes, stCeloAmount ); } else { (finalGroups, finalVotes) = defaultStrategy.generateDepositVoteDistribution( votes, address(0) ); } return (finalGroups, finalVotes); } /** * @notice Distributes withdrawals according to chosen strategy. * @param stCeloAmount The amount of stCELO to be withdrawn. * @param strategy The strategy that will be used for withdrawal distribution. * @param isTransfer Whether or not withdrawal is calculated for transfer. **/ function distributeWithdrawals( uint256 stCeloAmount, address strategy, bool isTransfer ) private returns (address[] memory, uint256[] memory) { uint256 celoAmount = toCelo(stCeloAmount); if (celoAmount == 0) { revert ZeroWithdrawal(); } address[] memory groupsWithdrawn; uint256[] memory withdrawalsPerGroup; if (strategy != address(0)) { (groupsWithdrawn, withdrawalsPerGroup) = specificGroupStrategy .generateWithdrawalVoteDistribution(strategy, celoAmount, stCeloAmount, isTransfer); } else { (groupsWithdrawn, withdrawalsPerGroup) = defaultStrategy .generateWithdrawalVoteDistribution(celoAmount); } return (groupsWithdrawn, withdrawalsPerGroup); } /** * @notice Schedules transfer of CELO between strategies. * @param fromStrategy The from validator group. * @param toStrategy The to validator group. * @param stCeloAmount The stCELO amount. */ function _transfer( address fromStrategy, address toStrategy, uint256 stCeloAmount ) private { if (fromStrategy == toStrategy) { // either both addresses use default strategy // or both addresses use same specific strategy return; } _transferWithoutChecks(fromStrategy, toStrategy, stCeloAmount); } /** * @notice Updates accounting of CELO between strategies. * @param fromStrategy The from validator group. * @param toStrategy The to validator group. * @param stCeloAmount The stCELO amount. */ function _transferWithoutChecks( address fromStrategy, address toStrategy, uint256 stCeloAmount ) private { distributeWithdrawals(stCeloAmount, fromStrategy, true); distributeVotes(toCelo(stCeloAmount), stCeloAmount, toStrategy); } /** * @notice Schedules transfer between 2 groups. * @param fromGroup The group the deposited CELO is intended to be revoked from. * @param toGroup The group the transferred CELO is intended to vote for. * @param votes The amount of CELO to be transfered. */ function scheduleRebalanceTransfer( address fromGroup, address toGroup, uint256 votes ) private { address[] memory fromGroups = new address[](1); address[] memory toGroups = new address[](1); uint256[] memory fromVotes = new uint256[](1); uint256[] memory toVotes = new uint256[](1); fromGroups[0] = fromGroup; fromVotes[0] = votes; toGroups[0] = toGroup; toVotes[0] = fromVotes[0]; account.scheduleTransfer(fromGroups, fromVotes, toGroups, toVotes); } /** * Returns votes count that can be received by group directly in Election contract. * @param group The group that can receive votes. */ function getElectionReceivableVotes(address group) private view returns (uint256) { uint256 receivable = getElection().getNumVotesReceivable(group); uint256 totalVotes = getElection().getTotalVotesForGroup(group); if (receivable < totalVotes) { return 0; } return receivable - totalVotes; } }
/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967Upgrade { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallSecure( address newImplementation, bytes memory data, bool forceCall ) internal { address oldImplementation = _getImplementation(); // Initial upgrade and setup call _setImplementation(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } // Perform rollback test if not already in progress StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT); if (!rollbackTesting.value) { // Trigger rollback using upgradeTo from the new implementation rollbackTesting.value = true; Address.functionDelegateCall( newImplementation, abi.encodeWithSignature("upgradeTo(address)", oldImplementation) ); rollbackTesting.value = false; // Check rollback was effective require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades"); // Finally reset to the new implementation and log the upgrade _upgradeTo(newImplementation); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
/@openzeppelin/contracts/proxy/beacon/IBeacon.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../ERC1967/ERC1967Upgrade.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is ERC1967Upgrade { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; }
/@openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/@openzeppelin/contracts/utils/StorageSlot.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
/@openzeppelin/contracts/utils/math/Math.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol) pragma solidity ^0.8.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. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
/@openzeppelin/contracts/utils/structs/EnumerableSet.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
/contracts/Pausable.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; import "./interfaces/IPausable.sol"; import "./common/Errors.sol"; /** * @title A helper contract to add pasuing functionality to a contract. * @notice Used to prevent/mitigate damage in case an exploit is found in the * extending contract. */ abstract contract Pausable is Errors, IPausable { /** * @notice The storage slot under which we store a boolean representing * whether or not the contract is currently paused. */ bytes32 public constant PAUSED_POSITION = bytes32(uint256(keccak256("staked-celo.pausable.paused")) - 1); /** * @notice The storage slot under which we store an address representing the * address permissioned to pause/unpause this contract. */ bytes32 public constant PAUSER_POSITION = bytes32(uint256(keccak256("staked-celo.pausable.pauser")) - 1); /** * Emitted when this contract is paused. */ event ContractPaused(); /** * Emitted when this contract is unpaused. */ event ContractUnpaused(); /** * @notice Emitted when the address authorized to pause/unpause the contract is * changed. * @param pauser THe new pauser. */ event PauserSet(address pauser); /** * @notice Used when an `onlyWhenNotPaused` function is called while the * contract is paused. */ error Paused(); /** * @notice Used when an `onlyPauser` function is called with a different * address. */ error OnlyPauser(); /** * @notice Reverts if the contract is paused. */ modifier onlyWhenNotPaused() { if (isPaused()) { revert Paused(); } _; } /** * @notice Reverts if the caller is not the pauser. */ modifier onlyPauser() { if (msg.sender != pauser()) { revert OnlyPauser(); } _; } /** * @notice Pauses the contract. */ function pause() public onlyPauser { _setPaused(true); emit ContractPaused(); } /** * @notice Unpauses the contract. */ function unpause() public onlyPauser { _setPaused(false); emit ContractUnpaused(); } /** * @notice Returns whether or not the contract is paused. * @return `true` if the contract is paused, `false` otherwise. */ function isPaused() public view returns (bool) { bool paused; bytes32 pausedPosition = PAUSED_POSITION; // solhint-disable-next-line no-inline-assembly assembly { paused := sload(pausedPosition) } return paused; } /** * @notice Returns the address permissioned to pause/unpause this contract. */ function pauser() public view returns (address) { address pauserAddress; bytes32 pauserPosition = PAUSER_POSITION; // solhint-disable-next-line no-inline-assembly assembly { pauserAddress := sload(pauserPosition) } return pauserAddress; } /** * @notice Sets the contract's paused state. * @param paused `true` for paused, `false` for unpaused. */ function _setPaused(bool paused) internal { bytes32 pausedPosition = PAUSED_POSITION; // solhint-disable-next-line no-inline-assembly assembly { sstore(pausedPosition, paused) } } /** * @notice Sets the address permissioned to pause this contract. * @param _pauser The new pauser. * @dev This should be wrapped by the inheriting contract, likely in a * permissioned function like `onlyOwner`. */ function _setPauser(address _pauser) internal { if (_pauser == address(0)) { revert AddressZeroNotAllowed(); } bytes32 pauserPosition = PAUSER_POSITION; // solhint-disable-next-line no-inline-assembly assembly { sstore(pauserPosition, _pauser) } emit PauserSet(_pauser); } }
/contracts/common/Errors.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; /** * @title Provides some common general errors. */ abstract contract Errors { /** * @notice Used when attempting to pass in address zero where not allowed. */ error AddressZeroNotAllowed(); }
/contracts/common/UUPSOwnableUpgradeable.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; /** * @title A contract that links UUPSUUpgradeable with OwanbleUpgradeable to gate upgrades. */ abstract contract UUPSOwnableUpgradeable is UUPSUpgradeable, OwnableUpgradeable { /** * @notice Guard method for UUPS (Universal Upgradable Proxy Standard) * See: https://docs.openzeppelin.com/contracts/4.x/api/proxy#transparent-vs-uups * @dev This methods overrides the virtual one in UUPSUpgradeable and * adds the onlyOwner modifer. */ // solhint-disable-next-line no-empty-blocks function _authorizeUpgrade(address) internal override onlyOwner {} }
/contracts/common/UsingRegistryUpgradeable.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "../interfaces/IAccounts.sol"; import "../interfaces/IElection.sol"; import "../interfaces/IGoldToken.sol"; import "../interfaces/ILockedGold.sol"; import "../interfaces/IRegistry.sol"; import "../interfaces/IGovernance.sol"; import "../interfaces/IValidators.sol"; /** * @title A helper for getting Celo core contracts from the Registry. */ abstract contract UsingRegistryUpgradeable is Initializable { /// @notice The canonical address of the Registry. address internal constant CANONICAL_REGISTRY = 0x000000000000000000000000000000000000ce10; /// @notice The registry ID for the Accounts contract. bytes32 private constant ACCOUNTS_REGISTRY_ID = keccak256(abi.encodePacked("Accounts")); /// @notice The registry ID for the Election contract. bytes32 private constant ELECTION_REGISTRY_ID = keccak256(abi.encodePacked("Election")); /// @notice The registry ID for the GoldToken contract. bytes32 private constant GOLD_TOKEN_REGISTRY_ID = keccak256(abi.encodePacked("GoldToken")); /// @notice The registry ID for the LockedGold contract. bytes32 private constant LOCKED_GOLD_REGISTRY_ID = keccak256(abi.encodePacked("LockedGold")); /// @notice The registry ID for the Governance contract. bytes32 private constant GOVERNANCE_REGISTRY_ID = keccak256(abi.encodePacked("Governance")); /// @notice The registry ID for the Validator contract. bytes32 private constant VALIDATORS_REGISTRY_ID = keccak256(abi.encodePacked("Validators")); /// @notice The Registry. IRegistry public registry; /** * @notice Initializes the UsingRegistryUpgradable contract in an upgradable scenario * @param _registry The address of the Registry. For convenience, if the zero address is * provided, the registry is set to the canonical Registry address, i.e. 0x0...ce10. This * parameter should only be a non-zero address when testing. */ // solhint-disable-next-line func-name-mixedcase function __UsingRegistry_init(address _registry) internal onlyInitializing { if (_registry == address(0)) { registry = IRegistry(CANONICAL_REGISTRY); } else { registry = IRegistry(_registry); } } /** * @notice Gets the Accounts contract from the Registry. * @return The Accounts contract from the Registry. */ function getAccounts() internal view returns (IAccounts) { return IAccounts(registry.getAddressForOrDie(ACCOUNTS_REGISTRY_ID)); } /** * @notice Gets the Election contract from the Registry. * @return The Election contract from the Registry. */ function getElection() internal view returns (IElection) { return IElection(registry.getAddressForOrDie(ELECTION_REGISTRY_ID)); } /** * @notice Gets the GoldToken contract from the Registry. * @return The GoldToken contract from the Registry. */ function getGoldToken() internal view returns (IGoldToken) { return IGoldToken(registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID)); } /** * @notice Gets the LockedGold contract from the Registry. * @return The LockedGold contract from the Registry. */ function getLockedGold() internal view returns (ILockedGold) { return ILockedGold(registry.getAddressForOrDie(LOCKED_GOLD_REGISTRY_ID)); } /** * @notice Gets the Governance contract from the Registry. * @return The Governance contract from the Registry. */ function getGovernance() internal view returns (IGovernance) { return IGovernance(registry.getAddressForOrDie(GOVERNANCE_REGISTRY_ID)); } /** * @notice Gets the validators contract from the Registry. * @return The validators contract from the Registry. */ function getValidators() internal view returns (IValidators) { return IValidators(registry.getAddressForOrDie(VALIDATORS_REGISTRY_ID)); } }
/contracts/interfaces/IAccount.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IAccount { function scheduleVotes(address[] calldata group, uint256[] calldata votes) external payable; function scheduleTransfer( address[] calldata fromGroups, uint256[] calldata fromVotes, address[] calldata toGroups, uint256[] calldata toVotess ) external; function scheduleWithdrawals( address beneficiary, address[] calldata group, uint256[] calldata withdrawals ) external; function votePartially( uint256 proposalId, uint256 index, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ) external; function getTotalCelo() external view returns (uint256); function getCeloForGroup(address) external view returns (uint256); function scheduledVotesForGroup(address group) external view returns (uint256); function scheduledRevokeForGroup(address group) external view returns (uint256); function scheduledWithdrawalsForGroup(address group) external view returns (uint256); function votesForGroup(address group) external view returns (uint256); }
/contracts/interfaces/IAccounts.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; 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); }
/contracts/interfaces/IDefaultStrategy.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IDefaultStrategy { function generateDepositVoteDistribution(uint256 celoAmount, address depositGroupToIgnore) external returns (address[] memory finalGroups, uint256[] memory finalVotes); function generateWithdrawalVoteDistribution(uint256 celoAmount) external returns (address[] memory finalGroups, uint256[] memory finalVotes); function activateGroup(address group) external; function isActive(address group) external view returns (bool); function getNumberOfGroups() external view returns (uint256); function stCeloInGroup(address group) external view returns (uint256); }
/contracts/interfaces/IElection.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IElection { function vote( address, uint256, address, address ) external returns (bool); function activate(address) external returns (bool); function activateForAccount(address, 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); // 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; function allowedToVoteOverMaxNumberOfGroups(address) external returns (bool); function setAllowedToVoteOverMaxNumberOfGroups(bool flag) external; // view functions function electValidatorSigners() external view returns (address[] memory); function electNValidatorSigners(uint256, uint256) external view returns (address[] memory); 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); function maxNumGroupsVotedFor() external view returns (uint256); function validatorSignerAddressFromCurrentSet(uint256 index) external view returns (address); function numberValidatorsInCurrentSet() external view returns (uint256); function getEpochNumber() external view returns (uint256); }
/contracts/interfaces/IGoldToken.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IGoldToken { function transfer(address to, uint256 value) external returns (bool); function transferWithComment( address to, uint256 value, string calldata comment ) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function increaseAllowance(address spender, uint256 value) external returns (bool); function decreaseAllowance(address spender, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function balanceOf(address owner) external view returns (uint256); }
/contracts/interfaces/IGovernance.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IGovernance { function votePartially( uint256 proposalId, uint256 index, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ) external returns (bool); function getProposal(uint256 proposalId) external view returns ( address, uint256, uint256, uint256, string memory ); function getReferendumStageDuration() external view returns (uint256); }
/contracts/interfaces/IGroupHealth.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IGroupHealth { function isGroupValid(address group) external view returns (bool); }
/contracts/interfaces/ILockedGold.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface ILockedGold { function lock() external payable; function incrementNonvotingAccountBalance(address, uint256) external; 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 decrementNonvotingAccountBalance(address, uint256) external; function unlockingPeriod() external view returns (uint256); function getAccountTotalLockedGold(address) external view returns (uint256); function getTotalLockedGold() external view returns (uint256); function getPendingWithdrawal(address, uint256) external view returns (uint256, uint256); function getSlashingWhitelist() external view returns (bytes32[] memory); function getPendingWithdrawals(address) external view returns (uint256[] memory, uint256[] memory); function getTotalPendingWithdrawals(address) external view returns (uint256); function isSlasher(address) external view returns (bool); function owner() external view returns (address); function getAccountNonvotingLockedGold(address account) external view returns (uint256); }
/contracts/interfaces/IPausable.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IPausable { function pause() external; function unpause() external; function isPaused() external returns (bool); }
/contracts/interfaces/IRegistry.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; 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); }
/contracts/interfaces/ISpecificGroupStrategy.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface ISpecificGroupStrategy { function generateDepositVoteDistribution( address group, uint256 votes, uint256 stCeloAmount ) external returns (address[] memory finalGroups, uint256[] memory finalVotes); function generateWithdrawalVoteDistribution( address group, uint256 celoWithdrawalAmount, uint256 stCeloWithdrawalAmount, bool isTransfer ) external returns (address[] memory groups, uint256[] memory votes); function isVotedGroup(address group) external view returns (bool); function isBlockedGroup(address group) external view returns (bool); function getStCeloInGroup(address group) external view returns ( uint256 total, uint256 overflow, uint256 unhealthy ); function totalStCeloLocked() external view returns (uint256); function totalStCeloOverflow() external view returns (uint256); function getNumberOfVotedGroups() external view returns (uint256); }
/contracts/interfaces/IStakedCelo.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IStakedCelo { function totalSupply() external view returns (uint256); function mint(address, uint256) external; function burn(address, uint256) external; function transfer(address, uint256) external returns (bool); function transferFrom( address, address, uint256 ) external returns (bool); function balanceOf(address account) external view returns (uint256); function lockVoteBalance(address account, uint256 amount) external; function unlockVoteBalance(address account) external; function lockedVoteBalanceOf(address account) external view returns (uint256); }
/contracts/interfaces/IValidators.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.11; 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; }
/contracts/interfaces/IVote.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IVote { function updateHistoryAndReturnLockedStCeloInVoting(address beneficiary) external returns (uint256); function voteProposal( address accountVoter, uint256 proposalId, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ) external returns ( uint256 stCeloUsedForVoting, uint256 totalYesVotes, uint256 totalNoVotes, uint256 totalAbstainVotes ); function revokeVotes(address accountVoter, uint256 proposalId) external returns ( uint256 totalYesVotes, uint256 totalNoVotes, uint256 totalAbstainVotes ); }
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":false},"metadata":{"useLiteralContent":true,"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"istanbul","compilationTarget":{"contracts/Manager.sol":"Manager"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"error","name":"AddressZeroNotAllowed","inputs":[]},{"type":"error","name":"CallerNotStakedCelo","inputs":[{"type":"address","name":"caller","internalType":"address"}]},{"type":"error","name":"CallerNotStrategy","inputs":[{"type":"address","name":"caller","internalType":"address"}]},{"type":"error","name":"FromGroupNotOverflowing","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"error","name":"GroupNotEligible","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"error","name":"InvalidToGroup","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"error","name":"OnlyPauser","inputs":[]},{"type":"error","name":"Paused","inputs":[]},{"type":"error","name":"RebalanceEnoughCelo","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"actualCelo","internalType":"uint256"},{"type":"uint256","name":"expectedCelo","internalType":"uint256"}]},{"type":"error","name":"RebalanceNoExtraCelo","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"actualCelo","internalType":"uint256"},{"type":"uint256","name":"expectedCelo","internalType":"uint256"}]},{"type":"error","name":"ToGroupOverflowing","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"error","name":"ZeroWithdrawal","inputs":[]},{"type":"event","name":"AdminChanged","inputs":[{"type":"address","name":"previousAdmin","internalType":"address","indexed":false},{"type":"address","name":"newAdmin","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"BeaconUpgraded","inputs":[{"type":"address","name":"beacon","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ContractPaused","inputs":[],"anonymous":false},{"type":"event","name":"ContractUnpaused","inputs":[],"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":"PauserSet","inputs":[{"type":"address","name":"pauser","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"StrategyChanged","inputs":[{"type":"address","name":"group","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Upgraded","inputs":[{"type":"address","name":"implementation","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"VoteContractSet","inputs":[{"type":"address","name":"voteContract","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"PAUSED_POSITION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"PAUSER_POSITION","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeStrategy","inputs":[{"type":"address","name":"newStrategy","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IDefaultStrategy"}],"name":"defaultStrategy","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"deposit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getAddressStrategy","inputs":[{"type":"address","name":"accountAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"expectedCelo","internalType":"uint256"},{"type":"uint256","name":"actualCelo","internalType":"uint256"}],"name":"getExpectedAndActualCeloForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getReceivableVotesForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getVersionNumber","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IGroupHealth"}],"name":"groupHealth","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_registry","internalType":"address"},{"type":"address","name":"_owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isPaused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pauser","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rebalance","inputs":[{"type":"address","name":"fromGroup","internalType":"address"},{"type":"address","name":"toGroup","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rebalanceOverflow","inputs":[{"type":"address","name":"fromGroup","internalType":"address"},{"type":"address","name":"toGroup","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IRegistry"}],"name":"registry","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeVotes","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"scheduleTransferWithinStrategy","inputs":[{"type":"address[]","name":"fromGroups","internalType":"address[]"},{"type":"address[]","name":"toGroups","internalType":"address[]"},{"type":"uint256[]","name":"fromVotes","internalType":"uint256[]"},{"type":"uint256[]","name":"toVotes","internalType":"uint256[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDependencies","inputs":[{"type":"address","name":"_stakedCelo","internalType":"address"},{"type":"address","name":"_account","internalType":"address"},{"type":"address","name":"_vote","internalType":"address"},{"type":"address","name":"_groupHealth","internalType":"address"},{"type":"address","name":"_specificGroupStrategy","internalType":"address"},{"type":"address","name":"_defaultStrategy","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPauser","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ISpecificGroupStrategy"}],"name":"specificGroupStrategy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"strategies","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"toCelo","inputs":[{"type":"uint256","name":"stCeloAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"toStakedCelo","inputs":[{"type":"uint256","name":"celoAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transfer","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"stCeloAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unlockBalance","inputs":[{"type":"address","name":"accountAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"updateHistoryAndReturnLockedStCeloInVoting","inputs":[{"type":"address","name":"beneficiary","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"upgradeTo","inputs":[{"type":"address","name":"newImplementation","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"upgradeToAndCall","inputs":[{"type":"address","name":"newImplementation","internalType":"address"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"voteContract","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"voteProposal","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"},{"type":"uint256","name":"index","internalType":"uint256"},{"type":"uint256","name":"yesVotes","internalType":"uint256"},{"type":"uint256","name":"noVotes","internalType":"uint256"},{"type":"uint256","name":"abstainVotes","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"stCeloAmount","internalType":"uint256"}]}]
Contract Creation Code
0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff168152503480156200004457600080fd5b50600060019054906101000a900460ff166200006f5760008054906101000a900460ff161562000080565b6200007f6200013c60201b60201c565b5b620000c2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000b99062000204565b60405180910390fd5b60008060019054906101000a900460ff16159050801562000113576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015620001355760008060016101000a81548160ff0219169083151502179055505b5062000226565b600062000154306200015a60201b620038181760201c565b15905090565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000620001ec602e836200017d565b9150620001f9826200018e565b604082019050919050565b600060208201905081810360008301526200021f81620001dd565b9050919050565b60805161632f620002576000396000818161127d0152818161130c015281816118ee015261197d015261632f6000f3fe60806040526004361061021a5760003560e01c80637c0d530f11610123578063b187bd26116100ab578063cf009f7a1161006f578063cf009f7a1461078a578063d0e30db0146107b5578063ee183c4a146107bf578063f2fde38b146107ea578063fac5bb9b146108135761021a565b8063b187bd26146106a7578063bc4d3bb3146106d2578063beabacc8146106fb578063c494ec1e14610724578063ce7a60ab146107615761021a565b80639468ba0e116100f25780639468ba0e146105bf5780639fd0506d146105ea578063a0fefe2514610615578063a3f16ef114610653578063b0ef81de1461067e5761021a565b80637c0d530f1461053d5780637e72dd66146105545780638456cb591461057d5780638da5cb5b146105945761021a565b8063485cc955116101a657806354255be01161017557806354255be01461047b5780636fe958d8146104a9578063715018a6146104d25780637a9024bd146104e95780637b103999146105125761021a565b8063485cc955146103bc57806348fd6ea6146103e55780634e4e5efb146104225780634f1ef2861461045f5761021a565b80632e1a7d4d116101ed5780632e1a7d4d146102eb5780633659cfe61461031457806339ebf8231461033d5780633cbf58721461037a5780633f4ba83a146103a55761021a565b80630567847f1461021f5780630c4d4e401461025c578063114e6b37146102855780632c431058146102ae575b600080fd5b34801561022b57600080fd5b50610246600480360381019061024191906149b2565b61083e565b60405161025391906149ee565b60405180910390f35b34801561026857600080fd5b50610283600480360381019061027e9190614ac4565b6109a8565b005b34801561029157600080fd5b506102ac60048036038101906102a79190614c0b565b610b3b565b005b3480156102ba57600080fd5b506102d560048036038101906102d09190614c98565b610f02565b6040516102e291906149ee565b60405180910390f35b3480156102f757600080fd5b50610312600480360381019061030d91906149b2565b6110a5565b005b34801561032057600080fd5b5061033b60048036038101906103369190614c98565b61127b565b005b34801561034957600080fd5b50610364600480360381019061035f9190614c98565b611404565b6040516103719190614cd4565b60405180910390f35b34801561038657600080fd5b5061038f611437565b60405161039c9190614d08565b60405180910390f35b3480156103b157600080fd5b506103ba61146d565b005b3480156103c857600080fd5b506103e360048036038101906103de9190614d23565b611511565b005b3480156103f157600080fd5b5061040c60048036038101906104079190614c98565b611609565b60405161041991906149ee565b60405180910390f35b34801561042e57600080fd5b5061044960048036038101906104449190614c98565b6116f5565b6040516104569190614cd4565b60405180910390f35b61047960048036038101906104749190614ea4565b6118ec565b005b34801561048757600080fd5b50610490611a29565b6040516104a09493929190614f00565b60405180910390f35b3480156104b557600080fd5b506104d060048036038101906104cb9190614d23565b611a45565b005b3480156104de57600080fd5b506104e7611d4c565b005b3480156104f557600080fd5b50610510600480360381019061050b9190614c98565b611dd4565b005b34801561051e57600080fd5b506105276121a6565b6040516105349190614fa4565b60405180910390f35b34801561054957600080fd5b506105526121cc565b005b34801561056057600080fd5b5061057b60048036038101906105769190614d23565b61225a565b005b34801561058957600080fd5b50610592612664565b005b3480156105a057600080fd5b506105a9612708565b6040516105b69190614cd4565b60405180910390f35b3480156105cb57600080fd5b506105d4612732565b6040516105e19190614d08565b60405180910390f35b3480156105f657600080fd5b506105ff612768565b60405161060c9190614cd4565b60405180910390f35b34801561062157600080fd5b5061063c60048036038101906106379190614c98565b6127ae565b60405161064a929190614fbf565b60405180910390f35b34801561065f57600080fd5b50610668612d53565b6040516106759190615009565b60405180910390f35b34801561068a57600080fd5b506106a560048036038101906106a09190615024565b612d79565b005b3480156106b357600080fd5b506106bc612f05565b6040516106c9919061507f565b60405180910390f35b3480156106de57600080fd5b506106f960048036038101906106f4919061509a565b612f4b565b005b34801561070757600080fd5b50610722600480360381019061071d9190615115565b613173565b005b34801561073057600080fd5b5061074b600480360381019061074691906149b2565b6132d3565b60405161075891906149ee565b60405180910390f35b34801561076d57600080fd5b5061078860048036038101906107839190614c98565b61343d565b005b34801561079657600080fd5b5061079f6134cd565b6040516107ac9190615189565b60405180910390f35b6107bd6134f3565b005b3480156107cb57600080fd5b506107d46136d4565b6040516107e19190614cd4565b60405180910390f35b3480156107f657600080fd5b50610811600480360381019061080c9190614c98565b6136fa565b005b34801561081f57600080fd5b506108286137f2565b60405161083591906151c5565b60405180910390f35b600080606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d291906151f5565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301d2b6ea6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610943573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096791906151f5565b905060008214806109785750600081145b156109875783925050506109a3565b8181856109949190615251565b61099e91906152da565b925050505b919050565b3373ffffffffffffffffffffffffffffffffffffffff16606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015610a5457503373ffffffffffffffffffffffffffffffffffffffff16606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15610a9657336040517ff7eb25ef000000000000000000000000000000000000000000000000000000008152600401610a8d9190614cd4565b60405180910390fd5b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f380ade3898987878b8b89896040518963ffffffff1660e01b8152600401610aff989796959493929190615440565b600060405180830381600087803b158015610b1957600080fd5b505af1158015610b2d573d6000803e3d6000fd5b505050505050505050505050565b610b4361383b565b73ffffffffffffffffffffffffffffffffffffffff16610b61612708565b73ffffffffffffffffffffffffffffffffffffffff1614610bb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bae90615506565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480610c1e5750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80610c555750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80610c8c5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80610cc35750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80610cfa5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610d31576040517f0855380c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083606c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082606d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081606e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080606f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff167f77001ab3bb5b4e91a2a4021cec272d6505154d5ff1fb2e8426752b15bd8ef16d60405160405180910390a2505050505050565b600080610f0e83613843565b90506000811415610f235760009150506110a0565b6000610f2d613977565b73ffffffffffffffffffffffffffffffffffffffff16633861727285606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401610f89929190615526565b602060405180830381865afa158015610fa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fca91906151f5565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663acd201d0866040518263ffffffff1660e01b81526004016110299190614cd4565b602060405180830381865afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a91906151f5565b90508183611078919061554f565b92508083101561108e57600093505050506110a0565b808361109a91906155a5565b93505050505b919050565b6110ad612f05565b156110e4576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061115283607060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000613a3e565b91509150606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f842a1a3384846040518463ffffffff1660e01b81526004016111b59392919061570c565b600060405180830381600087803b1580156111cf57600080fd5b505af11580156111e3573d6000803e3d6000fd5b50505050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac33856040518363ffffffff1660e01b8152600401611244929190615751565b600060405180830381600087803b15801561125e57600080fd5b505af1158015611272573d6000803e3d6000fd5b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561130a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611301906157ec565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611349613c33565b73ffffffffffffffffffffffffffffffffffffffff161461139f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113969061587e565b60405180910390fd5b6113a881613c8a565b61140181600067ffffffffffffffff8111156113c7576113c6614d79565b5b6040519080825280601f01601f1916602001820160405280156113f95781602001600182028036833780820191505090505b506000613d09565b50565b60706020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c61146791906155a5565b60001b81565b611475612768565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114d9576040517f75df51dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114e36000613eda565b7f0e5e3b3fb504c22cf5c42fa07d521225937514c654007e1f12646f89768d6f9460405160405180910390a1565b600060019054906101000a900460ff166115395760008054906101000a900460ff1615611542565b611541613f18565b5b611581576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157890615910565b60405180910390fd5b60008060019054906101000a900460ff1615905080156115d1576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6115da82613f29565b6115e383613fef565b80156116045760008060016101000a81548160ff0219169083151502179055505b505050565b6000611613612f05565b1561164a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000606c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166348fd6ea6846040518263ffffffff1660e01b81526004016116aa9190614cd4565b6020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed91906151f5565b915050919050565b600080607060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156118d35750606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cc222f8d826040518263ffffffff1660e01b81526004016117ed9190614cd4565b602060405180830381865afa15801561180a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182e919061595c565b806118d25750606d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ac8f4425826040518263ffffffff1660e01b815260040161188f9190614cd4565b602060405180830381865afa1580156118ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d0919061595c565b155b5b156118e25760009150506118e7565b809150505b919050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561197b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611972906157ec565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166119ba613c33565b73ffffffffffffffffffffffffffffffffffffffff1614611a10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a079061587e565b60405180910390fd5b611a1982613c8a565b611a2582826001613d09565b5050565b6000806000806001600360016000935093509350935090919293565b611a4d612f05565b15611a84576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639f8a13d7826040518263ffffffff1660e01b8152600401611adf9190614cd4565b602060405180830381865afa158015611afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b20919061595c565b158015611bc55750606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cc222f8d826040518263ffffffff1660e01b8152600401611b839190614cd4565b602060405180830381865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc4919061595c565b5b15611c0757806040517f5a081584000000000000000000000000000000000000000000000000000000008152600401611bfe9190614cd4565b60405180910390fd5b600080611c13846127ae565b91509150818111611c5f578381836040517f2c4f8ec8000000000000000000000000000000000000000000000000000000008152600401611c5693929190615989565b60405180910390fd5b600080611c6b856127ae565b91509150818110611cb7578481836040517fb0006ace000000000000000000000000000000000000000000000000000000008152600401611cae93929190615989565b60405180910390fd5b6000611cc286610f02565b90506000811415611d0a57856040517fb9183a08000000000000000000000000000000000000000000000000000000008152600401611d019190614cd4565b60405180910390fd5b6000611d35611d2f8787611d1e91906155a5565b8587611d2a91906155a5565b614100565b83614100565b9050611d42888883614119565b5050505050505050565b611d5461383b565b73ffffffffffffffffffffffffffffffffffffffff16611d72612708565b73ffffffffffffffffffffffffffffffffffffffff1614611dc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dbf90615506565b60405180910390fd5b611dd26000613f29565b565b611ddc612f05565b15611e13576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015611f8c5750606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cc222f8d826040518263ffffffff1660e01b8152600401611ea69190614cd4565b602060405180830381865afa158015611ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee7919061595c565b80611f8b5750606d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ac8f4425826040518263ffffffff1660e01b8152600401611f489190614cd4565b602060405180830381865afa158015611f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f89919061595c565b155b5b15611fce57806040517f10a7bc6b000000000000000000000000000000000000000000000000000000008152600401611fc59190614cd4565b60405180910390fd5b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b815260040161202b9190614cd4565b602060405180830381865afa158015612048573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206c91906151f5565b9050600081146120e1576120e0607060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683836143e8565b5b81607060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167fafd1cdc355e15bfc9038294be1c6203ce953704fda8c991bebe78ddd4d5420d160405160405180910390a25050565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6121d461383b565b73ffffffffffffffffffffffffffffffffffffffff166121f2612708565b73ffffffffffffffffffffffffffffffffffffffff1614612248576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223f90615506565b60405180910390fd5b612258612253612708565b614432565b565b612262612f05565b15612299576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639f8a13d7826040518263ffffffff1660e01b81526004016122f49190614cd4565b602060405180830381865afa158015612311573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612335919061595c565b61237657806040517f5a08158400000000000000000000000000000000000000000000000000000000815260040161236d9190614cd4565b60405180910390fd5b600061238183613843565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b09bdc5e856040518263ffffffff1660e01b81526004016123e09190614cd4565b602060405180830381865afa1580156123fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061242191906151f5565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166322e59bd4866040518263ffffffff1660e01b815260040161247c9190614cd4565b602060405180830381865afa158015612499573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bd91906151f5565b6124c7919061554f565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635fd5c95e866040518263ffffffff1660e01b81526004016125269190614cd4565b602060405180830381865afa158015612543573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256791906151f5565b90506000828211612579576000612586565b828261258591906155a5565b5b905060008482116125985760006125a5565b84826125a491906155a5565b5b905060008114156125ed57866040517f1eeadf530000000000000000000000000000000000000000000000000000000081526004016125e49190614cd4565b60405180910390fd5b60006125f887610f02565b9050600081141561264057866040517fb9183a080000000000000000000000000000000000000000000000000000000081526004016126379190614cd4565b60405180910390fd5b600061264c8383614100565b9050612659898983614119565b505050505050505050565b61266c612768565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146126d0576040517f75df51dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126da6001613eda565b7fab35696f06e428ebc5ceba8cd17f8fed287baf43440206d1943af1ee53e6d26760405160405180910390a1565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c61276291906155a5565b60001b81565b600080600060017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c61279d91906155a5565b60001b905080549150819250505090565b6000806000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635fd5c95e856040518263ffffffff1660e01b815260040161280e9190614cd4565b602060405180830381865afa15801561282b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284f91906151f5565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f8171927866040518263ffffffff1660e01b81526004016128aa9190614cd4565b602060405180830381865afa1580156128c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128eb91906151f5565b6128f5919061554f565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b09bdc5e866040518263ffffffff1660e01b81526004016129549190614cd4565b602060405180830381865afa158015612971573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299591906151f5565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166322e59bd4876040518263ffffffff1660e01b81526004016129f09190614cd4565b602060405180830381865afa158015612a0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a3191906151f5565b612a3b919061554f565b905081811115612a5e578181612a5191906155a5565b6000935093505050612d4e565b8082612a6a91906155a5565b92506000606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cc222f8d876040518263ffffffff1660e01b8152600401612ac99190614cd4565b602060405180830381865afa158015612ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b0a919061595c565b1590506000606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639f8a13d7886040518263ffffffff1660e01b8152600401612b6a9190614cd4565b602060405180830381865afa158015612b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bab919061595c565b90506000808315612c8c57600080606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166356ab819f8c6040518263ffffffff1660e01b8152600401612c149190614cd4565b606060405180830381865afa158015612c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c5591906159c0565b80935081945082965050505060008183612c6f919061554f565b9050612c7b8582614100565b85612c8691906155a5565b94505050505b8215612d3157606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166385a92cb78a6040518263ffffffff1660e01b8152600401612ced9190614cd4565b602060405180830381865afa158015612d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2e91906151f5565b90505b612d458183612d40919061554f565b61083e565b97505050505050505b915091565b606d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b612d81612f05565b15612db8576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000606c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008060008373ffffffffffffffffffffffffffffffffffffffff1663c40da15c33886040518363ffffffff1660e01b8152600401612e1f929190615751565b6060604051808303816000875af1158015612e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6291906159c0565b925092509250606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632edfd12e87878686866040518663ffffffff1660e01b8152600401612ecb959493929190615a13565b600060405180830381600087803b158015612ee557600080fd5b505af1158015612ef9573d6000803e3d6000fd5b50505050505050505050565b600080600060017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c612f3a91906155a5565b60001b905080549150819250505090565b612f53612f05565b15612f8a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000606c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000806000808473ffffffffffffffffffffffffffffffffffffffff16634c23f22e338c8b8b8b6040518663ffffffff1660e01b8152600401612ff8959493929190615a66565b6080604051808303816000875af1158015613017573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061303b9190615ab9565b9350935093509350606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639caa9e2933866040518363ffffffff1660e01b81526004016130a0929190615751565b600060405180830381600087803b1580156130ba57600080fd5b505af11580156130ce573d6000803e3d6000fd5b50505050606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632edfd12e8b8b8686866040518663ffffffff1660e01b8152600401613135959493929190615a13565b600060405180830381600087803b15801561314f57600080fd5b505af1158015613163573d6000803e3d6000fd5b5050505050505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461320557336040517f4a653c6a0000000000000000000000000000000000000000000000000000000081526004016131fc9190614cd4565b60405180910390fd5b6132ce607060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16607060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836143e8565b505050565b600080606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613343573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061336791906151f5565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301d2b6ea6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133fc91906151f5565b9050600082148061340d5750600081145b1561341c578392505050613438565b8082856134299190615251565b61343391906152da565b925050505b919050565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e37d49b8826040518263ffffffff1660e01b81526004016134989190614cd4565b600060405180830381600087803b1580156134b257600080fd5b505af11580156134c6573d6000803e3d6000fd5b5050505050565b606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6134fb612f05565b15613532576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061353d346132d3565b90506000806135ac3484607060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661450e565b91509150606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1933856040518363ffffffff1660e01b815260040161360d929190615751565b600060405180830381600087803b15801561362757600080fd5b505af115801561363b573d6000803e3d6000fd5b50505050606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301c21d593484846040518463ffffffff1660e01b815260040161369d929190615b20565b6000604051808303818588803b1580156136b657600080fd5b505af11580156136ca573d6000803e3d6000fd5b5050505050505050565b606c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61370261383b565b73ffffffffffffffffffffffffffffffffffffffff16613720612708565b73ffffffffffffffffffffffffffffffffffffffff1614613776576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161376d90615506565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156137e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137dd90615bc9565b60405180910390fd5b6137ef81613f29565b50565b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600033905090565b60008061384e613977565b73ffffffffffffffffffffffffffffffffffffffff16632c3b7916846040518263ffffffff1660e01b81526004016138869190614cd4565b602060405180830381865afa1580156138a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138c791906151f5565b905060006138d3613977565b73ffffffffffffffffffffffffffffffffffffffff1663dedafeae856040518263ffffffff1660e01b815260040161390b9190614cd4565b602060405180830381865afa158015613928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061394c91906151f5565b90508082101561396157600092505050613972565b808261396d91906155a5565b925050505b919050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed6040516020016139c690615c40565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016139f89190614d08565b602060405180830381865afa158015613a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a399190615c6a565b905090565b6060806000613a4c8661083e565b90506000811415613a89576040517fc60050c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606080600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614613b7657606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c650b5f88858b8a6040518563ffffffff1660e01b8152600401613b219493929190615c97565b6000604051808303816000875af1158015613b40573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190613b699190615e62565b8092508193505050613c22565b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166336691a41846040518263ffffffff1660e01b8152600401613bd191906149ee565b6000604051808303816000875af1158015613bf0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190613c199190615e62565b80925081935050505b818194509450505050935093915050565b6000613c617f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6146b0565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b613c9261383b565b73ffffffffffffffffffffffffffffffffffffffff16613cb0612708565b73ffffffffffffffffffffffffffffffffffffffff1614613d06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613cfd90615506565b60405180910390fd5b50565b6000613d13613c33565b9050613d1e846146ba565b600083511180613d2b5750815b15613d3c57613d3a8484614773565b505b6000613d6a7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6147a0565b90508060000160009054906101000a900460ff16613ed35760018160000160006101000a81548160ff021916908315150217905550613e368583604051602401613db49190614cd4565b6040516020818303038152906040527f3659cfe6000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614773565b5060008160000160006101000a81548160ff021916908315150217905550613e5c613c33565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613ec9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ec090615f4c565b60405180910390fd5b613ed2856147aa565b5b5050505050565b600060017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c613f0c91906155a5565b60001b90508181555050565b6000613f2330613818565b15905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600060019054906101000a900460ff1661403e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161403590615fde565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156140bb5761ce10606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506140fd565b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600081831061410f5781614111565b825b905092915050565b6000600167ffffffffffffffff81111561413657614135614d79565b5b6040519080825280602002602001820160405280156141645781602001602082028036833780820191505090505b5090506000600167ffffffffffffffff81111561418457614183614d79565b5b6040519080825280602002602001820160405280156141b25781602001602082028036833780820191505090505b5090506000600167ffffffffffffffff8111156141d2576141d1614d79565b5b6040519080825280602002602001820160405280156142005781602001602082028036833780820191505090505b5090506000600167ffffffffffffffff8111156142205761421f614d79565b5b60405190808252806020026020018201604052801561424e5781602001602082028036833780820191505090505b509050868460008151811061426657614265615ffe565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505084826000815181106142b5576142b4615ffe565b5b60200260200101818152505085836000815181106142d6576142d5615ffe565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508160008151811061432457614323615ffe565b5b6020026020010151816000815181106143405761433f615ffe565b5b602002602001018181525050606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f380ade3858486856040518563ffffffff1660e01b81526004016143ad949392919061602d565b600060405180830381600087803b1580156143c757600080fd5b505af11580156143db573d6000803e3d6000fd5b5050505050505050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156144215761442d565b61442c8383836147f9565b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614499576040517f0855380c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c6144cb91906155a5565b60001b90508181557fd11d57c2c7468878b1035df11c670bcd0091aa840bf8aa166365397622237bea826040516145029190614cd4565b60405180910390a15050565b606080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146145f957606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cd1528588487876040518463ffffffff1660e01b81526004016145a493929190615989565b6000604051808303816000875af11580156145c3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906145ec9190615e62565b80925081935050506146a8565b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e0cd8d278660006040518363ffffffff1660e01b815260040161465792919061608e565b6000604051808303816000875af1158015614676573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061469f9190615e62565b80925081935050505b935093915050565b6000819050919050565b6146c381614821565b614702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016146f990616129565b60405180910390fd5b8061472f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6146b0565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606061479883836040518060600160405280602781526020016162d360279139614834565b905092915050565b6000819050919050565b6147b3816146ba565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b61480581846001613a3e565b505061481a6148138261083e565b828461450e565b5050505050565b600080823b905060008111915050919050565b606061483f84614821565b61487e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614875906161bb565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516148a69190616255565b600060405180830381855af49150503d80600081146148e1576040519150601f19603f3d011682016040523d82523d6000602084013e6148e6565b606091505b50915091506148f6828286614901565b925050509392505050565b6060831561491157829050614961565b6000835111156149245782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161495891906162b0565b60405180910390fd5b9392505050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61498f8161497c565b811461499a57600080fd5b50565b6000813590506149ac81614986565b92915050565b6000602082840312156149c8576149c7614972565b5b60006149d68482850161499d565b91505092915050565b6149e88161497c565b82525050565b6000602082019050614a0360008301846149df565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112614a2e57614a2d614a09565b5b8235905067ffffffffffffffff811115614a4b57614a4a614a0e565b5b602083019150836020820283011115614a6757614a66614a13565b5b9250929050565b60008083601f840112614a8457614a83614a09565b5b8235905067ffffffffffffffff811115614aa157614aa0614a0e565b5b602083019150836020820283011115614abd57614abc614a13565b5b9250929050565b6000806000806000806000806080898b031215614ae457614ae3614972565b5b600089013567ffffffffffffffff811115614b0257614b01614977565b5b614b0e8b828c01614a18565b9850985050602089013567ffffffffffffffff811115614b3157614b30614977565b5b614b3d8b828c01614a18565b9650965050604089013567ffffffffffffffff811115614b6057614b5f614977565b5b614b6c8b828c01614a6e565b9450945050606089013567ffffffffffffffff811115614b8f57614b8e614977565b5b614b9b8b828c01614a6e565b92509250509295985092959890939650565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000614bd882614bad565b9050919050565b614be881614bcd565b8114614bf357600080fd5b50565b600081359050614c0581614bdf565b92915050565b60008060008060008060c08789031215614c2857614c27614972565b5b6000614c3689828a01614bf6565b9650506020614c4789828a01614bf6565b9550506040614c5889828a01614bf6565b9450506060614c6989828a01614bf6565b9350506080614c7a89828a01614bf6565b92505060a0614c8b89828a01614bf6565b9150509295509295509295565b600060208284031215614cae57614cad614972565b5b6000614cbc84828501614bf6565b91505092915050565b614cce81614bcd565b82525050565b6000602082019050614ce96000830184614cc5565b92915050565b6000819050919050565b614d0281614cef565b82525050565b6000602082019050614d1d6000830184614cf9565b92915050565b60008060408385031215614d3a57614d39614972565b5b6000614d4885828601614bf6565b9250506020614d5985828601614bf6565b9150509250929050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b614db182614d68565b810181811067ffffffffffffffff82111715614dd057614dcf614d79565b5b80604052505050565b6000614de3614968565b9050614def8282614da8565b919050565b600067ffffffffffffffff821115614e0f57614e0e614d79565b5b614e1882614d68565b9050602081019050919050565b82818337600083830152505050565b6000614e47614e4284614df4565b614dd9565b905082815260208101848484011115614e6357614e62614d63565b5b614e6e848285614e25565b509392505050565b600082601f830112614e8b57614e8a614a09565b5b8135614e9b848260208601614e34565b91505092915050565b60008060408385031215614ebb57614eba614972565b5b6000614ec985828601614bf6565b925050602083013567ffffffffffffffff811115614eea57614ee9614977565b5b614ef685828601614e76565b9150509250929050565b6000608082019050614f1560008301876149df565b614f2260208301866149df565b614f2f60408301856149df565b614f3c60608301846149df565b95945050505050565b6000819050919050565b6000614f6a614f65614f6084614bad565b614f45565b614bad565b9050919050565b6000614f7c82614f4f565b9050919050565b6000614f8e82614f71565b9050919050565b614f9e81614f83565b82525050565b6000602082019050614fb96000830184614f95565b92915050565b6000604082019050614fd460008301856149df565b614fe160208301846149df565b9392505050565b6000614ff382614f71565b9050919050565b61500381614fe8565b82525050565b600060208201905061501e6000830184614ffa565b92915050565b6000806040838503121561503b5761503a614972565b5b60006150498582860161499d565b925050602061505a8582860161499d565b9150509250929050565b60008115159050919050565b61507981615064565b82525050565b60006020820190506150946000830184615070565b92915050565b600080600080600060a086880312156150b6576150b5614972565b5b60006150c48882890161499d565b95505060206150d58882890161499d565b94505060406150e68882890161499d565b93505060606150f78882890161499d565b92505060806151088882890161499d565b9150509295509295909350565b60008060006060848603121561512e5761512d614972565b5b600061513c86828701614bf6565b935050602061514d86828701614bf6565b925050604061515e8682870161499d565b9150509250925092565b600061517382614f71565b9050919050565b61518381615168565b82525050565b600060208201905061519e600083018461517a565b92915050565b60006151af82614f71565b9050919050565b6151bf816151a4565b82525050565b60006020820190506151da60008301846151b6565b92915050565b6000815190506151ef81614986565b92915050565b60006020828403121561520b5761520a614972565b5b6000615219848285016151e0565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061525c8261497c565b91506152678361497c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156152a05761529f615222565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006152e58261497c565b91506152f08361497c565b925082615300576152ff6152ab565b5b828204905092915050565b600082825260208201905092915050565b6000819050919050565b61532f81614bcd565b82525050565b60006153418383615326565b60208301905092915050565b600061535c6020840184614bf6565b905092915050565b6000602082019050919050565b600061537d838561530b565b93506153888261531c565b8060005b858110156153c15761539e828461534d565b6153a88882615335565b97506153b383615364565b92505060018101905061538c565b5085925050509392505050565b600082825260208201905092915050565b600080fd5b60006153f083856153ce565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115615423576154226153df565b5b602083029250615434838584614e25565b82840190509392505050565b6000608082019050818103600083015261545b818a8c615371565b9050818103602083015261547081888a6153e4565b90508181036040830152615485818688615371565b9050818103606083015261549a8184866153e4565b90509998505050505050505050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006154f06020836154a9565b91506154fb826154ba565b602082019050919050565b6000602082019050818103600083015261551f816154e3565b9050919050565b600060408201905061553b6000830185614cc5565b6155486020830184614cc5565b9392505050565b600061555a8261497c565b91506155658361497c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561559a57615599615222565b5b828201905092915050565b60006155b08261497c565b91506155bb8361497c565b9250828210156155ce576155cd615222565b5b828203905092915050565b600081519050919050565b6000819050602082019050919050565b6000602082019050919050565b600061560c826155d9565b615616818561530b565b9350615621836155e4565b8060005b838110156156525781516156398882615335565b9750615644836155f4565b925050600181019050615625565b5085935050505092915050565b600081519050919050565b6000819050602082019050919050565b6156838161497c565b82525050565b6000615695838361567a565b60208301905092915050565b6000602082019050919050565b60006156b98261565f565b6156c381856153ce565b93506156ce8361566a565b8060005b838110156156ff5781516156e68882615689565b97506156f1836156a1565b9250506001810190506156d2565b5085935050505092915050565b60006060820190506157216000830186614cc5565b81810360208301526157338185615601565b9050818103604083015261574781846156ae565b9050949350505050565b60006040820190506157666000830185614cc5565b61577360208301846149df565b9392505050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b60006157d6602c836154a9565b91506157e18261577a565b604082019050919050565b60006020820190508181036000830152615805816157c9565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b6000615868602c836154a9565b91506158738261580c565b604082019050919050565b600060208201905081810360008301526158978161585b565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b60006158fa602e836154a9565b91506159058261589e565b604082019050919050565b60006020820190508181036000830152615929816158ed565b9050919050565b61593981615064565b811461594457600080fd5b50565b60008151905061595681615930565b92915050565b60006020828403121561597257615971614972565b5b600061598084828501615947565b91505092915050565b600060608201905061599e6000830186614cc5565b6159ab60208301856149df565b6159b860408301846149df565b949350505050565b6000806000606084860312156159d9576159d8614972565b5b60006159e7868287016151e0565b93505060206159f8868287016151e0565b9250506040615a09868287016151e0565b9150509250925092565b600060a082019050615a2860008301886149df565b615a3560208301876149df565b615a4260408301866149df565b615a4f60608301856149df565b615a5c60808301846149df565b9695505050505050565b600060a082019050615a7b6000830188614cc5565b615a8860208301876149df565b615a9560408301866149df565b615aa260608301856149df565b615aaf60808301846149df565b9695505050505050565b60008060008060808587031215615ad357615ad2614972565b5b6000615ae1878288016151e0565b9450506020615af2878288016151e0565b9350506040615b03878288016151e0565b9250506060615b14878288016151e0565b91505092959194509250565b60006040820190508181036000830152615b3a8185615601565b90508181036020830152615b4e81846156ae565b90509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615bb36026836154a9565b9150615bbe82615b57565b604082019050919050565b60006020820190508181036000830152615be281615ba6565b9050919050565b600081905092915050565b7f456c656374696f6e000000000000000000000000000000000000000000000000600082015250565b6000615c2a600883615be9565b9150615c3582615bf4565b600882019050919050565b6000615c4b82615c1d565b9150819050919050565b600081519050615c6481614bdf565b92915050565b600060208284031215615c8057615c7f614972565b5b6000615c8e84828501615c55565b91505092915050565b6000608082019050615cac6000830187614cc5565b615cb960208301866149df565b615cc660408301856149df565b615cd36060830184615070565b95945050505050565b600067ffffffffffffffff821115615cf757615cf6614d79565b5b602082029050602081019050919050565b6000615d1b615d1684615cdc565b614dd9565b90508083825260208201905060208402830185811115615d3e57615d3d614a13565b5b835b81811015615d675780615d538882615c55565b845260208401935050602081019050615d40565b5050509392505050565b600082601f830112615d8657615d85614a09565b5b8151615d96848260208601615d08565b91505092915050565b600067ffffffffffffffff821115615dba57615db9614d79565b5b602082029050602081019050919050565b6000615dde615dd984615d9f565b614dd9565b90508083825260208201905060208402830185811115615e0157615e00614a13565b5b835b81811015615e2a5780615e1688826151e0565b845260208401935050602081019050615e03565b5050509392505050565b600082601f830112615e4957615e48614a09565b5b8151615e59848260208601615dcb565b91505092915050565b60008060408385031215615e7957615e78614972565b5b600083015167ffffffffffffffff811115615e9757615e96614977565b5b615ea385828601615d71565b925050602083015167ffffffffffffffff811115615ec457615ec3614977565b5b615ed085828601615e34565b9150509250929050565b7f45524331393637557067726164653a207570677261646520627265616b73206660008201527f7572746865722075706772616465730000000000000000000000000000000000602082015250565b6000615f36602f836154a9565b9150615f4182615eda565b604082019050919050565b60006020820190508181036000830152615f6581615f29565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000615fc8602b836154a9565b9150615fd382615f6c565b604082019050919050565b60006020820190508181036000830152615ff781615fbb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060808201905081810360008301526160478187615601565b9050818103602083015261605b81866156ae565b9050818103604083015261606f8185615601565b9050818103606083015261608381846156ae565b905095945050505050565b60006040820190506160a360008301856149df565b6160b06020830184614cc5565b9392505050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b6000616113602d836154a9565b915061611e826160b7565b604082019050919050565b6000602082019050818103600083015261614281616106565b9050919050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b60006161a56026836154a9565b91506161b082616149565b604082019050919050565b600060208201905081810360008301526161d481616198565b9050919050565b600081519050919050565b600081905092915050565b60005b8381101561620f5780820151818401526020810190506161f4565b8381111561621e576000848401525b50505050565b600061622f826161db565b61623981856161e6565b93506162498185602086016161f1565b80840191505092915050565b60006162618284616224565b915081905092915050565b600081519050919050565b60006162828261626c565b61628c81856154a9565b935061629c8185602086016161f1565b6162a581614d68565b840191505092915050565b600060208201905081810360008301526162ca8184616277565b90509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a236f5c0b776c30fd5a348999bf3477c7fe661114c59f5915d078afd24cd470964736f6c634300080b0033
Deployed ByteCode
0x60806040526004361061021a5760003560e01c80637c0d530f11610123578063b187bd26116100ab578063cf009f7a1161006f578063cf009f7a1461078a578063d0e30db0146107b5578063ee183c4a146107bf578063f2fde38b146107ea578063fac5bb9b146108135761021a565b8063b187bd26146106a7578063bc4d3bb3146106d2578063beabacc8146106fb578063c494ec1e14610724578063ce7a60ab146107615761021a565b80639468ba0e116100f25780639468ba0e146105bf5780639fd0506d146105ea578063a0fefe2514610615578063a3f16ef114610653578063b0ef81de1461067e5761021a565b80637c0d530f1461053d5780637e72dd66146105545780638456cb591461057d5780638da5cb5b146105945761021a565b8063485cc955116101a657806354255be01161017557806354255be01461047b5780636fe958d8146104a9578063715018a6146104d25780637a9024bd146104e95780637b103999146105125761021a565b8063485cc955146103bc57806348fd6ea6146103e55780634e4e5efb146104225780634f1ef2861461045f5761021a565b80632e1a7d4d116101ed5780632e1a7d4d146102eb5780633659cfe61461031457806339ebf8231461033d5780633cbf58721461037a5780633f4ba83a146103a55761021a565b80630567847f1461021f5780630c4d4e401461025c578063114e6b37146102855780632c431058146102ae575b600080fd5b34801561022b57600080fd5b50610246600480360381019061024191906149b2565b61083e565b60405161025391906149ee565b60405180910390f35b34801561026857600080fd5b50610283600480360381019061027e9190614ac4565b6109a8565b005b34801561029157600080fd5b506102ac60048036038101906102a79190614c0b565b610b3b565b005b3480156102ba57600080fd5b506102d560048036038101906102d09190614c98565b610f02565b6040516102e291906149ee565b60405180910390f35b3480156102f757600080fd5b50610312600480360381019061030d91906149b2565b6110a5565b005b34801561032057600080fd5b5061033b60048036038101906103369190614c98565b61127b565b005b34801561034957600080fd5b50610364600480360381019061035f9190614c98565b611404565b6040516103719190614cd4565b60405180910390f35b34801561038657600080fd5b5061038f611437565b60405161039c9190614d08565b60405180910390f35b3480156103b157600080fd5b506103ba61146d565b005b3480156103c857600080fd5b506103e360048036038101906103de9190614d23565b611511565b005b3480156103f157600080fd5b5061040c60048036038101906104079190614c98565b611609565b60405161041991906149ee565b60405180910390f35b34801561042e57600080fd5b5061044960048036038101906104449190614c98565b6116f5565b6040516104569190614cd4565b60405180910390f35b61047960048036038101906104749190614ea4565b6118ec565b005b34801561048757600080fd5b50610490611a29565b6040516104a09493929190614f00565b60405180910390f35b3480156104b557600080fd5b506104d060048036038101906104cb9190614d23565b611a45565b005b3480156104de57600080fd5b506104e7611d4c565b005b3480156104f557600080fd5b50610510600480360381019061050b9190614c98565b611dd4565b005b34801561051e57600080fd5b506105276121a6565b6040516105349190614fa4565b60405180910390f35b34801561054957600080fd5b506105526121cc565b005b34801561056057600080fd5b5061057b60048036038101906105769190614d23565b61225a565b005b34801561058957600080fd5b50610592612664565b005b3480156105a057600080fd5b506105a9612708565b6040516105b69190614cd4565b60405180910390f35b3480156105cb57600080fd5b506105d4612732565b6040516105e19190614d08565b60405180910390f35b3480156105f657600080fd5b506105ff612768565b60405161060c9190614cd4565b60405180910390f35b34801561062157600080fd5b5061063c60048036038101906106379190614c98565b6127ae565b60405161064a929190614fbf565b60405180910390f35b34801561065f57600080fd5b50610668612d53565b6040516106759190615009565b60405180910390f35b34801561068a57600080fd5b506106a560048036038101906106a09190615024565b612d79565b005b3480156106b357600080fd5b506106bc612f05565b6040516106c9919061507f565b60405180910390f35b3480156106de57600080fd5b506106f960048036038101906106f4919061509a565b612f4b565b005b34801561070757600080fd5b50610722600480360381019061071d9190615115565b613173565b005b34801561073057600080fd5b5061074b600480360381019061074691906149b2565b6132d3565b60405161075891906149ee565b60405180910390f35b34801561076d57600080fd5b5061078860048036038101906107839190614c98565b61343d565b005b34801561079657600080fd5b5061079f6134cd565b6040516107ac9190615189565b60405180910390f35b6107bd6134f3565b005b3480156107cb57600080fd5b506107d46136d4565b6040516107e19190614cd4565b60405180910390f35b3480156107f657600080fd5b50610811600480360381019061080c9190614c98565b6136fa565b005b34801561081f57600080fd5b506108286137f2565b60405161083591906151c5565b60405180910390f35b600080606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d291906151f5565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301d2b6ea6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610943573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096791906151f5565b905060008214806109785750600081145b156109875783925050506109a3565b8181856109949190615251565b61099e91906152da565b925050505b919050565b3373ffffffffffffffffffffffffffffffffffffffff16606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015610a5457503373ffffffffffffffffffffffffffffffffffffffff16606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15610a9657336040517ff7eb25ef000000000000000000000000000000000000000000000000000000008152600401610a8d9190614cd4565b60405180910390fd5b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f380ade3898987878b8b89896040518963ffffffff1660e01b8152600401610aff989796959493929190615440565b600060405180830381600087803b158015610b1957600080fd5b505af1158015610b2d573d6000803e3d6000fd5b505050505050505050505050565b610b4361383b565b73ffffffffffffffffffffffffffffffffffffffff16610b61612708565b73ffffffffffffffffffffffffffffffffffffffff1614610bb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bae90615506565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480610c1e5750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80610c555750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80610c8c5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80610cc35750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80610cfa5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610d31576040517f0855380c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083606c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082606d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081606e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080606f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff167f77001ab3bb5b4e91a2a4021cec272d6505154d5ff1fb2e8426752b15bd8ef16d60405160405180910390a2505050505050565b600080610f0e83613843565b90506000811415610f235760009150506110a0565b6000610f2d613977565b73ffffffffffffffffffffffffffffffffffffffff16633861727285606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401610f89929190615526565b602060405180830381865afa158015610fa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fca91906151f5565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663acd201d0866040518263ffffffff1660e01b81526004016110299190614cd4565b602060405180830381865afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a91906151f5565b90508183611078919061554f565b92508083101561108e57600093505050506110a0565b808361109a91906155a5565b93505050505b919050565b6110ad612f05565b156110e4576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061115283607060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000613a3e565b91509150606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f842a1a3384846040518463ffffffff1660e01b81526004016111b59392919061570c565b600060405180830381600087803b1580156111cf57600080fd5b505af11580156111e3573d6000803e3d6000fd5b50505050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac33856040518363ffffffff1660e01b8152600401611244929190615751565b600060405180830381600087803b15801561125e57600080fd5b505af1158015611272573d6000803e3d6000fd5b50505050505050565b7f00000000000000000000000046755b3e1841683c6925b3c710ffbf7fdf60122773ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561130a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611301906157ec565b60405180910390fd5b7f00000000000000000000000046755b3e1841683c6925b3c710ffbf7fdf60122773ffffffffffffffffffffffffffffffffffffffff16611349613c33565b73ffffffffffffffffffffffffffffffffffffffff161461139f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113969061587e565b60405180910390fd5b6113a881613c8a565b61140181600067ffffffffffffffff8111156113c7576113c6614d79565b5b6040519080825280601f01601f1916602001820160405280156113f95781602001600182028036833780820191505090505b506000613d09565b50565b60706020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c61146791906155a5565b60001b81565b611475612768565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114d9576040517f75df51dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114e36000613eda565b7f0e5e3b3fb504c22cf5c42fa07d521225937514c654007e1f12646f89768d6f9460405160405180910390a1565b600060019054906101000a900460ff166115395760008054906101000a900460ff1615611542565b611541613f18565b5b611581576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157890615910565b60405180910390fd5b60008060019054906101000a900460ff1615905080156115d1576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6115da82613f29565b6115e383613fef565b80156116045760008060016101000a81548160ff0219169083151502179055505b505050565b6000611613612f05565b1561164a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000606c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166348fd6ea6846040518263ffffffff1660e01b81526004016116aa9190614cd4565b6020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed91906151f5565b915050919050565b600080607060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156118d35750606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cc222f8d826040518263ffffffff1660e01b81526004016117ed9190614cd4565b602060405180830381865afa15801561180a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182e919061595c565b806118d25750606d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ac8f4425826040518263ffffffff1660e01b815260040161188f9190614cd4565b602060405180830381865afa1580156118ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d0919061595c565b155b5b156118e25760009150506118e7565b809150505b919050565b7f00000000000000000000000046755b3e1841683c6925b3c710ffbf7fdf60122773ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561197b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611972906157ec565b60405180910390fd5b7f00000000000000000000000046755b3e1841683c6925b3c710ffbf7fdf60122773ffffffffffffffffffffffffffffffffffffffff166119ba613c33565b73ffffffffffffffffffffffffffffffffffffffff1614611a10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a079061587e565b60405180910390fd5b611a1982613c8a565b611a2582826001613d09565b5050565b6000806000806001600360016000935093509350935090919293565b611a4d612f05565b15611a84576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639f8a13d7826040518263ffffffff1660e01b8152600401611adf9190614cd4565b602060405180830381865afa158015611afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b20919061595c565b158015611bc55750606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cc222f8d826040518263ffffffff1660e01b8152600401611b839190614cd4565b602060405180830381865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc4919061595c565b5b15611c0757806040517f5a081584000000000000000000000000000000000000000000000000000000008152600401611bfe9190614cd4565b60405180910390fd5b600080611c13846127ae565b91509150818111611c5f578381836040517f2c4f8ec8000000000000000000000000000000000000000000000000000000008152600401611c5693929190615989565b60405180910390fd5b600080611c6b856127ae565b91509150818110611cb7578481836040517fb0006ace000000000000000000000000000000000000000000000000000000008152600401611cae93929190615989565b60405180910390fd5b6000611cc286610f02565b90506000811415611d0a57856040517fb9183a08000000000000000000000000000000000000000000000000000000008152600401611d019190614cd4565b60405180910390fd5b6000611d35611d2f8787611d1e91906155a5565b8587611d2a91906155a5565b614100565b83614100565b9050611d42888883614119565b5050505050505050565b611d5461383b565b73ffffffffffffffffffffffffffffffffffffffff16611d72612708565b73ffffffffffffffffffffffffffffffffffffffff1614611dc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dbf90615506565b60405180910390fd5b611dd26000613f29565b565b611ddc612f05565b15611e13576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015611f8c5750606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cc222f8d826040518263ffffffff1660e01b8152600401611ea69190614cd4565b602060405180830381865afa158015611ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee7919061595c565b80611f8b5750606d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ac8f4425826040518263ffffffff1660e01b8152600401611f489190614cd4565b602060405180830381865afa158015611f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f89919061595c565b155b5b15611fce57806040517f10a7bc6b000000000000000000000000000000000000000000000000000000008152600401611fc59190614cd4565b60405180910390fd5b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b815260040161202b9190614cd4565b602060405180830381865afa158015612048573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206c91906151f5565b9050600081146120e1576120e0607060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683836143e8565b5b81607060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167fafd1cdc355e15bfc9038294be1c6203ce953704fda8c991bebe78ddd4d5420d160405160405180910390a25050565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6121d461383b565b73ffffffffffffffffffffffffffffffffffffffff166121f2612708565b73ffffffffffffffffffffffffffffffffffffffff1614612248576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223f90615506565b60405180910390fd5b612258612253612708565b614432565b565b612262612f05565b15612299576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639f8a13d7826040518263ffffffff1660e01b81526004016122f49190614cd4565b602060405180830381865afa158015612311573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612335919061595c565b61237657806040517f5a08158400000000000000000000000000000000000000000000000000000000815260040161236d9190614cd4565b60405180910390fd5b600061238183613843565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b09bdc5e856040518263ffffffff1660e01b81526004016123e09190614cd4565b602060405180830381865afa1580156123fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061242191906151f5565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166322e59bd4866040518263ffffffff1660e01b815260040161247c9190614cd4565b602060405180830381865afa158015612499573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bd91906151f5565b6124c7919061554f565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635fd5c95e866040518263ffffffff1660e01b81526004016125269190614cd4565b602060405180830381865afa158015612543573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256791906151f5565b90506000828211612579576000612586565b828261258591906155a5565b5b905060008482116125985760006125a5565b84826125a491906155a5565b5b905060008114156125ed57866040517f1eeadf530000000000000000000000000000000000000000000000000000000081526004016125e49190614cd4565b60405180910390fd5b60006125f887610f02565b9050600081141561264057866040517fb9183a080000000000000000000000000000000000000000000000000000000081526004016126379190614cd4565b60405180910390fd5b600061264c8383614100565b9050612659898983614119565b505050505050505050565b61266c612768565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146126d0576040517f75df51dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126da6001613eda565b7fab35696f06e428ebc5ceba8cd17f8fed287baf43440206d1943af1ee53e6d26760405160405180910390a1565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c61276291906155a5565b60001b81565b600080600060017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c61279d91906155a5565b60001b905080549150819250505090565b6000806000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635fd5c95e856040518263ffffffff1660e01b815260040161280e9190614cd4565b602060405180830381865afa15801561282b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284f91906151f5565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f8171927866040518263ffffffff1660e01b81526004016128aa9190614cd4565b602060405180830381865afa1580156128c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128eb91906151f5565b6128f5919061554f565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b09bdc5e866040518263ffffffff1660e01b81526004016129549190614cd4565b602060405180830381865afa158015612971573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299591906151f5565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166322e59bd4876040518263ffffffff1660e01b81526004016129f09190614cd4565b602060405180830381865afa158015612a0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a3191906151f5565b612a3b919061554f565b905081811115612a5e578181612a5191906155a5565b6000935093505050612d4e565b8082612a6a91906155a5565b92506000606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cc222f8d876040518263ffffffff1660e01b8152600401612ac99190614cd4565b602060405180830381865afa158015612ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b0a919061595c565b1590506000606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639f8a13d7886040518263ffffffff1660e01b8152600401612b6a9190614cd4565b602060405180830381865afa158015612b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bab919061595c565b90506000808315612c8c57600080606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166356ab819f8c6040518263ffffffff1660e01b8152600401612c149190614cd4565b606060405180830381865afa158015612c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c5591906159c0565b80935081945082965050505060008183612c6f919061554f565b9050612c7b8582614100565b85612c8691906155a5565b94505050505b8215612d3157606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166385a92cb78a6040518263ffffffff1660e01b8152600401612ced9190614cd4565b602060405180830381865afa158015612d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2e91906151f5565b90505b612d458183612d40919061554f565b61083e565b97505050505050505b915091565b606d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b612d81612f05565b15612db8576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000606c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008060008373ffffffffffffffffffffffffffffffffffffffff1663c40da15c33886040518363ffffffff1660e01b8152600401612e1f929190615751565b6060604051808303816000875af1158015612e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6291906159c0565b925092509250606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632edfd12e87878686866040518663ffffffff1660e01b8152600401612ecb959493929190615a13565b600060405180830381600087803b158015612ee557600080fd5b505af1158015612ef9573d6000803e3d6000fd5b50505050505050505050565b600080600060017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c612f3a91906155a5565b60001b905080549150819250505090565b612f53612f05565b15612f8a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000606c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000806000808473ffffffffffffffffffffffffffffffffffffffff16634c23f22e338c8b8b8b6040518663ffffffff1660e01b8152600401612ff8959493929190615a66565b6080604051808303816000875af1158015613017573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061303b9190615ab9565b9350935093509350606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639caa9e2933866040518363ffffffff1660e01b81526004016130a0929190615751565b600060405180830381600087803b1580156130ba57600080fd5b505af11580156130ce573d6000803e3d6000fd5b50505050606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632edfd12e8b8b8686866040518663ffffffff1660e01b8152600401613135959493929190615a13565b600060405180830381600087803b15801561314f57600080fd5b505af1158015613163573d6000803e3d6000fd5b5050505050505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461320557336040517f4a653c6a0000000000000000000000000000000000000000000000000000000081526004016131fc9190614cd4565b60405180910390fd5b6132ce607060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16607060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836143e8565b505050565b600080606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613343573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061336791906151f5565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301d2b6ea6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133fc91906151f5565b9050600082148061340d5750600081145b1561341c578392505050613438565b8082856134299190615251565b61343391906152da565b925050505b919050565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e37d49b8826040518263ffffffff1660e01b81526004016134989190614cd4565b600060405180830381600087803b1580156134b257600080fd5b505af11580156134c6573d6000803e3d6000fd5b5050505050565b606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6134fb612f05565b15613532576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061353d346132d3565b90506000806135ac3484607060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661450e565b91509150606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1933856040518363ffffffff1660e01b815260040161360d929190615751565b600060405180830381600087803b15801561362757600080fd5b505af115801561363b573d6000803e3d6000fd5b50505050606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301c21d593484846040518463ffffffff1660e01b815260040161369d929190615b20565b6000604051808303818588803b1580156136b657600080fd5b505af11580156136ca573d6000803e3d6000fd5b5050505050505050565b606c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61370261383b565b73ffffffffffffffffffffffffffffffffffffffff16613720612708565b73ffffffffffffffffffffffffffffffffffffffff1614613776576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161376d90615506565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156137e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137dd90615bc9565b60405180910390fd5b6137ef81613f29565b50565b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600033905090565b60008061384e613977565b73ffffffffffffffffffffffffffffffffffffffff16632c3b7916846040518263ffffffff1660e01b81526004016138869190614cd4565b602060405180830381865afa1580156138a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138c791906151f5565b905060006138d3613977565b73ffffffffffffffffffffffffffffffffffffffff1663dedafeae856040518263ffffffff1660e01b815260040161390b9190614cd4565b602060405180830381865afa158015613928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061394c91906151f5565b90508082101561396157600092505050613972565b808261396d91906155a5565b925050505b919050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed6040516020016139c690615c40565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016139f89190614d08565b602060405180830381865afa158015613a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a399190615c6a565b905090565b6060806000613a4c8661083e565b90506000811415613a89576040517fc60050c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606080600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614613b7657606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c650b5f88858b8a6040518563ffffffff1660e01b8152600401613b219493929190615c97565b6000604051808303816000875af1158015613b40573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190613b699190615e62565b8092508193505050613c22565b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166336691a41846040518263ffffffff1660e01b8152600401613bd191906149ee565b6000604051808303816000875af1158015613bf0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190613c199190615e62565b80925081935050505b818194509450505050935093915050565b6000613c617f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6146b0565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b613c9261383b565b73ffffffffffffffffffffffffffffffffffffffff16613cb0612708565b73ffffffffffffffffffffffffffffffffffffffff1614613d06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613cfd90615506565b60405180910390fd5b50565b6000613d13613c33565b9050613d1e846146ba565b600083511180613d2b5750815b15613d3c57613d3a8484614773565b505b6000613d6a7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6147a0565b90508060000160009054906101000a900460ff16613ed35760018160000160006101000a81548160ff021916908315150217905550613e368583604051602401613db49190614cd4565b6040516020818303038152906040527f3659cfe6000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614773565b5060008160000160006101000a81548160ff021916908315150217905550613e5c613c33565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613ec9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ec090615f4c565b60405180910390fd5b613ed2856147aa565b5b5050505050565b600060017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c613f0c91906155a5565b60001b90508181555050565b6000613f2330613818565b15905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600060019054906101000a900460ff1661403e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161403590615fde565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156140bb5761ce10606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506140fd565b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600081831061410f5781614111565b825b905092915050565b6000600167ffffffffffffffff81111561413657614135614d79565b5b6040519080825280602002602001820160405280156141645781602001602082028036833780820191505090505b5090506000600167ffffffffffffffff81111561418457614183614d79565b5b6040519080825280602002602001820160405280156141b25781602001602082028036833780820191505090505b5090506000600167ffffffffffffffff8111156141d2576141d1614d79565b5b6040519080825280602002602001820160405280156142005781602001602082028036833780820191505090505b5090506000600167ffffffffffffffff8111156142205761421f614d79565b5b60405190808252806020026020018201604052801561424e5781602001602082028036833780820191505090505b509050868460008151811061426657614265615ffe565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505084826000815181106142b5576142b4615ffe565b5b60200260200101818152505085836000815181106142d6576142d5615ffe565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508160008151811061432457614323615ffe565b5b6020026020010151816000815181106143405761433f615ffe565b5b602002602001018181525050606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f380ade3858486856040518563ffffffff1660e01b81526004016143ad949392919061602d565b600060405180830381600087803b1580156143c757600080fd5b505af11580156143db573d6000803e3d6000fd5b5050505050505050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156144215761442d565b61442c8383836147f9565b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614499576040517f0855380c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c6144cb91906155a5565b60001b90508181557fd11d57c2c7468878b1035df11c670bcd0091aa840bf8aa166365397622237bea826040516145029190614cd4565b60405180910390a15050565b606080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146145f957606e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cd1528588487876040518463ffffffff1660e01b81526004016145a493929190615989565b6000604051808303816000875af11580156145c3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906145ec9190615e62565b80925081935050506146a8565b606f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e0cd8d278660006040518363ffffffff1660e01b815260040161465792919061608e565b6000604051808303816000875af1158015614676573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061469f9190615e62565b80925081935050505b935093915050565b6000819050919050565b6146c381614821565b614702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016146f990616129565b60405180910390fd5b8061472f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6146b0565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606061479883836040518060600160405280602781526020016162d360279139614834565b905092915050565b6000819050919050565b6147b3816146ba565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b61480581846001613a3e565b505061481a6148138261083e565b828461450e565b5050505050565b600080823b905060008111915050919050565b606061483f84614821565b61487e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614875906161bb565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516148a69190616255565b600060405180830381855af49150503d80600081146148e1576040519150601f19603f3d011682016040523d82523d6000602084013e6148e6565b606091505b50915091506148f6828286614901565b925050509392505050565b6060831561491157829050614961565b6000835111156149245782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161495891906162b0565b60405180910390fd5b9392505050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61498f8161497c565b811461499a57600080fd5b50565b6000813590506149ac81614986565b92915050565b6000602082840312156149c8576149c7614972565b5b60006149d68482850161499d565b91505092915050565b6149e88161497c565b82525050565b6000602082019050614a0360008301846149df565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112614a2e57614a2d614a09565b5b8235905067ffffffffffffffff811115614a4b57614a4a614a0e565b5b602083019150836020820283011115614a6757614a66614a13565b5b9250929050565b60008083601f840112614a8457614a83614a09565b5b8235905067ffffffffffffffff811115614aa157614aa0614a0e565b5b602083019150836020820283011115614abd57614abc614a13565b5b9250929050565b6000806000806000806000806080898b031215614ae457614ae3614972565b5b600089013567ffffffffffffffff811115614b0257614b01614977565b5b614b0e8b828c01614a18565b9850985050602089013567ffffffffffffffff811115614b3157614b30614977565b5b614b3d8b828c01614a18565b9650965050604089013567ffffffffffffffff811115614b6057614b5f614977565b5b614b6c8b828c01614a6e565b9450945050606089013567ffffffffffffffff811115614b8f57614b8e614977565b5b614b9b8b828c01614a6e565b92509250509295985092959890939650565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000614bd882614bad565b9050919050565b614be881614bcd565b8114614bf357600080fd5b50565b600081359050614c0581614bdf565b92915050565b60008060008060008060c08789031215614c2857614c27614972565b5b6000614c3689828a01614bf6565b9650506020614c4789828a01614bf6565b9550506040614c5889828a01614bf6565b9450506060614c6989828a01614bf6565b9350506080614c7a89828a01614bf6565b92505060a0614c8b89828a01614bf6565b9150509295509295509295565b600060208284031215614cae57614cad614972565b5b6000614cbc84828501614bf6565b91505092915050565b614cce81614bcd565b82525050565b6000602082019050614ce96000830184614cc5565b92915050565b6000819050919050565b614d0281614cef565b82525050565b6000602082019050614d1d6000830184614cf9565b92915050565b60008060408385031215614d3a57614d39614972565b5b6000614d4885828601614bf6565b9250506020614d5985828601614bf6565b9150509250929050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b614db182614d68565b810181811067ffffffffffffffff82111715614dd057614dcf614d79565b5b80604052505050565b6000614de3614968565b9050614def8282614da8565b919050565b600067ffffffffffffffff821115614e0f57614e0e614d79565b5b614e1882614d68565b9050602081019050919050565b82818337600083830152505050565b6000614e47614e4284614df4565b614dd9565b905082815260208101848484011115614e6357614e62614d63565b5b614e6e848285614e25565b509392505050565b600082601f830112614e8b57614e8a614a09565b5b8135614e9b848260208601614e34565b91505092915050565b60008060408385031215614ebb57614eba614972565b5b6000614ec985828601614bf6565b925050602083013567ffffffffffffffff811115614eea57614ee9614977565b5b614ef685828601614e76565b9150509250929050565b6000608082019050614f1560008301876149df565b614f2260208301866149df565b614f2f60408301856149df565b614f3c60608301846149df565b95945050505050565b6000819050919050565b6000614f6a614f65614f6084614bad565b614f45565b614bad565b9050919050565b6000614f7c82614f4f565b9050919050565b6000614f8e82614f71565b9050919050565b614f9e81614f83565b82525050565b6000602082019050614fb96000830184614f95565b92915050565b6000604082019050614fd460008301856149df565b614fe160208301846149df565b9392505050565b6000614ff382614f71565b9050919050565b61500381614fe8565b82525050565b600060208201905061501e6000830184614ffa565b92915050565b6000806040838503121561503b5761503a614972565b5b60006150498582860161499d565b925050602061505a8582860161499d565b9150509250929050565b60008115159050919050565b61507981615064565b82525050565b60006020820190506150946000830184615070565b92915050565b600080600080600060a086880312156150b6576150b5614972565b5b60006150c48882890161499d565b95505060206150d58882890161499d565b94505060406150e68882890161499d565b93505060606150f78882890161499d565b92505060806151088882890161499d565b9150509295509295909350565b60008060006060848603121561512e5761512d614972565b5b600061513c86828701614bf6565b935050602061514d86828701614bf6565b925050604061515e8682870161499d565b9150509250925092565b600061517382614f71565b9050919050565b61518381615168565b82525050565b600060208201905061519e600083018461517a565b92915050565b60006151af82614f71565b9050919050565b6151bf816151a4565b82525050565b60006020820190506151da60008301846151b6565b92915050565b6000815190506151ef81614986565b92915050565b60006020828403121561520b5761520a614972565b5b6000615219848285016151e0565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061525c8261497c565b91506152678361497c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156152a05761529f615222565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006152e58261497c565b91506152f08361497c565b925082615300576152ff6152ab565b5b828204905092915050565b600082825260208201905092915050565b6000819050919050565b61532f81614bcd565b82525050565b60006153418383615326565b60208301905092915050565b600061535c6020840184614bf6565b905092915050565b6000602082019050919050565b600061537d838561530b565b93506153888261531c565b8060005b858110156153c15761539e828461534d565b6153a88882615335565b97506153b383615364565b92505060018101905061538c565b5085925050509392505050565b600082825260208201905092915050565b600080fd5b60006153f083856153ce565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115615423576154226153df565b5b602083029250615434838584614e25565b82840190509392505050565b6000608082019050818103600083015261545b818a8c615371565b9050818103602083015261547081888a6153e4565b90508181036040830152615485818688615371565b9050818103606083015261549a8184866153e4565b90509998505050505050505050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006154f06020836154a9565b91506154fb826154ba565b602082019050919050565b6000602082019050818103600083015261551f816154e3565b9050919050565b600060408201905061553b6000830185614cc5565b6155486020830184614cc5565b9392505050565b600061555a8261497c565b91506155658361497c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561559a57615599615222565b5b828201905092915050565b60006155b08261497c565b91506155bb8361497c565b9250828210156155ce576155cd615222565b5b828203905092915050565b600081519050919050565b6000819050602082019050919050565b6000602082019050919050565b600061560c826155d9565b615616818561530b565b9350615621836155e4565b8060005b838110156156525781516156398882615335565b9750615644836155f4565b925050600181019050615625565b5085935050505092915050565b600081519050919050565b6000819050602082019050919050565b6156838161497c565b82525050565b6000615695838361567a565b60208301905092915050565b6000602082019050919050565b60006156b98261565f565b6156c381856153ce565b93506156ce8361566a565b8060005b838110156156ff5781516156e68882615689565b97506156f1836156a1565b9250506001810190506156d2565b5085935050505092915050565b60006060820190506157216000830186614cc5565b81810360208301526157338185615601565b9050818103604083015261574781846156ae565b9050949350505050565b60006040820190506157666000830185614cc5565b61577360208301846149df565b9392505050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b60006157d6602c836154a9565b91506157e18261577a565b604082019050919050565b60006020820190508181036000830152615805816157c9565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b6000615868602c836154a9565b91506158738261580c565b604082019050919050565b600060208201905081810360008301526158978161585b565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b60006158fa602e836154a9565b91506159058261589e565b604082019050919050565b60006020820190508181036000830152615929816158ed565b9050919050565b61593981615064565b811461594457600080fd5b50565b60008151905061595681615930565b92915050565b60006020828403121561597257615971614972565b5b600061598084828501615947565b91505092915050565b600060608201905061599e6000830186614cc5565b6159ab60208301856149df565b6159b860408301846149df565b949350505050565b6000806000606084860312156159d9576159d8614972565b5b60006159e7868287016151e0565b93505060206159f8868287016151e0565b9250506040615a09868287016151e0565b9150509250925092565b600060a082019050615a2860008301886149df565b615a3560208301876149df565b615a4260408301866149df565b615a4f60608301856149df565b615a5c60808301846149df565b9695505050505050565b600060a082019050615a7b6000830188614cc5565b615a8860208301876149df565b615a9560408301866149df565b615aa260608301856149df565b615aaf60808301846149df565b9695505050505050565b60008060008060808587031215615ad357615ad2614972565b5b6000615ae1878288016151e0565b9450506020615af2878288016151e0565b9350506040615b03878288016151e0565b9250506060615b14878288016151e0565b91505092959194509250565b60006040820190508181036000830152615b3a8185615601565b90508181036020830152615b4e81846156ae565b90509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615bb36026836154a9565b9150615bbe82615b57565b604082019050919050565b60006020820190508181036000830152615be281615ba6565b9050919050565b600081905092915050565b7f456c656374696f6e000000000000000000000000000000000000000000000000600082015250565b6000615c2a600883615be9565b9150615c3582615bf4565b600882019050919050565b6000615c4b82615c1d565b9150819050919050565b600081519050615c6481614bdf565b92915050565b600060208284031215615c8057615c7f614972565b5b6000615c8e84828501615c55565b91505092915050565b6000608082019050615cac6000830187614cc5565b615cb960208301866149df565b615cc660408301856149df565b615cd36060830184615070565b95945050505050565b600067ffffffffffffffff821115615cf757615cf6614d79565b5b602082029050602081019050919050565b6000615d1b615d1684615cdc565b614dd9565b90508083825260208201905060208402830185811115615d3e57615d3d614a13565b5b835b81811015615d675780615d538882615c55565b845260208401935050602081019050615d40565b5050509392505050565b600082601f830112615d8657615d85614a09565b5b8151615d96848260208601615d08565b91505092915050565b600067ffffffffffffffff821115615dba57615db9614d79565b5b602082029050602081019050919050565b6000615dde615dd984615d9f565b614dd9565b90508083825260208201905060208402830185811115615e0157615e00614a13565b5b835b81811015615e2a5780615e1688826151e0565b845260208401935050602081019050615e03565b5050509392505050565b600082601f830112615e4957615e48614a09565b5b8151615e59848260208601615dcb565b91505092915050565b60008060408385031215615e7957615e78614972565b5b600083015167ffffffffffffffff811115615e9757615e96614977565b5b615ea385828601615d71565b925050602083015167ffffffffffffffff811115615ec457615ec3614977565b5b615ed085828601615e34565b9150509250929050565b7f45524331393637557067726164653a207570677261646520627265616b73206660008201527f7572746865722075706772616465730000000000000000000000000000000000602082015250565b6000615f36602f836154a9565b9150615f4182615eda565b604082019050919050565b60006020820190508181036000830152615f6581615f29565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000615fc8602b836154a9565b9150615fd382615f6c565b604082019050919050565b60006020820190508181036000830152615ff781615fbb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060808201905081810360008301526160478187615601565b9050818103602083015261605b81866156ae565b9050818103604083015261606f8185615601565b9050818103606083015261608381846156ae565b905095945050505050565b60006040820190506160a360008301856149df565b6160b06020830184614cc5565b9392505050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b6000616113602d836154a9565b915061611e826160b7565b604082019050919050565b6000602082019050818103600083015261614281616106565b9050919050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b60006161a56026836154a9565b91506161b082616149565b604082019050919050565b600060208201905081810360008301526161d481616198565b9050919050565b600081519050919050565b600081905092915050565b60005b8381101561620f5780820151818401526020810190506161f4565b8381111561621e576000848401525b50505050565b600061622f826161db565b61623981856161e6565b93506162498185602086016161f1565b80840191505092915050565b60006162618284616224565b915081905092915050565b600081519050919050565b60006162828261626c565b61628c81856154a9565b935061629c8185602086016161f1565b6162a581614d68565b840191505092915050565b600060208201905081810360008301526162ca8184616277565b90509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a236f5c0b776c30fd5a348999bf3477c7fe661114c59f5915d078afd24cd470964736f6c634300080b0033