Address Details
contract

0x07550767a1604af3E504749E284792Ff30fb4a53

Contract Name
Account
Creator
0x5bc1c4–68a788 at 0x95ceec–f5952b
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
28903711
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
Account




Optimization enabled
false
Compiler version
v0.8.11+commit.d7f03943




EVM Version
istanbul




Verified at
2024-05-28T15:53:38.532875Z

contracts/Account.sol

// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.8.11;

import "@openzeppelin/contracts/utils/math/Math.sol";

import "./Managed.sol";
import "./common/UUPSOwnableUpgradeable.sol";
import "./common/UsingRegistryUpgradeable.sol";
import "./interfaces/IAccount.sol";
import "./Pausable.sol";

/**
 * @title A contract that facilitates voting on behalf of StakedCelo.sol.
 * @notice This contract depends on the Manager to decide how to distribute votes and how to
 * keep track of ownership of CELO voted via this contract.
 */
contract Account is UUPSOwnableUpgradeable, UsingRegistryUpgradeable, Managed, IAccount, Pausable {
    /**
     * @notice Used to keep track of a pending withdrawal. A similar data structure
     * exists within LockedGold.sol, but it only keeps track of pending withdrawals
     * by the msg.sender to the LockedGold contract.
     * Because this contract facilitates withdrawals for different beneficiaries,
     * this contract must keep track of which beneficiaries correspond to which
     * pending withdrawals to prevent someone from finalizing/taking a pending
     * withdrawal they did not create.
     * @param value The withdrawal amount.
     * @param timestamp The timestamp at which the withdrawal amount becomes available.
     */
    struct PendingWithdrawal {
        uint256 value;
        uint256 timestamp;
    }

    /**
     * @notice Used to keep track of CELO that is scheduled to be used for
     * voting or revoking for a validator group.
     * @param toVote Amount of CELO held by this contract intended to vote for a group.
     * @param toWithdraw Amount of CELO that's scheduled for withdrawal.
     * @param toWithdrawFor Amount of CELO that's scheduled for withdrawal grouped by beneficiary.
     * @param toRevoke Amount of CELO that's scheduled to be revoked.
     */
    struct ScheduledVotes {
        uint256 toVote;
        uint256 toWithdraw;
        mapping(address => uint256) toWithdrawFor;
        uint256 toRevoke;
    }
    /**
     * @notice Keyed by beneficiary address, the related array of pending withdrawals.
     * See `PendingWithdrawal` for more info.
     */
    mapping(address => PendingWithdrawal[]) public pendingWithdrawals;

    /**
     * @notice Keyed by validator group address, the ScheduledVotes struct
     * which holds the amount of CELO that's scheduled to vote, the amount
     * of CELO scheduled to be withdrawn, and the amount of CELO to be
     * withdrawn for each beneficiary.
     */
    mapping(address => ScheduledVotes) private scheduledVotes;

    /**
     * @notice Total amount of CELO scheduled to be withdrawn from all groups
     * by all beneficiaries.
     */
    uint256 public totalScheduledWithdrawals;

    /**
     * @notice Emitted when CELO is scheduled for voting for a given group.
     * @param group The validator group the CELO is intended to vote for.
     * @param amount The amount of CELO scheduled.
     */
    event VotesScheduled(address indexed group, uint256 amount);

    /**
     * @notice Emitted when CELO is scheduled to be revoked from a given group.
     * @param group The validator group the CELO is being revoked from.
     * @param amount The amount of CELO scheduled.
     */
    event RevocationScheduled(address indexed group, uint256 amount);

    /**
     * @notice Emitted when CELO withdrawal is scheduled for a group.
     * @param group The validator group the CELO is withdrawn from.
     * @param withdrawalAmount The amount of CELO requested for withdrawal.
     * @param beneficiary The user for whom the withdrawal amount is intended for.
     */
    event CeloWithdrawalScheduled(
        address indexed beneficiary,
        address indexed group,
        uint256 withdrawalAmount
    );

    /**
     * @notice Emitted when CELO withdrawal kicked off for group. Immediate withdrawals
     * are not included in this event, but can be identified by a GoldToken.sol transfer
     * from this contract.
     * @param group The validator group the CELO is withdrawn from.
     * @param withdrawalAmount The amount of CELO requested for withdrawal.
     * @param beneficiary The user for whom the withdrawal amount is intended for.
     */
    event CeloWithdrawalStarted(
        address indexed beneficiary,
        address indexed group,
        uint256 withdrawalAmount
    );

    /**
     * @notice Emitted when a CELO withdrawal completes for `beneficiary`.
     * @param beneficiary The user for whom the withdrawal amount is intended.
     * @param amount The amount of CELO requested for withdrawal.
     * @param timestamp The timestamp of the pending withdrawal.
     */
    event CeloWithdrawalFinished(address indexed beneficiary, uint256 amount, uint256 timestamp);

    /// @notice Used when the creation of an account with Accounts.sol fails.
    error AccountCreationFailed();

    /// @notice Used when arrays passed for scheduling votes don't have matching lengths.
    error GroupsAndVotesArrayLengthsMismatch();

    /**
     * @notice Used when the sum of votes per groups during vote scheduling
     * doesn't match the `msg.value` sent with the call.
     * @param sentValue The `msg.value` of the call.
     * @param expectedValue The expected sum of votes for groups.
     */
    error TotalVotesMismatch(uint256 sentValue, uint256 expectedValue);

    /// @notice Used when activating of pending votes via Election has failed.
    error ActivatePendingVotesFailed(address group);

    /// @notice Used when voting via Election has failed.
    error VoteFailed(address group, uint256 amount);

    /// @notice Used when call to Election.sol's `revokePendingVotes` fails.
    error RevokePendingFailed(address group, uint256 amount);

    /// @notice Used when call to Election.sol's `revokeActiveVotes` fails.
    error RevokeActiveFailed(address group, uint256 amount);

    /**
     * @notice Used when active + pending votes amount is unable to fulfil a
     * withdrawal request amount.
     */
    error InsufficientRevokableVotes(address group, uint256 amount);

    /// @notice Used when unable to transfer CELO.
    error CeloTransferFailed(address to, uint256 amount);

    /**
     * @notice Used when `pendingWithdrawalIndex` is too high for the
     * beneficiary's pending withdrawals array.
     */
    error PendingWithdrawalIndexTooHigh(
        uint256 pendingWithdrawalIndex,
        uint256 pendingWithdrawalsLength
    );

    /**
     * @notice Used when attempting to schedule more withdrawals
     * than CELO available to the contract.
     * @param group The offending group.
     * @param celoAvailable CELO available to the group across scheduled, pending and active votes.
     * @param celoToWindraw total amount of CELO that would be scheduled to be withdrawn.
     */
    error WithdrawalAmountTooHigh(address group, uint256 celoAvailable, uint256 celoToWindraw);

    /**
     * @notice Used when any of the resolved stakedCeloGroupVoter.pendingWithdrawal
     * values do not match the equivalent record in lockedGold.pendingWithdrawals.
     */
    error InconsistentPendingWithdrawalValues(
        uint256 localPendingWithdrawalValue,
        uint256 lockedGoldPendingWithdrawalValue
    );

    /**
     * @notice Used when any of the resolved stakedCeloGroupVoter.pendingWithdrawal
     * timestamps do not match the equivalent record in lockedGold.pendingWithdrawals.
     */
    error InconsistentPendingWithdrawalTimestamps(
        uint256 localPendingWithdrawalTimestamp,
        uint256 lockedGoldPendingWithdrawalTimestamp
    );

    /// @notice There's no amount of scheduled withdrawal for the given beneficiary and group.
    error NoScheduledWithdrawal(address beneficiary, address group);

    /// @notice Voting for proposal was not successfull.
    error VotingNotSuccessful(uint256 proposalId);

    /**
     * @notice Scheduling transfer was not successfull since
     * total amount of "from" and "to" are not the same.
     */
    error TransferAmountMisalignment();

    /**
     * @notice Empty constructor for proxy implementation, `initializer` modifer ensures the
     * implementation gets initialized.
     */
    // solhint-disable-next-line no-empty-blocks
    constructor() initializer {}

    // solhint-disable-next-line no-empty-blocks
    receive() external payable {}

    /**
     * @param _registry The address of the Celo Registry.
     * @param _manager The address of the Manager contract.
     * @param _owner The address of the contract owner.
     */
    function initialize(
        address _registry,
        address _manager,
        address _owner
    ) external initializer {
        __UsingRegistry_init(_registry);
        __Managed_init(_manager);
        _transferOwnership(_owner);

        // Create an account so this contract can vote.
        if (!getAccounts().createAccount()) {
            revert AccountCreationFailed();
        }
    }

    /**
     * @notice Sets that address permissioned to pause/unpause this contract to
     * the owner of this contract.
     */
    function setPauser() external onlyOwner {
        _setPauser(owner());
    }

    /**
     * @notice Deposits CELO sent via msg.value as unlocked CELO intended as
     * votes for groups.
     * @dev Only callable by the Manager contract, which must restrict which groups
     * gets CELO distribution.
     * @param groups The groups the deposited CELO is intended to vote for.
     * @param votes The amount of CELO to schedule for each respective group
     * from `groups`.
     */
    function scheduleVotes(address[] calldata groups, uint256[] calldata votes)
        external
        payable
        onlyManager
        onlyWhenNotPaused
    {
        if (groups.length != votes.length) {
            revert GroupsAndVotesArrayLengthsMismatch();
        }

        uint256 totalVotes;
        for (uint256 i = 0; i < groups.length; i++) {
            getAndUpdateToVoteAndToRevoke(groups[i], votes[i], 0);
            totalVotes += votes[i];
        }

        if (totalVotes != uint256(msg.value)) {
            revert TotalVotesMismatch(msg.value, totalVotes);
        }
    }

    /**
     * @notice Schedules votes which will be revoked from some groups and voted to others.
     * @dev Only callable by the Manager contract, which must restrict which groups are valid.
     * @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 group
     * from `toGroups`.
     */
    function scheduleTransfer(
        address[] calldata fromGroups,
        uint256[] calldata fromVotes,
        address[] calldata toGroups,
        uint256[] calldata toVotes
    ) external onlyManager onlyWhenNotPaused {
        if (fromGroups.length != fromVotes.length || toGroups.length != toVotes.length) {
            revert GroupsAndVotesArrayLengthsMismatch();
        }
        uint256 totalFromVotes;
        uint256 totalToVotes;

        for (uint256 i = 0; i < fromGroups.length; i++) {
            uint256 celoAvailableForGroup = getCeloForGroup(fromGroups[i]);

            if (celoAvailableForGroup < fromVotes[i]) revert TransferAmountMisalignment();
            getAndUpdateToVoteAndToRevoke(fromGroups[i], 0, fromVotes[i]);
            totalFromVotes += fromVotes[i];
        }

        for (uint256 i = 0; i < toGroups.length; i++) {
            getAndUpdateToVoteAndToRevoke(toGroups[i], toVotes[i], 0);
            totalToVotes += toVotes[i];
        }

        if (totalFromVotes != totalToVotes) {
            revert TransferAmountMisalignment();
        }
    }

    /**
     * @notice Schedule a list of withdrawals to be refunded to a beneficiary.
     * @param groups The groups the deposited CELO is intended to be withdrawn from.
     * @param withdrawals The amount of CELO to withdraw for each respective group.
     * @param beneficiary The account that will receive the CELO once it's withdrawn.
     * from `groups`.
     */
    function scheduleWithdrawals(
        address beneficiary,
        address[] calldata groups,
        uint256[] calldata withdrawals
    ) external onlyManager onlyWhenNotPaused {
        if (groups.length != withdrawals.length) {
            revert GroupsAndVotesArrayLengthsMismatch();
        }

        uint256 totalWithdrawalsDelta;

        for (uint256 i = 0; i < withdrawals.length; i++) {
            uint256 celoAvailableForGroup = getCeloForGroup(groups[i]);
            if (celoAvailableForGroup < withdrawals[i]) {
                revert WithdrawalAmountTooHigh(groups[i], celoAvailableForGroup, withdrawals[i]);
            }

            scheduledVotes[groups[i]].toWithdraw += withdrawals[i];
            scheduledVotes[groups[i]].toWithdrawFor[beneficiary] += withdrawals[i];
            totalWithdrawalsDelta += withdrawals[i];

            emit CeloWithdrawalScheduled(beneficiary, groups[i], withdrawals[i]);
        }

        totalScheduledWithdrawals += totalWithdrawalsDelta;
    }

    /**
     * @notice Starts withdrawal of CELO from `group`. If there is any unlocked CELO for the group,
     * that CELO is used for immediate withdrawal. Otherwise, CELO is taken from pending and active
     * votes, which are subject to the unlock period of LockedGold.sol.
     * @param group The group to withdraw CELO from.
     * @param beneficiary The recipient of the withdrawn CELO.
     * @param lesserAfterPendingRevoke Used by Election's `revokePending`. This is the group that
     * is before `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of pending votes has occurred.
     * @param greaterAfterPendingRevoke Used by Election's `revokePending`. This is the group that
     * is after `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of pending votes has occurred.
     * @param lesserAfterActiveRevoke Used by Election's `revokeActive`. This is the group that
     * is before `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of active votes has occurred.
     * @param greaterAfterActiveRevoke Used by Election's `revokeActive`. This is the group that
     * is after `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of active votes has occurred.
     * @param index Used by Election's `revokePending` and `revokeActive`. This is the index of
     * `group` in this contract's array of groups it is voting for.
     * @return The amount of immediately withdrawn CELO that is obtained from scheduledVotes
     * for `group`.
     */
    function withdraw(
        address beneficiary,
        address group,
        address lesserAfterPendingRevoke,
        address greaterAfterPendingRevoke,
        address lesserAfterActiveRevoke,
        address greaterAfterActiveRevoke,
        uint256 index
    ) external onlyWhenNotPaused returns (uint256) {
        uint256 withdrawalAmount = scheduledVotes[group].toWithdrawFor[beneficiary];
        if (withdrawalAmount == 0) {
            revert NoScheduledWithdrawal(beneficiary, group);
        }
        // Emit early to return without needing to emit in multiple places.
        emit CeloWithdrawalStarted(beneficiary, group, withdrawalAmount);
        // Subtract withdrawal amount from all bookkeeping
        scheduledVotes[group].toWithdrawFor[beneficiary] = 0;
        scheduledVotes[group].toWithdraw -= withdrawalAmount;
        totalScheduledWithdrawals -= withdrawalAmount;

        // It might happen that toVotes are from transfers
        // and the contract doesn't have enough CELO.
        (uint256 celoToVoteForGroup, ) = getAndUpdateToVoteAndToRevoke(group, 0, 0);
        uint256 immediateWithdrawalAmount = Math.min(address(this).balance, celoToVoteForGroup);

        if (immediateWithdrawalAmount > 0) {
            if (immediateWithdrawalAmount > withdrawalAmount) {
                immediateWithdrawalAmount = withdrawalAmount;
            }
            scheduledVotes[group].toVote -= immediateWithdrawalAmount;

            // The benefit of using getGoldToken().transfer() rather than transferring
            // using a message value is that the recepient's callback is not called, thus
            // removing concern that a malicious beneficiary would control code at this point.
            bool success = getGoldToken().transfer(beneficiary, immediateWithdrawalAmount);
            if (!success) {
                revert CeloTransferFailed(beneficiary, immediateWithdrawalAmount);
            }
            // If we've withdrawn the entire amount, return.
            if (immediateWithdrawalAmount == withdrawalAmount) {
                return immediateWithdrawalAmount;
            }
        }

        // We know that withdrawalAmount is >= immediateWithdrawalAmount.
        uint256 revokeAmount = withdrawalAmount - immediateWithdrawalAmount;

        ILockedGold lockedGold = getLockedGold();

        // Save the pending withdrawal for `beneficiary`.
        pendingWithdrawals[beneficiary].push(
            PendingWithdrawal(revokeAmount, block.timestamp + lockedGold.unlockingPeriod())
        );

        _revokeVotes(
            group,
            revokeAmount,
            lesserAfterPendingRevoke,
            greaterAfterPendingRevoke,
            lesserAfterActiveRevoke,
            greaterAfterActiveRevoke,
            index
        );

        lockedGold.unlock(revokeAmount);

        return immediateWithdrawalAmount;
    }

    /**
     * @notice Activates any activatable pending votes for group, and locks & votes any
     * unlocked CELO for group.
     * @dev Callable by anyone. In practice, this is expected to be called near the end of each
     * epoch by an off-chain agent.
     * @param group The group to activate pending votes for and lock & vote any unlocked CELO for.
     * @param voteLesser Used by Election's `vote`. This is the group that will recieve fewer
     * votes than group after the votes are cast, or address(0) if no such group exists.
     * @param voteGreater Used by Election's `vote`. This is the group that will recieve greater
     * votes than group after the votes are cast, or address(0) if no such group exists.
     */
    function activateAndVote(
        address group,
        address voteLesser,
        address voteGreater
    ) external onlyWhenNotPaused {
        IElection election = getElection();

        // The amount of unlocked CELO for group that we want to lock and vote with.
        (uint256 celoToVoteForGroup, ) = getAndUpdateToVoteAndToRevoke(group, 0, 0);

        // If there are activatable pending votes from this contract for group, activate them.
        if (election.hasActivatablePendingVotes(address(this), group)) {
            // Revert if the activation fails.
            if (!election.activate(group)) {
                revert ActivatePendingVotesFailed(group);
            }
        }

        // If there is no CELO to lock up and vote with, return.
        if (celoToVoteForGroup == 0) {
            return;
        }

        uint256 accountLockedNonvotingCelo = getLockedGold().getAccountNonvotingLockedGold(
            address(this)
        );

        // There might be some locked unvoting (revoked) CELO from previous transfers
        uint256 toLock = accountLockedNonvotingCelo >= celoToVoteForGroup
            ? 0
            : celoToVoteForGroup - accountLockedNonvotingCelo;

        // There might not be enough of balance to lock because of unbalanced groups
        uint256 availableToLock = Math.min(address(this).balance, toLock);

        // Lock up the unlockedCeloForGroup in LockedGold, which increments the
        // non-voting LockedGold balance for this contract.
        if (availableToLock > 0) {
            getLockedGold().lock{value: availableToLock}();
        }

        uint256 finalVoteAmount = celoToVoteForGroup - (toLock - availableToLock);

        // Update the CELO amount for group.
        scheduledVotes[group].toVote -= finalVoteAmount;

        if (!election.vote(group, finalVoteAmount, voteLesser, voteGreater)) {
            revert VoteFailed(group, celoToVoteForGroup);
        }
    }

    /**
     * @notice Finishes a pending withdrawal created as a result of a `withdrawCelo` call,
     * claiming CELO after the `unlockingPeriod` defined in LockedGold.sol.
     * @dev Callable by anyone, but ultimatly the withdrawal goes to `beneficiary`.
     * The pending withdrawal info found in both StakedCeloGroupVoter and LockedGold must match
     * to ensure that the beneficiary is claiming the appropriate pending withdrawal.
     * @param beneficiary The account that owns the pending withdrawal being processed.
     * @param localPendingWithdrawalIndex The index of the pending withdrawal to finish
     * in pendingWithdrawals[beneficiary] array.
     * @param lockedGoldPendingWithdrawalIndex The index of the pending withdrawal to finish
     * in LockedGold.
     * @return amount The amount of CELO sent to `beneficiary`.
     */
    function finishPendingWithdrawal(
        address beneficiary,
        uint256 localPendingWithdrawalIndex,
        uint256 lockedGoldPendingWithdrawalIndex
    ) external onlyWhenNotPaused returns (uint256 amount) {
        (uint256 value, uint256 timestamp) = validatePendingWithdrawalRequest(
            beneficiary,
            localPendingWithdrawalIndex,
            lockedGoldPendingWithdrawalIndex
        );

        // Remove the pending withdrawal.
        PendingWithdrawal[] storage localPendingWithdrawals = pendingWithdrawals[beneficiary];
        localPendingWithdrawals[localPendingWithdrawalIndex] = localPendingWithdrawals[
            localPendingWithdrawals.length - 1
        ];
        localPendingWithdrawals.pop();

        // Process withdrawal.
        getLockedGold().withdraw(lockedGoldPendingWithdrawalIndex);

        /**
         * The benefit of using getGoldToken().transfer() is that the recepients callback
         * is not called thus removing concern that a malicious
         * caller would control code at this point.
         */
        bool success = getGoldToken().transfer(beneficiary, value);
        if (!success) {
            revert CeloTransferFailed(beneficiary, value);
        }

        emit CeloWithdrawalFinished(beneficiary, value, timestamp);
        return value;
    }

    /**
     * @notice Turns on/off voting for more then max number of groups.
     * @param flag The on/off flag.
     */
    function setAllowedToVoteOverMaxNumberOfGroups(bool flag) external onlyOwner {
        getElection().setAllowedToVoteOverMaxNumberOfGroups(flag);
    }

    /**
     * @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 votePartially(
        uint256 proposalId,
        uint256 index,
        uint256 yesVotes,
        uint256 noVotes,
        uint256 abstainVotes
    ) external onlyManager onlyWhenNotPaused {
        bool voteResult = getGovernance().votePartially(
            proposalId,
            index,
            yesVotes,
            noVotes,
            abstainVotes
        );
        if (!voteResult) {
            revert VotingNotSuccessful(proposalId);
        }
    }

    /**
     * @notice Gets the total amount of CELO this contract controls. This is the
     * unlocked CELO balance of the contract plus the amount of LockedGold for this contract,
     * which included unvoting and voting LockedGold.
     * @return The total amount of CELO this contract controls, including LockedGold.
     */
    function getTotalCelo() external view returns (uint256) {
        // LockedGold's getAccountTotalLockedGold returns any non-voting locked gold +
        // voting locked gold for each group the account is voting for, which is an
        // O(# of groups voted for) operation.
        return
            address(this).balance +
            getLockedGold().getAccountTotalLockedGold(address(this)) -
            totalScheduledWithdrawals;
    }

    /**
     * @notice Returns the pending withdrawals for a beneficiary.
     * @param beneficiary The address of the beneficiary who initiated the pending withdrawal.
     * @return values The values of pending withdrawals.
     * @return timestamps The timestamps of pending withdrawals.
     */
    function getPendingWithdrawals(address beneficiary)
        external
        view
        returns (uint256[] memory values, uint256[] memory timestamps)
    {
        uint256 length = pendingWithdrawals[beneficiary].length;
        values = new uint256[](length);
        timestamps = new uint256[](length);

        for (uint256 i = 0; i < length; i++) {
            PendingWithdrawal memory p = pendingWithdrawals[beneficiary][i];
            values[i] = p.value;
            timestamps[i] = p.timestamp;
        }

        return (values, timestamps);
    }

    /**
     * @notice Returns the number of pending withdrawals for a beneficiary.
     * @param beneficiary The address of the beneficiary who initiated the pending withdrawal.
     * @return The numbers of pending withdrawals for `beneficiary`
     */
    function getNumberPendingWithdrawals(address beneficiary) external view returns (uint256) {
        return pendingWithdrawals[beneficiary].length;
    }

    /**
     * @notice Returns a pending withdrawals for a beneficiary.
     * @param beneficiary The address of the beneficiary who initiated the pending withdrawal.
     * @param index The index in `beneficiary`'s pendingWithdrawals array.
     * @return value The values of the pending withdrawal.
     * @return timestamp The timestamp of the pending withdrawal.
     */
    function getPendingWithdrawal(address beneficiary, uint256 index)
        external
        view
        returns (uint256 value, uint256 timestamp)
    {
        PendingWithdrawal memory withdrawal = pendingWithdrawals[beneficiary][index];

        return (withdrawal.value, withdrawal.timestamp);
    }

    /**
     * @notice Returns the total amount of CELO that's scheduled to vote for a group.
     * @param group The address of the validator group.
     * @return The total amount of CELO directed towards `group`.
     */
    function scheduledVotesForGroup(address group) external view returns (uint256) {
        return scheduledVotes[group].toVote;
    }

    /**
     * @notice Returns the total amount of CELO that's scheduled to be revoked for a group.
     * @param group The address of the validator group.
     * @return The total amount of CELO scheduled to be revoked from `group`.
     */
    function scheduledRevokeForGroup(address group) external view returns (uint256) {
        return scheduledVotes[group].toRevoke;
    }

    /**
     * @notice Returns the total amount of CELO that's scheduled to be withdrawn for a group.
     * @param group The address of the validator group.
     * @return The total amount of CELO to be withdrawn for `group`.
     */
    function scheduledWithdrawalsForGroup(address group) external view returns (uint256) {
        return scheduledVotes[group].toWithdraw;
    }

    /**
     * @notice Returns the total amount of CELO that's scheduled to be withdrawn for a group
     * scoped by a beneficiary.
     * @param group The address of the validator group.
     * @param beneficiary The beneficiary of the withdrawal.
     * @return The total amount of CELO to be withdrawn for `group` by `beneficiary`.
     */
    function scheduledWithdrawalsForGroupAndBeneficiary(address group, address beneficiary)
        external
        view
        returns (uint256)
    {
        return scheduledVotes[group].toWithdrawFor[beneficiary];
    }

    /**
     * @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, 2, 1, 0);
    }

    /**
     * @notice Revokes votes from a validator group. It first attempts to revoke pending votes,
     * and then active votes if necessary.
     * @dev Reverts if `revokeAmount` exceeds the total number of pending and active votes for
     * the group from this contract.
     * @param group The group to revoke CELO from.
     * @param lesserAfterPendingRevoke Used by Election's `revokePending`. This is the group that
     * is before `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of pending votes has occurred.
     * @param greaterAfterPendingRevoke Used by Election's `revokePending`. This is the group that
     * is after `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of pending votes has occurred.
     * @param lesserAfterActiveRevoke Used by Election's `revokeActive`. This is the group that
     * is before `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of active votes has occurred.
     * @param greaterAfterActiveRevoke Used by Election's `revokeActive`. This is the group that
     * is after `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of active votes has occurred.
     * @param index Used by Election's `revokePending` and `revokeActive`. This is the index of
     * `group` in the this contract's array of groups it is voting for.
     */
    function revokeVotes(
        address group,
        address lesserAfterPendingRevoke,
        address greaterAfterPendingRevoke,
        address lesserAfterActiveRevoke,
        address greaterAfterActiveRevoke,
        uint256 index
    ) public onlyWhenNotPaused {
        (, uint256 revokeAmount) = getAndUpdateToVoteAndToRevoke(group, 0, 0);

        if (revokeAmount == 0) {
            return;
        }

        uint256 revokable = Math.min(votesForGroup(group), revokeAmount);

        _revokeVotes(
            group,
            revokable,
            lesserAfterPendingRevoke,
            greaterAfterPendingRevoke,
            lesserAfterActiveRevoke,
            greaterAfterActiveRevoke,
            index
        );

        scheduledVotes[group].toRevoke -= revokable;
    }

    /**
     * @notice Returns the total amount of CELO directed towards `group`. This is
     * the Unlocked CELO balance for `group` plus the combined amount in pending
     * and active votes made by this contract.
     * @param group The address of the validator group.
     * @return The total amount of CELO directed towards `group`.
     */
    function getCeloForGroup(address group) public view returns (uint256) {
        uint256 combinedVotes = getElection().getTotalVotesForGroupByAccount(group, address(this)) +
            scheduledVotes[group].toVote;
        uint256 toBeRemoved = scheduledVotes[group].toRevoke + scheduledVotes[group].toWithdraw;

        if (combinedVotes > toBeRemoved) {
            return combinedVotes - toBeRemoved;
        }

        return 0;
    }

    /**
     * @notice Returns the total amount of CELO that's voted with for a group.
     * @param group The address of the validator group.
     * @return The total amount of CELO voted with for `group`.
     */
    function votesForGroup(address group) public view returns (uint256) {
        return getElection().getTotalVotesForGroupByAccount(group, address(this));
    }

    /**
     * @notice Revokes votes from a validator group. It first attempts to revoke pending votes,
     * and then active votes if necessary.
     * @dev Reverts if `revokeAmount` exceeds the total number of pending and active votes for
     * the group from this contract.
     * @param group The group to withdraw CELO from.
     * @param revokeAmount The amount of votes to revoke.
     * @param lesserAfterPendingRevoke Used by Election's `revokePending`. This is the group that
     * is before `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of pending votes has occurred.
     * @param greaterAfterPendingRevoke Used by Election's `revokePending`. This is the group that
     * is after `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of pending votes has occurred.
     * @param lesserAfterActiveRevoke Used by Election's `revokeActive`. This is the group that
     * is before `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of active votes has occurred.
     * @param greaterAfterActiveRevoke Used by Election's `revokeActive`. This is the group that
     * is after `group` within the validators sorted LinkedList, or address(0) if there isn't one,
     * after the revoke of active votes has occurred.
     * @param index Used by Election's `revokePending` and `revokeActive`. This is the index of
     * `group` in the this contract's array of groups it is voting for.
     */
    function _revokeVotes(
        address group,
        uint256 revokeAmount,
        address lesserAfterPendingRevoke,
        address greaterAfterPendingRevoke,
        address lesserAfterActiveRevoke,
        address greaterAfterActiveRevoke,
        uint256 index
    ) internal {
        IElection election = getElection();
        uint256 pendingVotesAmount = election.getPendingVotesForGroupByAccount(
            group,
            address(this)
        );

        uint256 toRevokeFromPending = Math.min(revokeAmount, pendingVotesAmount);
        if (toRevokeFromPending > 0) {
            if (
                !election.revokePending(
                    group,
                    toRevokeFromPending,
                    lesserAfterPendingRevoke,
                    greaterAfterPendingRevoke,
                    index
                )
            ) {
                revert RevokePendingFailed(group, revokeAmount);
            }
        }

        uint256 toRevokeFromActive = revokeAmount - toRevokeFromPending;
        if (toRevokeFromActive == 0) {
            return;
        }

        uint256 activeVotesAmount = election.getActiveVotesForGroupByAccount(group, address(this));
        if (activeVotesAmount < toRevokeFromActive) {
            revert InsufficientRevokableVotes(group, revokeAmount);
        }

        if (
            !election.revokeActive(
                group,
                toRevokeFromActive,
                lesserAfterActiveRevoke,
                greaterAfterActiveRevoke,
                index
            )
        ) {
            revert RevokeActiveFailed(group, revokeAmount);
        }
    }

    /**
     * @notice Validates a local pending withdrawal matches a given beneficiary and LockedGold
     * pending withdrawal.
     * @dev See finishPendingWithdrawal.
     * @param beneficiary The account that owns the pending withdrawal being processed.
     * @param localPendingWithdrawalIndex The index of the pending withdrawal to finish
     * in pendingWithdrawals[beneficiary] array.
     * @param lockedGoldPendingWithdrawalIndex The index of the pending withdrawal to finish
     * in LockedGold.
     * @return value The value of the pending withdrawal.
     * @return timestamp The timestamp of the pending withdrawal.
     */
    function validatePendingWithdrawalRequest(
        address beneficiary,
        uint256 localPendingWithdrawalIndex,
        uint256 lockedGoldPendingWithdrawalIndex
    ) internal view returns (uint256 value, uint256 timestamp) {
        if (localPendingWithdrawalIndex >= pendingWithdrawals[beneficiary].length) {
            revert PendingWithdrawalIndexTooHigh(
                localPendingWithdrawalIndex,
                pendingWithdrawals[beneficiary].length
            );
        }

        (
            uint256 lockedGoldPendingWithdrawalValue,
            uint256 lockedGoldPendingWithdrawalTimestamp
        ) = getLockedGold().getPendingWithdrawal(address(this), lockedGoldPendingWithdrawalIndex);

        PendingWithdrawal memory pendingWithdrawal = pendingWithdrawals[beneficiary][
            localPendingWithdrawalIndex
        ];

        if (pendingWithdrawal.value != lockedGoldPendingWithdrawalValue) {
            revert InconsistentPendingWithdrawalValues(
                pendingWithdrawal.value,
                lockedGoldPendingWithdrawalValue
            );
        }

        if (pendingWithdrawal.timestamp != lockedGoldPendingWithdrawalTimestamp) {
            revert InconsistentPendingWithdrawalTimestamps(
                pendingWithdrawal.timestamp,
                lockedGoldPendingWithdrawalTimestamp
            );
        }

        return (pendingWithdrawal.value, pendingWithdrawal.timestamp);
    }

    /**
     * @notice Adds amount to `toVote` and `toRevoke` and returns the `toVote`
     * and `toRevoke` amount of CELO directed towards `group`. This is the `toVote`
     * CELO balance for `group` minus the `toRevoke` amount and vice versa.
     * Both `toRevoke` and `toVote` are updated.
     * @param group The address of the validator group.
     * @param addToVote The amount to add to `toVote`.
     * @param addToRevoke The amount to add to `toRevoke`.
     * @return toVote The `toVote` amount of CELO directed towards `group`.
     * @return toRevoke The `toRevoke` amount of CELO directed towards `group`.
     */
    function getAndUpdateToVoteAndToRevoke(
        address group,
        uint256 addToVote,
        uint256 addToRevoke
    ) private returns (uint256 toVote, uint256 toRevoke) {
        toVote = scheduledVotes[group].toVote + addToVote;
        toRevoke = scheduledVotes[group].toRevoke + addToRevoke;

        if (toVote > toRevoke) {
            scheduledVotes[group].toVote = toVote = toVote - toRevoke;
            scheduledVotes[group].toRevoke = toRevoke = 0;
        } else {
            scheduledVotes[group].toRevoke = toRevoke = toRevoke - toVote;
            scheduledVotes[group].toVote = toVote = 0;
        }

        if (addToVote > 0) {
            emit VotesScheduled(group, addToVote);
        }

        if (addToRevoke > 0) {
            emit RevocationScheduled(group, addToRevoke);
        }
    }
}
        

/

// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.8.11;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

import "./common/Errors.sol";

/**
 * @title Used via inheritance to grant special access control to the Manager
 * contract.
 */
abstract contract Managed is Errors, Initializable, OwnableUpgradeable {
    address public manager;

    /**
     * @notice Emitted when the manager is initially set or later modified.
     * @param manager The new managing account address.
     */
    event ManagerSet(address indexed manager);

    /**
     *  @notice Used when an `onlyManager` function is called by a non-manager.
     *  @param caller `msg.sender` that called the function.
     */
    error CallerNotManager(address caller);

    /**
     * @dev Throws if called by any account other than the manager.
     */
    modifier onlyManager() {
        if (manager != msg.sender) {
            revert CallerNotManager(msg.sender);
        }
        _;
    }

    /**
     * @notice Sets the manager address.
     * @param _manager The new manager address.
     */
    function setManager(address _manager) external onlyOwner {
        _setManager(_manager);
    }

    /**
     * @dev Initializes the contract in an upgradable context.
     * @param _manager The initial managing address.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __Managed_init(address _manager) internal onlyInitializing {
        _setManager(_manager);
    }

    /**
     * @notice Sets the manager address.
     * @param _manager The new manager address.
     */
    function _setManager(address _manager) internal {
        if (_manager == address(0)) {
            revert AddressZeroNotAllowed();
        }
        manager = _manager;
        emit ManagerSet(_manager);
    }
}
          

/

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

/

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

/

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

/

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

/

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

/

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

/

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

/

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

/

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

/

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

/

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

/

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

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

/

// 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 {}
}
          

/

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

/

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

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

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

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

/

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

/

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

/

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

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

Compiler Settings

{"remappings":[],"optimizer":{"runs":200,"enabled":false},"metadata":{"useLiteralContent":true,"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"istanbul","compilationTarget":{"contracts/Account.sol":"Account"}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"error","name":"AccountCreationFailed","inputs":[]},{"type":"error","name":"ActivatePendingVotesFailed","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"error","name":"AddressZeroNotAllowed","inputs":[]},{"type":"error","name":"CallerNotManager","inputs":[{"type":"address","name":"caller","internalType":"address"}]},{"type":"error","name":"CeloTransferFailed","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"error","name":"GroupsAndVotesArrayLengthsMismatch","inputs":[]},{"type":"error","name":"InconsistentPendingWithdrawalTimestamps","inputs":[{"type":"uint256","name":"localPendingWithdrawalTimestamp","internalType":"uint256"},{"type":"uint256","name":"lockedGoldPendingWithdrawalTimestamp","internalType":"uint256"}]},{"type":"error","name":"InconsistentPendingWithdrawalValues","inputs":[{"type":"uint256","name":"localPendingWithdrawalValue","internalType":"uint256"},{"type":"uint256","name":"lockedGoldPendingWithdrawalValue","internalType":"uint256"}]},{"type":"error","name":"InsufficientRevokableVotes","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"error","name":"NoScheduledWithdrawal","inputs":[{"type":"address","name":"beneficiary","internalType":"address"},{"type":"address","name":"group","internalType":"address"}]},{"type":"error","name":"OnlyPauser","inputs":[]},{"type":"error","name":"Paused","inputs":[]},{"type":"error","name":"PendingWithdrawalIndexTooHigh","inputs":[{"type":"uint256","name":"pendingWithdrawalIndex","internalType":"uint256"},{"type":"uint256","name":"pendingWithdrawalsLength","internalType":"uint256"}]},{"type":"error","name":"RevokeActiveFailed","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"error","name":"RevokePendingFailed","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"error","name":"TotalVotesMismatch","inputs":[{"type":"uint256","name":"sentValue","internalType":"uint256"},{"type":"uint256","name":"expectedValue","internalType":"uint256"}]},{"type":"error","name":"TransferAmountMisalignment","inputs":[]},{"type":"error","name":"VoteFailed","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"error","name":"VotingNotSuccessful","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}]},{"type":"error","name":"WithdrawalAmountTooHigh","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"celoAvailable","internalType":"uint256"},{"type":"uint256","name":"celoToWindraw","internalType":"uint256"}]},{"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":"CeloWithdrawalFinished","inputs":[{"type":"address","name":"beneficiary","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CeloWithdrawalScheduled","inputs":[{"type":"address","name":"beneficiary","internalType":"address","indexed":true},{"type":"address","name":"group","internalType":"address","indexed":true},{"type":"uint256","name":"withdrawalAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CeloWithdrawalStarted","inputs":[{"type":"address","name":"beneficiary","internalType":"address","indexed":true},{"type":"address","name":"group","internalType":"address","indexed":true},{"type":"uint256","name":"withdrawalAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ContractPaused","inputs":[],"anonymous":false},{"type":"event","name":"ContractUnpaused","inputs":[],"anonymous":false},{"type":"event","name":"ManagerSet","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true}],"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":"RevocationScheduled","inputs":[{"type":"address","name":"group","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Upgraded","inputs":[{"type":"address","name":"implementation","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"VotesScheduled","inputs":[{"type":"address","name":"group","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"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":"activateAndVote","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"address","name":"voteLesser","internalType":"address"},{"type":"address","name":"voteGreater","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"}],"name":"finishPendingWithdrawal","inputs":[{"type":"address","name":"beneficiary","internalType":"address"},{"type":"uint256","name":"localPendingWithdrawalIndex","internalType":"uint256"},{"type":"uint256","name":"lockedGoldPendingWithdrawalIndex","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getCeloForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNumberPendingWithdrawals","inputs":[{"type":"address","name":"beneficiary","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"value","internalType":"uint256"},{"type":"uint256","name":"timestamp","internalType":"uint256"}],"name":"getPendingWithdrawal","inputs":[{"type":"address","name":"beneficiary","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"values","internalType":"uint256[]"},{"type":"uint256[]","name":"timestamps","internalType":"uint256[]"}],"name":"getPendingWithdrawals","inputs":[{"type":"address","name":"beneficiary","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalCelo","inputs":[]},{"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":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_registry","internalType":"address"},{"type":"address","name":"_manager","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":"manager","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":"view","outputs":[{"type":"uint256","name":"value","internalType":"uint256"},{"type":"uint256","name":"timestamp","internalType":"uint256"}],"name":"pendingWithdrawals","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"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":"address","name":"group","internalType":"address"},{"type":"address","name":"lesserAfterPendingRevoke","internalType":"address"},{"type":"address","name":"greaterAfterPendingRevoke","internalType":"address"},{"type":"address","name":"lesserAfterActiveRevoke","internalType":"address"},{"type":"address","name":"greaterAfterActiveRevoke","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"scheduleTransfer","inputs":[{"type":"address[]","name":"fromGroups","internalType":"address[]"},{"type":"uint256[]","name":"fromVotes","internalType":"uint256[]"},{"type":"address[]","name":"toGroups","internalType":"address[]"},{"type":"uint256[]","name":"toVotes","internalType":"uint256[]"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"scheduleVotes","inputs":[{"type":"address[]","name":"groups","internalType":"address[]"},{"type":"uint256[]","name":"votes","internalType":"uint256[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"scheduleWithdrawals","inputs":[{"type":"address","name":"beneficiary","internalType":"address"},{"type":"address[]","name":"groups","internalType":"address[]"},{"type":"uint256[]","name":"withdrawals","internalType":"uint256[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"scheduledRevokeForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"scheduledVotesForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"scheduledWithdrawalsForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"scheduledWithdrawalsForGroupAndBeneficiary","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"address","name":"beneficiary","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAllowedToVoteOverMaxNumberOfGroups","inputs":[{"type":"bool","name":"flag","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setManager","inputs":[{"type":"address","name":"_manager","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPauser","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalScheduledWithdrawals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"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":"nonpayable","outputs":[],"name":"votePartially","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":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"votesForGroup","inputs":[{"type":"address","name":"group","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdraw","inputs":[{"type":"address","name":"beneficiary","internalType":"address"},{"type":"address","name":"group","internalType":"address"},{"type":"address","name":"lesserAfterPendingRevoke","internalType":"address"},{"type":"address","name":"greaterAfterPendingRevoke","internalType":"address"},{"type":"address","name":"lesserAfterActiveRevoke","internalType":"address"},{"type":"address","name":"greaterAfterActiveRevoke","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff168152503480156200004457600080fd5b50600060019054906101000a900460ff166200006f5760008054906101000a900460ff161562000080565b6200007f6200013c60201b60201c565b5b620000c2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000b99062000204565b60405180910390fd5b60008060019054906101000a900460ff16159050801562000113576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015620001355760008060016101000a81548160ff0219169083151502179055505b5062000226565b600062000154306200015a60201b6200337c1760201c565b15905090565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000620001ec602e836200017d565b9150620001f9826200018e565b604082019050919050565b600060208201905081810360008301526200021f81620001dd565b9050919050565b6080516160a06200025760003960008181611240015281816112cf0152818161150a015261159901526160a06000f3fe6080604052600436106102295760003560e01c806384aff2e711610123578063c0c53b8b116100ab578063d52758aa1161006f578063d52758aa146107fd578063f2fde38b14610826578063f340c0d01461084f578063f380ade31461088d578063f8171927146108b657610230565b8063c0c53b8b14610707578063c7fb232814610730578063c9a101f31461076d578063d0ebdbe714610796578063d15ca4ed146107bf57610230565b80639fd0506d116100f25780639fd0506d146105fa578063a020c8de14610625578063acd201d014610662578063b09bdc5e1461069f578063b187bd26146106dc57610230565b806384aff2e71461053e5780638da5cb5b1461057b5780639468ba0e146105a657806395145221146105d157610230565b80633f4ba83a116101b15780635fd5c95e116101755780635fd5c95e14610491578063715018a6146104ce5780637b103999146104e55780637c0d530f146105105780638456cb591461052757610230565b80633f4ba83a146103c757806344dc4970146103de578063481c6a751461041c5780634f1ef2861461044757806354255be01461046357610230565b80632ad9ac41116101f85780632ad9ac41146102f65780632edfd12e146103215780632f842a1a1461034a5780633659cfe6146103735780633cbf58721461039c57610230565b806301c21d591461023557806301d2b6ea146102515780631449edb01461027c57806322e59bd4146102b957610230565b3661023057005b600080fd5b61024f600480360381019061024a9190614a54565b6108f3565b005b34801561025d57600080fd5b50610266610aec565b6040516102739190614aee565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190614b67565b610b8c565b6040516102b09190614aee565b60405180910390f35b3480156102c557600080fd5b506102e060048036038101906102db9190614b67565b610bd8565b6040516102ed9190614aee565b60405180910390f35b34801561030257600080fd5b5061030b610c24565b6040516103189190614aee565b60405180910390f35b34801561032d57600080fd5b5061034860048036038101906103439190614bc0565b610c2a565b005b34801561035657600080fd5b50610371600480360381019061036c9190614c3b565b610dd4565b005b34801561037f57600080fd5b5061039a60048036038101906103959190614b67565b61123e565b005b3480156103a857600080fd5b506103b16113c7565b6040516103be9190614ce9565b60405180910390f35b3480156103d357600080fd5b506103dc6113fd565b005b3480156103ea57600080fd5b5061040560048036038101906104009190614d04565b6114a1565b604051610413929190614d44565b60405180910390f35b34801561042857600080fd5b506104316114e2565b60405161043e9190614d7c565b60405180910390f35b610461600480360381019061045c9190614ed8565b611508565b005b34801561046f57600080fd5b50610478611645565b6040516104889493929190614f34565b60405180910390f35b34801561049d57600080fd5b506104b860048036038101906104b39190614b67565b611661565b6040516104c59190614aee565b60405180910390f35b3480156104da57600080fd5b506104e36116ad565b005b3480156104f157600080fd5b506104fa611735565b6040516105079190614fd8565b60405180910390f35b34801561051c57600080fd5b5061052561175b565b005b34801561053357600080fd5b5061053c6117e9565b005b34801561054a57600080fd5b5061056560048036038101906105609190614ff3565b61188d565b6040516105729190614aee565b60405180910390f35b34801561058757600080fd5b50610590611b63565b60405161059d9190614d7c565b60405180910390f35b3480156105b257600080fd5b506105bb611b8d565b6040516105c89190614ce9565b60405180910390f35b3480156105dd57600080fd5b506105f860048036038101906105f39190615046565b611bc3565b005b34801561060657600080fd5b5061060f611cab565b60405161061c9190614d7c565b60405180910390f35b34801561063157600080fd5b5061064c600480360381019061064791906150d3565b611cf1565b6040516106599190614aee565b60405180910390f35b34801561066e57600080fd5b5061068960048036038101906106849190614b67565b612280565b6040516106969190614aee565b60405180910390f35b3480156106ab57600080fd5b506106c660048036038101906106c19190614b67565b612412565b6040516106d39190614aee565b60405180910390f35b3480156106e857600080fd5b506106f161245e565b6040516106fe9190615190565b60405180910390f35b34801561071357600080fd5b5061072e600480360381019061072991906151ab565b6124a4565b005b34801561073c57600080fd5b50610757600480360381019061075291906151fe565b612654565b6040516107649190614aee565b60405180910390f35b34801561077957600080fd5b50610794600480360381019061078f91906151ab565b6126de565b005b3480156107a257600080fd5b506107bd60048036038101906107b89190614b67565b612af3565b005b3480156107cb57600080fd5b506107e660048036038101906107e19190614d04565b612b7b565b6040516107f4929190614d44565b60405180910390f35b34801561080957600080fd5b50610824600480360381019061081f919061526a565b612c16565b005b34801561083257600080fd5b5061084d60048036038101906108489190614b67565b612d07565b005b34801561085b57600080fd5b5061087660048036038101906108719190614b67565b612dff565b604051610884929190615355565b60405180910390f35b34801561089957600080fd5b506108b460048036038101906108af919061538c565b612fcf565b005b3480156108c257600080fd5b506108dd60048036038101906108d89190614b67565b6132f0565b6040516108ea9190614aee565b60405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461098557336040517f3b2495f100000000000000000000000000000000000000000000000000000000815260040161097c9190614d7c565b60405180910390fd5b61098d61245e565b156109c4576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818190508484905014610a03576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b85859050811015610a9e57610a62868683818110610a2c57610a2b615475565b5b9050602002016020810190610a419190614b67565b858584818110610a5457610a53615475565b5b90506020020135600061339f565b5050838382818110610a7757610a76615475565b5b9050602002013582610a8991906154d3565b91508080610a9690615529565b915050610a0b565b50348114610ae55734816040517f02760fce000000000000000000000000000000000000000000000000000000008152600401610adc929190614d44565b60405180910390fd5b5050505050565b6000606954610af9613648565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5306040518263ffffffff1660e01b8152600401610b319190614d7c565b602060405180830381865afa158015610b4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b729190615587565b47610b7d91906154d3565b610b8791906155b4565b905090565b6000606760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301549050919050565b60695481565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cbc57336040517f3b2495f1000000000000000000000000000000000000000000000000000000008152600401610cb39190614d7c565b60405180910390fd5b610cc461245e565b15610cfb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610d0561370f565b73ffffffffffffffffffffffffffffffffffffffff16632edfd12e87878787876040518663ffffffff1660e01b8152600401610d459594939291906155e8565b6020604051808303816000875af1158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d889190615650565b905080610dcc57856040517f30b7d05a000000000000000000000000000000000000000000000000000000008152600401610dc39190614aee565b60405180910390fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e6657336040517f3b2495f1000000000000000000000000000000000000000000000000000000008152600401610e5d9190614d7c565b60405180910390fd5b610e6e61245e565b15610ea5576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818190508484905014610ee4576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b8383905081101561121c576000610f29878784818110610f0f57610f0e615475565b5b9050602002016020810190610f249190614b67565b612280565b9050848483818110610f3e57610f3d615475565b5b90506020020135811015610fcd57868683818110610f5f57610f5e615475565b5b9050602002016020810190610f749190614b67565b81868685818110610f8857610f87615475565b5b905060200201356040517fd5493527000000000000000000000000000000000000000000000000000000008152600401610fc49392919061567d565b60405180910390fd5b848483818110610fe057610fdf615475565b5b9050602002013560686000898986818110610ffe57610ffd615475565b5b90506020020160208101906110139190614b67565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825461105f91906154d3565b9250508190555084848381811061107957611078615475565b5b905060200201356068600089898681811061109757611096615475565b5b90506020020160208101906110ac9190614b67565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461113591906154d3565b9250508190555084848381811061114f5761114e615475565b5b905060200201358361116191906154d3565b925086868381811061117657611175615475565b5b905060200201602081019061118b9190614b67565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f6b63acc273560d01b849e2d77c42ac2cd2b6ff5e1c775423c52a6e50be320e7b8787868181106111ec576111eb615475565b5b905060200201356040516112009190614aee565b60405180910390a350808061121490615529565b915050610eec565b50806069600082825461122f91906154d3565b92505081905550505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156112cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c490615737565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661130c6137d6565b73ffffffffffffffffffffffffffffffffffffffff1614611362576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611359906157c9565b60405180910390fd5b61136b8161382d565b6113c481600067ffffffffffffffff81111561138a57611389614dad565b5b6040519080825280601f01601f1916602001820160405280156113bc5781602001600182028036833780820191505090505b5060006138ac565b50565b60017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c6113f791906155b4565b60001b81565b611405611cab565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611469576040517f75df51dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114736000613a7d565b7f0e5e3b3fb504c22cf5c42fa07d521225937514c654007e1f12646f89768d6f9460405160405180910390a1565b606760205281600052604060002081815481106114bd57600080fd5b9060005260206000209060020201600091509150508060000154908060010154905082565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90615737565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166115d66137d6565b73ffffffffffffffffffffffffffffffffffffffff161461162c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611623906157c9565b60405180910390fd5b6116358261382d565b611641828260016138ac565b5050565b6000806000806001600260016000935093509350935090919293565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b6116b5613abb565b73ffffffffffffffffffffffffffffffffffffffff166116d3611b63565b73ffffffffffffffffffffffffffffffffffffffff1614611729576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172090615835565b60405180910390fd5b6117336000613ac3565b565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611763613abb565b73ffffffffffffffffffffffffffffffffffffffff16611781611b63565b73ffffffffffffffffffffffffffffffffffffffff16146117d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ce90615835565b60405180910390fd5b6117e76117e2611b63565b613b89565b565b6117f1611cab565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611855576040517f75df51dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61185f6001613a7d565b7fab35696f06e428ebc5ceba8cd17f8fed287baf43440206d1943af1ee53e6d26760405160405180910390a1565b600061189761245e565b156118ce576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806118dc868686613c65565b915091506000606760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806001828054905061193591906155b4565b8154811061194657611945615475565b5b906000526020600020906002020181878154811061196757611966615475565b5b906000526020600020906002020160008201548160000155600182015481600101559050508080548061199d5761199c615855565b5b60019003818190600052602060002090600202016000808201600090556001820160009055505090556119ce613648565b73ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d866040518263ffffffff1660e01b8152600401611a069190614aee565b600060405180830381600087803b158015611a2057600080fd5b505af1158015611a34573d6000803e3d6000fd5b505050506000611a42613ef2565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb89866040518363ffffffff1660e01b8152600401611a7c929190615884565b6020604051808303816000875af1158015611a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abf9190615650565b905080611b055787846040517fbe1b5315000000000000000000000000000000000000000000000000000000008152600401611afc929190615884565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff167f3bb2914428a7565afeafb57ef1a5bad4a2de7be9bf7b41b7e5da505f4b974ce28585604051611b4d929190614d44565b60405180910390a2839450505050509392505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c611bbd91906155b4565b60001b81565b611bcb61245e565b15611c02576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c108760008061339f565b9150506000811415611c225750611ca3565b6000611c36611c30896132f0565b83613fb9565b9050611c4788828989898989613fd2565b80606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000828254611c9991906155b4565b9250508190555050505b505050505050565b600080600060017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c611ce091906155b4565b60001b905080549150819250505090565b6000611cfb61245e565b15611d32576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000606860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415611dfe5788886040517f7a9a71fb000000000000000000000000000000000000000000000000000000008152600401611df59291906158ad565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f6e250cfd645a8eac07044223b0b240549b17fe4a71aab09d925cb413b72b00ae83604051611e5b9190614aee565b60405180910390a36000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254611f3a91906155b4565b925050819055508060696000828254611f5391906155b4565b925050819055506000611f688960008061339f565b5090506000611f774783613fb9565b905060008111156120ca5782811115611f8e578290505b80606860008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254611fe091906155b4565b925050819055506000611ff1613ef2565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8d846040518363ffffffff1660e01b815260040161202b929190615884565b6020604051808303816000875af115801561204a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206e9190615650565b9050806120b4578b826040517fbe1b53150000000000000000000000000000000000000000000000000000000081526004016120ab929190615884565b60405180910390fd5b838214156120c85781945050505050612275565b505b600081846120d891906155b4565b905060006120e4613648565b9050606760008e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060405180604001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166320637d8e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612181573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a59190615587565b426121b091906154d3565b8152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550506122018c838d8d8d8d8d613fd2565b8073ffffffffffffffffffffffffffffffffffffffff16636198e339836040518263ffffffff1660e01b815260040161223a9190614aee565b600060405180830381600087803b15801561225457600080fd5b505af1158015612268573d6000803e3d6000fd5b5050505082955050505050505b979650505050505050565b600080606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546122ce6142fc565b73ffffffffffffffffffffffffffffffffffffffff16633861727285306040518363ffffffff1660e01b81526004016123089291906158ad565b602060405180830381865afa158015612325573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123499190615587565b61235391906154d3565b90506000606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154606860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301546123e791906154d3565b9050808211156124065780826123fd91906155b4565b9250505061240d565b6000925050505b919050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600080600060017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c61249391906155b4565b60001b905080549150819250505090565b600060019054906101000a900460ff166124cc5760008054906101000a900460ff16156124d5565b6124d46143c3565b5b612514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250b90615948565b60405180910390fd5b60008060019054906101000a900460ff161590508015612564576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61256d846143d4565b612576836144e5565b61257f82613ac3565b612587614540565b73ffffffffffffffffffffffffffffffffffffffff16639dca362f6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156125d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f79190615650565b61262d576040517f20188a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561264e5760008060016101000a81548160ff0219169083151502179055505b50505050565b6000606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6126e661245e565b1561271d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006127276142fc565b905060006127378560008061339f565b5090508173ffffffffffffffffffffffffffffffffffffffff1663263ecf7430876040518363ffffffff1660e01b81526004016127759291906158ad565b602060405180830381865afa158015612792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127b69190615650565b15612879578173ffffffffffffffffffffffffffffffffffffffff16631c5a9d9c866040518263ffffffff1660e01b81526004016127f49190614d7c565b6020604051808303816000875af1158015612813573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128379190615650565b61287857846040517fbafbcc5700000000000000000000000000000000000000000000000000000000815260040161286f9190614d7c565b60405180910390fd5b5b6000811415612889575050612aee565b6000612893613648565b73ffffffffffffffffffffffffffffffffffffffff16633f199b40306040518263ffffffff1660e01b81526004016128cb9190614d7c565b602060405180830381865afa1580156128e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061290c9190615587565b905060008282101561292957818361292491906155b4565b61292c565b60005b9050600061293a4783613fb9565b905060008111156129ae5761294d613648565b73ffffffffffffffffffffffffffffffffffffffff1663f83d08ba826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561299457600080fd5b505af11580156129a8573d6000803e3d6000fd5b50505050505b600081836129bc91906155b4565b856129c791906155b4565b905080606860008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254612a1b91906155b4565b925050819055508573ffffffffffffffffffffffffffffffffffffffff1663580d747a8a838b8b6040518563ffffffff1660e01b8152600401612a619493929190615968565b6020604051808303816000875af1158015612a80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa49190615650565b612ae75788856040517fcbf8d8ef000000000000000000000000000000000000000000000000000000008152600401612ade929190615884565b60405180910390fd5b5050505050505b505050565b612afb613abb565b73ffffffffffffffffffffffffffffffffffffffff16612b19611b63565b73ffffffffffffffffffffffffffffffffffffffff1614612b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b6690615835565b60405180910390fd5b612b7881614607565b50565b6000806000606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208481548110612bd157612bd0615475565b5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505090508060000151816020015192509250509250929050565b612c1e613abb565b73ffffffffffffffffffffffffffffffffffffffff16612c3c611b63565b73ffffffffffffffffffffffffffffffffffffffff1614612c92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8990615835565b60405180910390fd5b612c9a6142fc565b73ffffffffffffffffffffffffffffffffffffffff1663d52758aa826040518263ffffffff1660e01b8152600401612cd29190615190565b600060405180830381600087803b158015612cec57600080fd5b505af1158015612d00573d6000803e3d6000fd5b5050505050565b612d0f613abb565b73ffffffffffffffffffffffffffffffffffffffff16612d2d611b63565b73ffffffffffffffffffffffffffffffffffffffff1614612d83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d7a90615835565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612df3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dea90615a1f565b60405180910390fd5b612dfc81613ac3565b50565b6060806000606760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090508067ffffffffffffffff811115612e6357612e62614dad565b5b604051908082528060200260200182016040528015612e915781602001602082028036833780820191505090505b5092508067ffffffffffffffff811115612eae57612ead614dad565b5b604051908082528060200260200182016040528015612edc5781602001602082028036833780820191505090505b50915060005b81811015612fc8576000606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110612f3d57612f3c615475565b5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505090508060000151858381518110612f8457612f83615475565b5b6020026020010181815250508060200151848381518110612fa857612fa7615475565b5b602002602001018181525050508080612fc090615529565b915050612ee2565b5050915091565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461306157336040517f3b2495f10000000000000000000000000000000000000000000000000000000081526004016130589190614d7c565b60405180910390fd5b61306961245e565b156130a0576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85859050888890501415806130bb5750818190508484905014155b156130f2576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060005b8a8a90508110156132135760006131358c8c8481811061311b5761311a615475565b5b90506020020160208101906131309190614b67565b612280565b905089898381811061314a57613149615475565b5b9050602002013581101561318a576040517f97df2d4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131d68c8c848181106131a05761319f615475565b5b90506020020160208101906131b59190614b67565b60008c8c868181106131ca576131c9615475565b5b9050602002013561339f565b50508989838181106131eb576131ea615475565b5b90506020020135846131fd91906154d3565b935050808061320b90615529565b9150506130f8565b5060005b868690508110156132aa5761326e87878381811061323857613237615475565b5b905060200201602081019061324d9190614b67565b8686848181106132605761325f615475565b5b90506020020135600061339f565b505084848281811061328357613282615475565b5b905060200201358261329591906154d3565b915080806132a290615529565b915050613217565b508082146132e4576040517f97df2d4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b60006132fa6142fc565b73ffffffffffffffffffffffffffffffffffffffff16633861727283306040518363ffffffff1660e01b81526004016133349291906158ad565b602060405180830381865afa158015613351573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133759190615587565b9050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008083606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546133f091906154d3565b915082606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015461344091906154d3565b9050808211156134ef57808261345691906155b4565b915081606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055506000905080606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550613590565b81816134fb91906155b4565b905080606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055506000915081606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b60008411156135e8578473ffffffffffffffffffffffffffffffffffffffff167f3ee8e5d1cb8671d12b5b20284bb69c7fc325211a1f957cab060d8a78dcc64fba856040516135df9190614aee565b60405180910390a25b6000831115613640578473ffffffffffffffffffffffffffffffffffffffff167fd1689364af36a1aad50a34377d3bf08cc89d0e1f2ebc154359eb9087a6e81a3e846040516136379190614aee565b60405180910390a25b935093915050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161369790615a96565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016136c99190614ce9565b602060405180830381865afa1580156136e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061370a9190615ac0565b905090565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161375e90615b39565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016137909190614ce9565b602060405180830381865afa1580156137ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137d19190615ac0565b905090565b60006138047f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6146f5565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b613835613abb565b73ffffffffffffffffffffffffffffffffffffffff16613853611b63565b73ffffffffffffffffffffffffffffffffffffffff16146138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138a090615835565b60405180910390fd5b50565b60006138b66137d6565b90506138c1846146ff565b6000835111806138ce5750815b156138df576138dd84846147b8565b505b600061390d7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6147e5565b90508060000160009054906101000a900460ff16613a765760018160000160006101000a81548160ff0219169083151502179055506139d985836040516024016139579190614d7c565b6040516020818303038152906040527f3659cfe6000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506147b8565b5060008160000160006101000a81548160ff0219169083151502179055506139ff6137d6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613a6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a6390615bc0565b60405180910390fd5b613a75856147ef565b5b5050505050565b600060017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c613aaf91906155b4565b60001b90508181555050565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613bf0576040517f0855380c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c613c2291906155b4565b60001b90508181557fd11d57c2c7468878b1035df11c670bcd0091aa840bf8aa166365397622237bea82604051613c599190614d7c565b60405180910390a15050565b600080606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508410613d325783606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490506040517fdee6f574000000000000000000000000000000000000000000000000000000008152600401613d29929190614d44565b60405180910390fd5b600080613d3d613648565b73ffffffffffffffffffffffffffffffffffffffff1663d15ca4ed30876040518363ffffffff1660e01b8152600401613d77929190615884565b6040805180830381865afa158015613d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613db79190615be0565b915091506000606760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208781548110613e0e57613e0d615475565b5b906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050905082816000015114613e8b578060000151836040517f753c4c22000000000000000000000000000000000000000000000000000000008152600401613e82929190614d44565b60405180910390fd5b81816020015114613ed9578060200151826040517f8acd9503000000000000000000000000000000000000000000000000000000008152600401613ed0929190614d44565b60405180910390fd5b8060000151816020015194509450505050935093915050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001613f4190615c6c565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401613f739190614ce9565b602060405180830381865afa158015613f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fb49190615ac0565b905090565b6000818310613fc85781613fca565b825b905092915050565b6000613fdc6142fc565b905060008173ffffffffffffffffffffffffffffffffffffffff16639b95975f8a306040518363ffffffff1660e01b815260040161401b9291906158ad565b602060405180830381865afa158015614038573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061405c9190615587565b9050600061406a8983613fb9565b9050600081111561413d578273ffffffffffffffffffffffffffffffffffffffff16639dfb60818b838b8b896040518663ffffffff1660e01b81526004016140b6959493929190615c81565b6020604051808303816000875af11580156140d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140f99190615650565b61413c5789896040517f88f72d99000000000000000000000000000000000000000000000000000000008152600401614133929190615884565b60405180910390fd5b5b6000818a61414b91906155b4565b9050600081141561415f57505050506142f3565b60008473ffffffffffffffffffffffffffffffffffffffff1663d3e242a48d306040518363ffffffff1660e01b815260040161419c9291906158ad565b602060405180830381865afa1580156141b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141dd9190615587565b905081811015614226578b8b6040517fc7b2786700000000000000000000000000000000000000000000000000000000815260040161421d929190615884565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16636e1984758d848b8b8b6040518663ffffffff1660e01b8152600401614267959493929190615c81565b6020604051808303816000875af1158015614286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142aa9190615650565b6142ed578b8b6040517f21ffa8e90000000000000000000000000000000000000000000000000000000081526004016142e4929190615884565b60405180910390fd5b50505050505b50505050505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161434b90615d20565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161437d9190614ce9565b602060405180830381865afa15801561439a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143be9190615ac0565b905090565b60006143ce3061337c565b15905090565b600060019054906101000a900460ff16614423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161441a90615da7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156144a05761ce10606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506144e2565b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600060019054906101000a900460ff16614534576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161452b90615da7565b60405180910390fd5b61453d81614607565b50565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161458f90615e13565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016145c19190614ce9565b602060405180830381865afa1580156145de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146029190615ac0565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561466e576040517f0855380c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f60a0f5b9f9e81e98216071b85826681c796256fe3d1354ecb675580fba64fa6960405160405180910390a250565b6000819050919050565b6147088161483e565b614747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161473e90615e9a565b60405180910390fd5b806147747f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6146f5565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606147dd838360405180606001604052806027815260200161604460279139614851565b905092915050565b6000819050919050565b6147f8816146ff565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b600080823b905060008111915050919050565b606061485c8461483e565b61489b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161489290615f2c565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516148c39190615fc6565b600060405180830381855af49150503d80600081146148fe576040519150601f19603f3d011682016040523d82523d6000602084013e614903565b606091505b509150915061491382828661491e565b925050509392505050565b6060831561492e5782905061497e565b6000835111156149415782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016149759190616021565b60405180910390fd5b9392505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126149be576149bd614999565b5b8235905067ffffffffffffffff8111156149db576149da61499e565b5b6020830191508360208202830111156149f7576149f66149a3565b5b9250929050565b60008083601f840112614a1457614a13614999565b5b8235905067ffffffffffffffff811115614a3157614a3061499e565b5b602083019150836020820283011115614a4d57614a4c6149a3565b5b9250929050565b60008060008060408587031215614a6e57614a6d61498f565b5b600085013567ffffffffffffffff811115614a8c57614a8b614994565b5b614a98878288016149a8565b9450945050602085013567ffffffffffffffff811115614abb57614aba614994565b5b614ac7878288016149fe565b925092505092959194509250565b6000819050919050565b614ae881614ad5565b82525050565b6000602082019050614b036000830184614adf565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000614b3482614b09565b9050919050565b614b4481614b29565b8114614b4f57600080fd5b50565b600081359050614b6181614b3b565b92915050565b600060208284031215614b7d57614b7c61498f565b5b6000614b8b84828501614b52565b91505092915050565b614b9d81614ad5565b8114614ba857600080fd5b50565b600081359050614bba81614b94565b92915050565b600080600080600060a08688031215614bdc57614bdb61498f565b5b6000614bea88828901614bab565b9550506020614bfb88828901614bab565b9450506040614c0c88828901614bab565b9350506060614c1d88828901614bab565b9250506080614c2e88828901614bab565b9150509295509295909350565b600080600080600060608688031215614c5757614c5661498f565b5b6000614c6588828901614b52565b955050602086013567ffffffffffffffff811115614c8657614c85614994565b5b614c92888289016149a8565b9450945050604086013567ffffffffffffffff811115614cb557614cb4614994565b5b614cc1888289016149fe565b92509250509295509295909350565b6000819050919050565b614ce381614cd0565b82525050565b6000602082019050614cfe6000830184614cda565b92915050565b60008060408385031215614d1b57614d1a61498f565b5b6000614d2985828601614b52565b9250506020614d3a85828601614bab565b9150509250929050565b6000604082019050614d596000830185614adf565b614d666020830184614adf565b9392505050565b614d7681614b29565b82525050565b6000602082019050614d916000830184614d6d565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b614de582614d9c565b810181811067ffffffffffffffff82111715614e0457614e03614dad565b5b80604052505050565b6000614e17614985565b9050614e238282614ddc565b919050565b600067ffffffffffffffff821115614e4357614e42614dad565b5b614e4c82614d9c565b9050602081019050919050565b82818337600083830152505050565b6000614e7b614e7684614e28565b614e0d565b905082815260208101848484011115614e9757614e96614d97565b5b614ea2848285614e59565b509392505050565b600082601f830112614ebf57614ebe614999565b5b8135614ecf848260208601614e68565b91505092915050565b60008060408385031215614eef57614eee61498f565b5b6000614efd85828601614b52565b925050602083013567ffffffffffffffff811115614f1e57614f1d614994565b5b614f2a85828601614eaa565b9150509250929050565b6000608082019050614f496000830187614adf565b614f566020830186614adf565b614f636040830185614adf565b614f706060830184614adf565b95945050505050565b6000819050919050565b6000614f9e614f99614f9484614b09565b614f79565b614b09565b9050919050565b6000614fb082614f83565b9050919050565b6000614fc282614fa5565b9050919050565b614fd281614fb7565b82525050565b6000602082019050614fed6000830184614fc9565b92915050565b60008060006060848603121561500c5761500b61498f565b5b600061501a86828701614b52565b935050602061502b86828701614bab565b925050604061503c86828701614bab565b9150509250925092565b60008060008060008060c087890312156150635761506261498f565b5b600061507189828a01614b52565b965050602061508289828a01614b52565b955050604061509389828a01614b52565b94505060606150a489828a01614b52565b93505060806150b589828a01614b52565b92505060a06150c689828a01614bab565b9150509295509295509295565b600080600080600080600060e0888a0312156150f2576150f161498f565b5b60006151008a828b01614b52565b97505060206151118a828b01614b52565b96505060406151228a828b01614b52565b95505060606151338a828b01614b52565b94505060806151448a828b01614b52565b93505060a06151558a828b01614b52565b92505060c06151668a828b01614bab565b91505092959891949750929550565b60008115159050919050565b61518a81615175565b82525050565b60006020820190506151a56000830184615181565b92915050565b6000806000606084860312156151c4576151c361498f565b5b60006151d286828701614b52565b93505060206151e386828701614b52565b92505060406151f486828701614b52565b9150509250925092565b600080604083850312156152155761521461498f565b5b600061522385828601614b52565b925050602061523485828601614b52565b9150509250929050565b61524781615175565b811461525257600080fd5b50565b6000813590506152648161523e565b92915050565b6000602082840312156152805761527f61498f565b5b600061528e84828501615255565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6152cc81614ad5565b82525050565b60006152de83836152c3565b60208301905092915050565b6000602082019050919050565b600061530282615297565b61530c81856152a2565b9350615317836152b3565b8060005b8381101561534857815161532f88826152d2565b975061533a836152ea565b92505060018101905061531b565b5085935050505092915050565b6000604082019050818103600083015261536f81856152f7565b9050818103602083015261538381846152f7565b90509392505050565b6000806000806000806000806080898b0312156153ac576153ab61498f565b5b600089013567ffffffffffffffff8111156153ca576153c9614994565b5b6153d68b828c016149a8565b9850985050602089013567ffffffffffffffff8111156153f9576153f8614994565b5b6154058b828c016149fe565b9650965050604089013567ffffffffffffffff81111561542857615427614994565b5b6154348b828c016149a8565b9450945050606089013567ffffffffffffffff81111561545757615456614994565b5b6154638b828c016149fe565b92509250509295985092959890939650565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006154de82614ad5565b91506154e983614ad5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561551e5761551d6154a4565b5b828201905092915050565b600061553482614ad5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615567576155666154a4565b5b600182019050919050565b60008151905061558181614b94565b92915050565b60006020828403121561559d5761559c61498f565b5b60006155ab84828501615572565b91505092915050565b60006155bf82614ad5565b91506155ca83614ad5565b9250828210156155dd576155dc6154a4565b5b828203905092915050565b600060a0820190506155fd6000830188614adf565b61560a6020830187614adf565b6156176040830186614adf565b6156246060830185614adf565b6156316080830184614adf565b9695505050505050565b60008151905061564a8161523e565b92915050565b6000602082840312156156665761566561498f565b5b60006156748482850161563b565b91505092915050565b60006060820190506156926000830186614d6d565b61569f6020830185614adf565b6156ac6040830184614adf565b949350505050565b600082825260208201905092915050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b6000615721602c836156b4565b915061572c826156c5565b604082019050919050565b6000602082019050818103600083015261575081615714565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b60006157b3602c836156b4565b91506157be82615757565b604082019050919050565b600060208201905081810360008301526157e2816157a6565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061581f6020836156b4565b915061582a826157e9565b602082019050919050565b6000602082019050818103600083015261584e81615812565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006040820190506158996000830185614d6d565b6158a66020830184614adf565b9392505050565b60006040820190506158c26000830185614d6d565b6158cf6020830184614d6d565b9392505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000615932602e836156b4565b915061593d826158d6565b604082019050919050565b6000602082019050818103600083015261596181615925565b9050919050565b600060808201905061597d6000830187614d6d565b61598a6020830186614adf565b6159976040830185614d6d565b6159a46060830184614d6d565b95945050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615a096026836156b4565b9150615a14826159ad565b604082019050919050565b60006020820190508181036000830152615a38816159fc565b9050919050565b600081905092915050565b7f4c6f636b6564476f6c6400000000000000000000000000000000000000000000600082015250565b6000615a80600a83615a3f565b9150615a8b82615a4a565b600a82019050919050565b6000615aa182615a73565b9150819050919050565b600081519050615aba81614b3b565b92915050565b600060208284031215615ad657615ad561498f565b5b6000615ae484828501615aab565b91505092915050565b7f476f7665726e616e636500000000000000000000000000000000000000000000600082015250565b6000615b23600a83615a3f565b9150615b2e82615aed565b600a82019050919050565b6000615b4482615b16565b9150819050919050565b7f45524331393637557067726164653a207570677261646520627265616b73206660008201527f7572746865722075706772616465730000000000000000000000000000000000602082015250565b6000615baa602f836156b4565b9150615bb582615b4e565b604082019050919050565b60006020820190508181036000830152615bd981615b9d565b9050919050565b60008060408385031215615bf757615bf661498f565b5b6000615c0585828601615572565b9250506020615c1685828601615572565b9150509250929050565b7f476f6c64546f6b656e0000000000000000000000000000000000000000000000600082015250565b6000615c56600983615a3f565b9150615c6182615c20565b600982019050919050565b6000615c7782615c49565b9150819050919050565b600060a082019050615c966000830188614d6d565b615ca36020830187614adf565b615cb06040830186614d6d565b615cbd6060830185614d6d565b615cca6080830184614adf565b9695505050505050565b7f456c656374696f6e000000000000000000000000000000000000000000000000600082015250565b6000615d0a600883615a3f565b9150615d1582615cd4565b600882019050919050565b6000615d2b82615cfd565b9150819050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000615d91602b836156b4565b9150615d9c82615d35565b604082019050919050565b60006020820190508181036000830152615dc081615d84565b9050919050565b7f4163636f756e7473000000000000000000000000000000000000000000000000600082015250565b6000615dfd600883615a3f565b9150615e0882615dc7565b600882019050919050565b6000615e1e82615df0565b9150819050919050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b6000615e84602d836156b4565b9150615e8f82615e28565b604082019050919050565b60006020820190508181036000830152615eb381615e77565b9050919050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b6000615f166026836156b4565b9150615f2182615eba565b604082019050919050565b60006020820190508181036000830152615f4581615f09565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015615f80578082015181840152602081019050615f65565b83811115615f8f576000848401525b50505050565b6000615fa082615f4c565b615faa8185615f57565b9350615fba818560208601615f62565b80840191505092915050565b6000615fd28284615f95565b915081905092915050565b600081519050919050565b6000615ff382615fdd565b615ffd81856156b4565b935061600d818560208601615f62565b61601681614d9c565b840191505092915050565b6000602082019050818103600083015261603b8184615fe8565b90509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220603d8c409e06f41efa2a33e0b9bd5e697713b9f13abbd824cf42c9ef6138797b64736f6c634300080b0033

Deployed ByteCode

0x6080604052600436106102295760003560e01c806384aff2e711610123578063c0c53b8b116100ab578063d52758aa1161006f578063d52758aa146107fd578063f2fde38b14610826578063f340c0d01461084f578063f380ade31461088d578063f8171927146108b657610230565b8063c0c53b8b14610707578063c7fb232814610730578063c9a101f31461076d578063d0ebdbe714610796578063d15ca4ed146107bf57610230565b80639fd0506d116100f25780639fd0506d146105fa578063a020c8de14610625578063acd201d014610662578063b09bdc5e1461069f578063b187bd26146106dc57610230565b806384aff2e71461053e5780638da5cb5b1461057b5780639468ba0e146105a657806395145221146105d157610230565b80633f4ba83a116101b15780635fd5c95e116101755780635fd5c95e14610491578063715018a6146104ce5780637b103999146104e55780637c0d530f146105105780638456cb591461052757610230565b80633f4ba83a146103c757806344dc4970146103de578063481c6a751461041c5780634f1ef2861461044757806354255be01461046357610230565b80632ad9ac41116101f85780632ad9ac41146102f65780632edfd12e146103215780632f842a1a1461034a5780633659cfe6146103735780633cbf58721461039c57610230565b806301c21d591461023557806301d2b6ea146102515780631449edb01461027c57806322e59bd4146102b957610230565b3661023057005b600080fd5b61024f600480360381019061024a9190614a54565b6108f3565b005b34801561025d57600080fd5b50610266610aec565b6040516102739190614aee565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190614b67565b610b8c565b6040516102b09190614aee565b60405180910390f35b3480156102c557600080fd5b506102e060048036038101906102db9190614b67565b610bd8565b6040516102ed9190614aee565b60405180910390f35b34801561030257600080fd5b5061030b610c24565b6040516103189190614aee565b60405180910390f35b34801561032d57600080fd5b5061034860048036038101906103439190614bc0565b610c2a565b005b34801561035657600080fd5b50610371600480360381019061036c9190614c3b565b610dd4565b005b34801561037f57600080fd5b5061039a60048036038101906103959190614b67565b61123e565b005b3480156103a857600080fd5b506103b16113c7565b6040516103be9190614ce9565b60405180910390f35b3480156103d357600080fd5b506103dc6113fd565b005b3480156103ea57600080fd5b5061040560048036038101906104009190614d04565b6114a1565b604051610413929190614d44565b60405180910390f35b34801561042857600080fd5b506104316114e2565b60405161043e9190614d7c565b60405180910390f35b610461600480360381019061045c9190614ed8565b611508565b005b34801561046f57600080fd5b50610478611645565b6040516104889493929190614f34565b60405180910390f35b34801561049d57600080fd5b506104b860048036038101906104b39190614b67565b611661565b6040516104c59190614aee565b60405180910390f35b3480156104da57600080fd5b506104e36116ad565b005b3480156104f157600080fd5b506104fa611735565b6040516105079190614fd8565b60405180910390f35b34801561051c57600080fd5b5061052561175b565b005b34801561053357600080fd5b5061053c6117e9565b005b34801561054a57600080fd5b5061056560048036038101906105609190614ff3565b61188d565b6040516105729190614aee565b60405180910390f35b34801561058757600080fd5b50610590611b63565b60405161059d9190614d7c565b60405180910390f35b3480156105b257600080fd5b506105bb611b8d565b6040516105c89190614ce9565b60405180910390f35b3480156105dd57600080fd5b506105f860048036038101906105f39190615046565b611bc3565b005b34801561060657600080fd5b5061060f611cab565b60405161061c9190614d7c565b60405180910390f35b34801561063157600080fd5b5061064c600480360381019061064791906150d3565b611cf1565b6040516106599190614aee565b60405180910390f35b34801561066e57600080fd5b5061068960048036038101906106849190614b67565b612280565b6040516106969190614aee565b60405180910390f35b3480156106ab57600080fd5b506106c660048036038101906106c19190614b67565b612412565b6040516106d39190614aee565b60405180910390f35b3480156106e857600080fd5b506106f161245e565b6040516106fe9190615190565b60405180910390f35b34801561071357600080fd5b5061072e600480360381019061072991906151ab565b6124a4565b005b34801561073c57600080fd5b50610757600480360381019061075291906151fe565b612654565b6040516107649190614aee565b60405180910390f35b34801561077957600080fd5b50610794600480360381019061078f91906151ab565b6126de565b005b3480156107a257600080fd5b506107bd60048036038101906107b89190614b67565b612af3565b005b3480156107cb57600080fd5b506107e660048036038101906107e19190614d04565b612b7b565b6040516107f4929190614d44565b60405180910390f35b34801561080957600080fd5b50610824600480360381019061081f919061526a565b612c16565b005b34801561083257600080fd5b5061084d60048036038101906108489190614b67565b612d07565b005b34801561085b57600080fd5b5061087660048036038101906108719190614b67565b612dff565b604051610884929190615355565b60405180910390f35b34801561089957600080fd5b506108b460048036038101906108af919061538c565b612fcf565b005b3480156108c257600080fd5b506108dd60048036038101906108d89190614b67565b6132f0565b6040516108ea9190614aee565b60405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461098557336040517f3b2495f100000000000000000000000000000000000000000000000000000000815260040161097c9190614d7c565b60405180910390fd5b61098d61245e565b156109c4576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818190508484905014610a03576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b85859050811015610a9e57610a62868683818110610a2c57610a2b615475565b5b9050602002016020810190610a419190614b67565b858584818110610a5457610a53615475565b5b90506020020135600061339f565b5050838382818110610a7757610a76615475565b5b9050602002013582610a8991906154d3565b91508080610a9690615529565b915050610a0b565b50348114610ae55734816040517f02760fce000000000000000000000000000000000000000000000000000000008152600401610adc929190614d44565b60405180910390fd5b5050505050565b6000606954610af9613648565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5306040518263ffffffff1660e01b8152600401610b319190614d7c565b602060405180830381865afa158015610b4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b729190615587565b47610b7d91906154d3565b610b8791906155b4565b905090565b6000606760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301549050919050565b60695481565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cbc57336040517f3b2495f1000000000000000000000000000000000000000000000000000000008152600401610cb39190614d7c565b60405180910390fd5b610cc461245e565b15610cfb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610d0561370f565b73ffffffffffffffffffffffffffffffffffffffff16632edfd12e87878787876040518663ffffffff1660e01b8152600401610d459594939291906155e8565b6020604051808303816000875af1158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d889190615650565b905080610dcc57856040517f30b7d05a000000000000000000000000000000000000000000000000000000008152600401610dc39190614aee565b60405180910390fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e6657336040517f3b2495f1000000000000000000000000000000000000000000000000000000008152600401610e5d9190614d7c565b60405180910390fd5b610e6e61245e565b15610ea5576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818190508484905014610ee4576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b8383905081101561121c576000610f29878784818110610f0f57610f0e615475565b5b9050602002016020810190610f249190614b67565b612280565b9050848483818110610f3e57610f3d615475565b5b90506020020135811015610fcd57868683818110610f5f57610f5e615475565b5b9050602002016020810190610f749190614b67565b81868685818110610f8857610f87615475565b5b905060200201356040517fd5493527000000000000000000000000000000000000000000000000000000008152600401610fc49392919061567d565b60405180910390fd5b848483818110610fe057610fdf615475565b5b9050602002013560686000898986818110610ffe57610ffd615475565b5b90506020020160208101906110139190614b67565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825461105f91906154d3565b9250508190555084848381811061107957611078615475565b5b905060200201356068600089898681811061109757611096615475565b5b90506020020160208101906110ac9190614b67565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461113591906154d3565b9250508190555084848381811061114f5761114e615475565b5b905060200201358361116191906154d3565b925086868381811061117657611175615475565b5b905060200201602081019061118b9190614b67565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f6b63acc273560d01b849e2d77c42ac2cd2b6ff5e1c775423c52a6e50be320e7b8787868181106111ec576111eb615475565b5b905060200201356040516112009190614aee565b60405180910390a350808061121490615529565b915050610eec565b50806069600082825461122f91906154d3565b92505081905550505050505050565b7f00000000000000000000000007550767a1604af3e504749e284792ff30fb4a5373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156112cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c490615737565b60405180910390fd5b7f00000000000000000000000007550767a1604af3e504749e284792ff30fb4a5373ffffffffffffffffffffffffffffffffffffffff1661130c6137d6565b73ffffffffffffffffffffffffffffffffffffffff1614611362576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611359906157c9565b60405180910390fd5b61136b8161382d565b6113c481600067ffffffffffffffff81111561138a57611389614dad565b5b6040519080825280601f01601f1916602001820160405280156113bc5781602001600182028036833780820191505090505b5060006138ac565b50565b60017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c6113f791906155b4565b60001b81565b611405611cab565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611469576040517f75df51dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114736000613a7d565b7f0e5e3b3fb504c22cf5c42fa07d521225937514c654007e1f12646f89768d6f9460405160405180910390a1565b606760205281600052604060002081815481106114bd57600080fd5b9060005260206000209060020201600091509150508060000154908060010154905082565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f00000000000000000000000007550767a1604af3e504749e284792ff30fb4a5373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90615737565b60405180910390fd5b7f00000000000000000000000007550767a1604af3e504749e284792ff30fb4a5373ffffffffffffffffffffffffffffffffffffffff166115d66137d6565b73ffffffffffffffffffffffffffffffffffffffff161461162c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611623906157c9565b60405180910390fd5b6116358261382d565b611641828260016138ac565b5050565b6000806000806001600260016000935093509350935090919293565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b6116b5613abb565b73ffffffffffffffffffffffffffffffffffffffff166116d3611b63565b73ffffffffffffffffffffffffffffffffffffffff1614611729576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172090615835565b60405180910390fd5b6117336000613ac3565b565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611763613abb565b73ffffffffffffffffffffffffffffffffffffffff16611781611b63565b73ffffffffffffffffffffffffffffffffffffffff16146117d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ce90615835565b60405180910390fd5b6117e76117e2611b63565b613b89565b565b6117f1611cab565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611855576040517f75df51dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61185f6001613a7d565b7fab35696f06e428ebc5ceba8cd17f8fed287baf43440206d1943af1ee53e6d26760405160405180910390a1565b600061189761245e565b156118ce576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806118dc868686613c65565b915091506000606760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806001828054905061193591906155b4565b8154811061194657611945615475565b5b906000526020600020906002020181878154811061196757611966615475565b5b906000526020600020906002020160008201548160000155600182015481600101559050508080548061199d5761199c615855565b5b60019003818190600052602060002090600202016000808201600090556001820160009055505090556119ce613648565b73ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d866040518263ffffffff1660e01b8152600401611a069190614aee565b600060405180830381600087803b158015611a2057600080fd5b505af1158015611a34573d6000803e3d6000fd5b505050506000611a42613ef2565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb89866040518363ffffffff1660e01b8152600401611a7c929190615884565b6020604051808303816000875af1158015611a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abf9190615650565b905080611b055787846040517fbe1b5315000000000000000000000000000000000000000000000000000000008152600401611afc929190615884565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff167f3bb2914428a7565afeafb57ef1a5bad4a2de7be9bf7b41b7e5da505f4b974ce28585604051611b4d929190614d44565b60405180910390a2839450505050509392505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c611bbd91906155b4565b60001b81565b611bcb61245e565b15611c02576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c108760008061339f565b9150506000811415611c225750611ca3565b6000611c36611c30896132f0565b83613fb9565b9050611c4788828989898989613fd2565b80606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000828254611c9991906155b4565b9250508190555050505b505050505050565b600080600060017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c611ce091906155b4565b60001b905080549150819250505090565b6000611cfb61245e565b15611d32576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000606860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415611dfe5788886040517f7a9a71fb000000000000000000000000000000000000000000000000000000008152600401611df59291906158ad565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f6e250cfd645a8eac07044223b0b240549b17fe4a71aab09d925cb413b72b00ae83604051611e5b9190614aee565b60405180910390a36000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254611f3a91906155b4565b925050819055508060696000828254611f5391906155b4565b925050819055506000611f688960008061339f565b5090506000611f774783613fb9565b905060008111156120ca5782811115611f8e578290505b80606860008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254611fe091906155b4565b925050819055506000611ff1613ef2565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8d846040518363ffffffff1660e01b815260040161202b929190615884565b6020604051808303816000875af115801561204a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206e9190615650565b9050806120b4578b826040517fbe1b53150000000000000000000000000000000000000000000000000000000081526004016120ab929190615884565b60405180910390fd5b838214156120c85781945050505050612275565b505b600081846120d891906155b4565b905060006120e4613648565b9050606760008e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060405180604001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166320637d8e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612181573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a59190615587565b426121b091906154d3565b8152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550506122018c838d8d8d8d8d613fd2565b8073ffffffffffffffffffffffffffffffffffffffff16636198e339836040518263ffffffff1660e01b815260040161223a9190614aee565b600060405180830381600087803b15801561225457600080fd5b505af1158015612268573d6000803e3d6000fd5b5050505082955050505050505b979650505050505050565b600080606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546122ce6142fc565b73ffffffffffffffffffffffffffffffffffffffff16633861727285306040518363ffffffff1660e01b81526004016123089291906158ad565b602060405180830381865afa158015612325573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123499190615587565b61235391906154d3565b90506000606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154606860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301546123e791906154d3565b9050808211156124065780826123fd91906155b4565b9250505061240d565b6000925050505b919050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600080600060017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c61249391906155b4565b60001b905080549150819250505090565b600060019054906101000a900460ff166124cc5760008054906101000a900460ff16156124d5565b6124d46143c3565b5b612514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250b90615948565b60405180910390fd5b60008060019054906101000a900460ff161590508015612564576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61256d846143d4565b612576836144e5565b61257f82613ac3565b612587614540565b73ffffffffffffffffffffffffffffffffffffffff16639dca362f6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156125d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f79190615650565b61262d576040517f20188a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561264e5760008060016101000a81548160ff0219169083151502179055505b50505050565b6000606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6126e661245e565b1561271d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006127276142fc565b905060006127378560008061339f565b5090508173ffffffffffffffffffffffffffffffffffffffff1663263ecf7430876040518363ffffffff1660e01b81526004016127759291906158ad565b602060405180830381865afa158015612792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127b69190615650565b15612879578173ffffffffffffffffffffffffffffffffffffffff16631c5a9d9c866040518263ffffffff1660e01b81526004016127f49190614d7c565b6020604051808303816000875af1158015612813573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128379190615650565b61287857846040517fbafbcc5700000000000000000000000000000000000000000000000000000000815260040161286f9190614d7c565b60405180910390fd5b5b6000811415612889575050612aee565b6000612893613648565b73ffffffffffffffffffffffffffffffffffffffff16633f199b40306040518263ffffffff1660e01b81526004016128cb9190614d7c565b602060405180830381865afa1580156128e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061290c9190615587565b905060008282101561292957818361292491906155b4565b61292c565b60005b9050600061293a4783613fb9565b905060008111156129ae5761294d613648565b73ffffffffffffffffffffffffffffffffffffffff1663f83d08ba826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561299457600080fd5b505af11580156129a8573d6000803e3d6000fd5b50505050505b600081836129bc91906155b4565b856129c791906155b4565b905080606860008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254612a1b91906155b4565b925050819055508573ffffffffffffffffffffffffffffffffffffffff1663580d747a8a838b8b6040518563ffffffff1660e01b8152600401612a619493929190615968565b6020604051808303816000875af1158015612a80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa49190615650565b612ae75788856040517fcbf8d8ef000000000000000000000000000000000000000000000000000000008152600401612ade929190615884565b60405180910390fd5b5050505050505b505050565b612afb613abb565b73ffffffffffffffffffffffffffffffffffffffff16612b19611b63565b73ffffffffffffffffffffffffffffffffffffffff1614612b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b6690615835565b60405180910390fd5b612b7881614607565b50565b6000806000606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208481548110612bd157612bd0615475565b5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505090508060000151816020015192509250509250929050565b612c1e613abb565b73ffffffffffffffffffffffffffffffffffffffff16612c3c611b63565b73ffffffffffffffffffffffffffffffffffffffff1614612c92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8990615835565b60405180910390fd5b612c9a6142fc565b73ffffffffffffffffffffffffffffffffffffffff1663d52758aa826040518263ffffffff1660e01b8152600401612cd29190615190565b600060405180830381600087803b158015612cec57600080fd5b505af1158015612d00573d6000803e3d6000fd5b5050505050565b612d0f613abb565b73ffffffffffffffffffffffffffffffffffffffff16612d2d611b63565b73ffffffffffffffffffffffffffffffffffffffff1614612d83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d7a90615835565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612df3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dea90615a1f565b60405180910390fd5b612dfc81613ac3565b50565b6060806000606760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090508067ffffffffffffffff811115612e6357612e62614dad565b5b604051908082528060200260200182016040528015612e915781602001602082028036833780820191505090505b5092508067ffffffffffffffff811115612eae57612ead614dad565b5b604051908082528060200260200182016040528015612edc5781602001602082028036833780820191505090505b50915060005b81811015612fc8576000606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110612f3d57612f3c615475565b5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505090508060000151858381518110612f8457612f83615475565b5b6020026020010181815250508060200151848381518110612fa857612fa7615475565b5b602002602001018181525050508080612fc090615529565b915050612ee2565b5050915091565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461306157336040517f3b2495f10000000000000000000000000000000000000000000000000000000081526004016130589190614d7c565b60405180910390fd5b61306961245e565b156130a0576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85859050888890501415806130bb5750818190508484905014155b156130f2576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060005b8a8a90508110156132135760006131358c8c8481811061311b5761311a615475565b5b90506020020160208101906131309190614b67565b612280565b905089898381811061314a57613149615475565b5b9050602002013581101561318a576040517f97df2d4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131d68c8c848181106131a05761319f615475565b5b90506020020160208101906131b59190614b67565b60008c8c868181106131ca576131c9615475565b5b9050602002013561339f565b50508989838181106131eb576131ea615475565b5b90506020020135846131fd91906154d3565b935050808061320b90615529565b9150506130f8565b5060005b868690508110156132aa5761326e87878381811061323857613237615475565b5b905060200201602081019061324d9190614b67565b8686848181106132605761325f615475565b5b90506020020135600061339f565b505084848281811061328357613282615475565b5b905060200201358261329591906154d3565b915080806132a290615529565b915050613217565b508082146132e4576040517f97df2d4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b60006132fa6142fc565b73ffffffffffffffffffffffffffffffffffffffff16633861727283306040518363ffffffff1660e01b81526004016133349291906158ad565b602060405180830381865afa158015613351573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133759190615587565b9050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008083606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546133f091906154d3565b915082606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015461344091906154d3565b9050808211156134ef57808261345691906155b4565b915081606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055506000905080606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550613590565b81816134fb91906155b4565b905080606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055506000915081606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b60008411156135e8578473ffffffffffffffffffffffffffffffffffffffff167f3ee8e5d1cb8671d12b5b20284bb69c7fc325211a1f957cab060d8a78dcc64fba856040516135df9190614aee565b60405180910390a25b6000831115613640578473ffffffffffffffffffffffffffffffffffffffff167fd1689364af36a1aad50a34377d3bf08cc89d0e1f2ebc154359eb9087a6e81a3e846040516136379190614aee565b60405180910390a25b935093915050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161369790615a96565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016136c99190614ce9565b602060405180830381865afa1580156136e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061370a9190615ac0565b905090565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161375e90615b39565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016137909190614ce9565b602060405180830381865afa1580156137ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137d19190615ac0565b905090565b60006138047f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6146f5565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b613835613abb565b73ffffffffffffffffffffffffffffffffffffffff16613853611b63565b73ffffffffffffffffffffffffffffffffffffffff16146138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138a090615835565b60405180910390fd5b50565b60006138b66137d6565b90506138c1846146ff565b6000835111806138ce5750815b156138df576138dd84846147b8565b505b600061390d7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6147e5565b90508060000160009054906101000a900460ff16613a765760018160000160006101000a81548160ff0219169083151502179055506139d985836040516024016139579190614d7c565b6040516020818303038152906040527f3659cfe6000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506147b8565b5060008160000160006101000a81548160ff0219169083151502179055506139ff6137d6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613a6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a6390615bc0565b60405180910390fd5b613a75856147ef565b5b5050505050565b600060017f8f989356aeb576065c8d201815b96ac9c10cf89197a532e428ebd68581557c2360001c613aaf91906155b4565b60001b90508181555050565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613bf0576040517f0855380c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060017f29f060ba1cf8d3659516b02281c85dcc3e81b4287766ae4751c0f500688be30f60001c613c2291906155b4565b60001b90508181557fd11d57c2c7468878b1035df11c670bcd0091aa840bf8aa166365397622237bea82604051613c599190614d7c565b60405180910390a15050565b600080606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508410613d325783606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490506040517fdee6f574000000000000000000000000000000000000000000000000000000008152600401613d29929190614d44565b60405180910390fd5b600080613d3d613648565b73ffffffffffffffffffffffffffffffffffffffff1663d15ca4ed30876040518363ffffffff1660e01b8152600401613d77929190615884565b6040805180830381865afa158015613d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613db79190615be0565b915091506000606760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208781548110613e0e57613e0d615475565b5b906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050905082816000015114613e8b578060000151836040517f753c4c22000000000000000000000000000000000000000000000000000000008152600401613e82929190614d44565b60405180910390fd5b81816020015114613ed9578060200151826040517f8acd9503000000000000000000000000000000000000000000000000000000008152600401613ed0929190614d44565b60405180910390fd5b8060000151816020015194509450505050935093915050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001613f4190615c6c565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401613f739190614ce9565b602060405180830381865afa158015613f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fb49190615ac0565b905090565b6000818310613fc85781613fca565b825b905092915050565b6000613fdc6142fc565b905060008173ffffffffffffffffffffffffffffffffffffffff16639b95975f8a306040518363ffffffff1660e01b815260040161401b9291906158ad565b602060405180830381865afa158015614038573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061405c9190615587565b9050600061406a8983613fb9565b9050600081111561413d578273ffffffffffffffffffffffffffffffffffffffff16639dfb60818b838b8b896040518663ffffffff1660e01b81526004016140b6959493929190615c81565b6020604051808303816000875af11580156140d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140f99190615650565b61413c5789896040517f88f72d99000000000000000000000000000000000000000000000000000000008152600401614133929190615884565b60405180910390fd5b5b6000818a61414b91906155b4565b9050600081141561415f57505050506142f3565b60008473ffffffffffffffffffffffffffffffffffffffff1663d3e242a48d306040518363ffffffff1660e01b815260040161419c9291906158ad565b602060405180830381865afa1580156141b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141dd9190615587565b905081811015614226578b8b6040517fc7b2786700000000000000000000000000000000000000000000000000000000815260040161421d929190615884565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16636e1984758d848b8b8b6040518663ffffffff1660e01b8152600401614267959493929190615c81565b6020604051808303816000875af1158015614286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142aa9190615650565b6142ed578b8b6040517f21ffa8e90000000000000000000000000000000000000000000000000000000081526004016142e4929190615884565b60405180910390fd5b50505050505b50505050505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161434b90615d20565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161437d9190614ce9565b602060405180830381865afa15801561439a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143be9190615ac0565b905090565b60006143ce3061337c565b15905090565b600060019054906101000a900460ff16614423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161441a90615da7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156144a05761ce10606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506144e2565b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600060019054906101000a900460ff16614534576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161452b90615da7565b60405180910390fd5b61453d81614607565b50565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161458f90615e13565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016145c19190614ce9565b602060405180830381865afa1580156145de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146029190615ac0565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561466e576040517f0855380c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f60a0f5b9f9e81e98216071b85826681c796256fe3d1354ecb675580fba64fa6960405160405180910390a250565b6000819050919050565b6147088161483e565b614747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161473e90615e9a565b60405180910390fd5b806147747f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6146f5565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606147dd838360405180606001604052806027815260200161604460279139614851565b905092915050565b6000819050919050565b6147f8816146ff565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b600080823b905060008111915050919050565b606061485c8461483e565b61489b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161489290615f2c565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516148c39190615fc6565b600060405180830381855af49150503d80600081146148fe576040519150601f19603f3d011682016040523d82523d6000602084013e614903565b606091505b509150915061491382828661491e565b925050509392505050565b6060831561492e5782905061497e565b6000835111156149415782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016149759190616021565b60405180910390fd5b9392505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126149be576149bd614999565b5b8235905067ffffffffffffffff8111156149db576149da61499e565b5b6020830191508360208202830111156149f7576149f66149a3565b5b9250929050565b60008083601f840112614a1457614a13614999565b5b8235905067ffffffffffffffff811115614a3157614a3061499e565b5b602083019150836020820283011115614a4d57614a4c6149a3565b5b9250929050565b60008060008060408587031215614a6e57614a6d61498f565b5b600085013567ffffffffffffffff811115614a8c57614a8b614994565b5b614a98878288016149a8565b9450945050602085013567ffffffffffffffff811115614abb57614aba614994565b5b614ac7878288016149fe565b925092505092959194509250565b6000819050919050565b614ae881614ad5565b82525050565b6000602082019050614b036000830184614adf565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000614b3482614b09565b9050919050565b614b4481614b29565b8114614b4f57600080fd5b50565b600081359050614b6181614b3b565b92915050565b600060208284031215614b7d57614b7c61498f565b5b6000614b8b84828501614b52565b91505092915050565b614b9d81614ad5565b8114614ba857600080fd5b50565b600081359050614bba81614b94565b92915050565b600080600080600060a08688031215614bdc57614bdb61498f565b5b6000614bea88828901614bab565b9550506020614bfb88828901614bab565b9450506040614c0c88828901614bab565b9350506060614c1d88828901614bab565b9250506080614c2e88828901614bab565b9150509295509295909350565b600080600080600060608688031215614c5757614c5661498f565b5b6000614c6588828901614b52565b955050602086013567ffffffffffffffff811115614c8657614c85614994565b5b614c92888289016149a8565b9450945050604086013567ffffffffffffffff811115614cb557614cb4614994565b5b614cc1888289016149fe565b92509250509295509295909350565b6000819050919050565b614ce381614cd0565b82525050565b6000602082019050614cfe6000830184614cda565b92915050565b60008060408385031215614d1b57614d1a61498f565b5b6000614d2985828601614b52565b9250506020614d3a85828601614bab565b9150509250929050565b6000604082019050614d596000830185614adf565b614d666020830184614adf565b9392505050565b614d7681614b29565b82525050565b6000602082019050614d916000830184614d6d565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b614de582614d9c565b810181811067ffffffffffffffff82111715614e0457614e03614dad565b5b80604052505050565b6000614e17614985565b9050614e238282614ddc565b919050565b600067ffffffffffffffff821115614e4357614e42614dad565b5b614e4c82614d9c565b9050602081019050919050565b82818337600083830152505050565b6000614e7b614e7684614e28565b614e0d565b905082815260208101848484011115614e9757614e96614d97565b5b614ea2848285614e59565b509392505050565b600082601f830112614ebf57614ebe614999565b5b8135614ecf848260208601614e68565b91505092915050565b60008060408385031215614eef57614eee61498f565b5b6000614efd85828601614b52565b925050602083013567ffffffffffffffff811115614f1e57614f1d614994565b5b614f2a85828601614eaa565b9150509250929050565b6000608082019050614f496000830187614adf565b614f566020830186614adf565b614f636040830185614adf565b614f706060830184614adf565b95945050505050565b6000819050919050565b6000614f9e614f99614f9484614b09565b614f79565b614b09565b9050919050565b6000614fb082614f83565b9050919050565b6000614fc282614fa5565b9050919050565b614fd281614fb7565b82525050565b6000602082019050614fed6000830184614fc9565b92915050565b60008060006060848603121561500c5761500b61498f565b5b600061501a86828701614b52565b935050602061502b86828701614bab565b925050604061503c86828701614bab565b9150509250925092565b60008060008060008060c087890312156150635761506261498f565b5b600061507189828a01614b52565b965050602061508289828a01614b52565b955050604061509389828a01614b52565b94505060606150a489828a01614b52565b93505060806150b589828a01614b52565b92505060a06150c689828a01614bab565b9150509295509295509295565b600080600080600080600060e0888a0312156150f2576150f161498f565b5b60006151008a828b01614b52565b97505060206151118a828b01614b52565b96505060406151228a828b01614b52565b95505060606151338a828b01614b52565b94505060806151448a828b01614b52565b93505060a06151558a828b01614b52565b92505060c06151668a828b01614bab565b91505092959891949750929550565b60008115159050919050565b61518a81615175565b82525050565b60006020820190506151a56000830184615181565b92915050565b6000806000606084860312156151c4576151c361498f565b5b60006151d286828701614b52565b93505060206151e386828701614b52565b92505060406151f486828701614b52565b9150509250925092565b600080604083850312156152155761521461498f565b5b600061522385828601614b52565b925050602061523485828601614b52565b9150509250929050565b61524781615175565b811461525257600080fd5b50565b6000813590506152648161523e565b92915050565b6000602082840312156152805761527f61498f565b5b600061528e84828501615255565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6152cc81614ad5565b82525050565b60006152de83836152c3565b60208301905092915050565b6000602082019050919050565b600061530282615297565b61530c81856152a2565b9350615317836152b3565b8060005b8381101561534857815161532f88826152d2565b975061533a836152ea565b92505060018101905061531b565b5085935050505092915050565b6000604082019050818103600083015261536f81856152f7565b9050818103602083015261538381846152f7565b90509392505050565b6000806000806000806000806080898b0312156153ac576153ab61498f565b5b600089013567ffffffffffffffff8111156153ca576153c9614994565b5b6153d68b828c016149a8565b9850985050602089013567ffffffffffffffff8111156153f9576153f8614994565b5b6154058b828c016149fe565b9650965050604089013567ffffffffffffffff81111561542857615427614994565b5b6154348b828c016149a8565b9450945050606089013567ffffffffffffffff81111561545757615456614994565b5b6154638b828c016149fe565b92509250509295985092959890939650565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006154de82614ad5565b91506154e983614ad5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561551e5761551d6154a4565b5b828201905092915050565b600061553482614ad5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615567576155666154a4565b5b600182019050919050565b60008151905061558181614b94565b92915050565b60006020828403121561559d5761559c61498f565b5b60006155ab84828501615572565b91505092915050565b60006155bf82614ad5565b91506155ca83614ad5565b9250828210156155dd576155dc6154a4565b5b828203905092915050565b600060a0820190506155fd6000830188614adf565b61560a6020830187614adf565b6156176040830186614adf565b6156246060830185614adf565b6156316080830184614adf565b9695505050505050565b60008151905061564a8161523e565b92915050565b6000602082840312156156665761566561498f565b5b60006156748482850161563b565b91505092915050565b60006060820190506156926000830186614d6d565b61569f6020830185614adf565b6156ac6040830184614adf565b949350505050565b600082825260208201905092915050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b6000615721602c836156b4565b915061572c826156c5565b604082019050919050565b6000602082019050818103600083015261575081615714565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b60006157b3602c836156b4565b91506157be82615757565b604082019050919050565b600060208201905081810360008301526157e2816157a6565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061581f6020836156b4565b915061582a826157e9565b602082019050919050565b6000602082019050818103600083015261584e81615812565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006040820190506158996000830185614d6d565b6158a66020830184614adf565b9392505050565b60006040820190506158c26000830185614d6d565b6158cf6020830184614d6d565b9392505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000615932602e836156b4565b915061593d826158d6565b604082019050919050565b6000602082019050818103600083015261596181615925565b9050919050565b600060808201905061597d6000830187614d6d565b61598a6020830186614adf565b6159976040830185614d6d565b6159a46060830184614d6d565b95945050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615a096026836156b4565b9150615a14826159ad565b604082019050919050565b60006020820190508181036000830152615a38816159fc565b9050919050565b600081905092915050565b7f4c6f636b6564476f6c6400000000000000000000000000000000000000000000600082015250565b6000615a80600a83615a3f565b9150615a8b82615a4a565b600a82019050919050565b6000615aa182615a73565b9150819050919050565b600081519050615aba81614b3b565b92915050565b600060208284031215615ad657615ad561498f565b5b6000615ae484828501615aab565b91505092915050565b7f476f7665726e616e636500000000000000000000000000000000000000000000600082015250565b6000615b23600a83615a3f565b9150615b2e82615aed565b600a82019050919050565b6000615b4482615b16565b9150819050919050565b7f45524331393637557067726164653a207570677261646520627265616b73206660008201527f7572746865722075706772616465730000000000000000000000000000000000602082015250565b6000615baa602f836156b4565b9150615bb582615b4e565b604082019050919050565b60006020820190508181036000830152615bd981615b9d565b9050919050565b60008060408385031215615bf757615bf661498f565b5b6000615c0585828601615572565b9250506020615c1685828601615572565b9150509250929050565b7f476f6c64546f6b656e0000000000000000000000000000000000000000000000600082015250565b6000615c56600983615a3f565b9150615c6182615c20565b600982019050919050565b6000615c7782615c49565b9150819050919050565b600060a082019050615c966000830188614d6d565b615ca36020830187614adf565b615cb06040830186614d6d565b615cbd6060830185614d6d565b615cca6080830184614adf565b9695505050505050565b7f456c656374696f6e000000000000000000000000000000000000000000000000600082015250565b6000615d0a600883615a3f565b9150615d1582615cd4565b600882019050919050565b6000615d2b82615cfd565b9150819050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000615d91602b836156b4565b9150615d9c82615d35565b604082019050919050565b60006020820190508181036000830152615dc081615d84565b9050919050565b7f4163636f756e7473000000000000000000000000000000000000000000000000600082015250565b6000615dfd600883615a3f565b9150615e0882615dc7565b600882019050919050565b6000615e1e82615df0565b9150819050919050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b6000615e84602d836156b4565b9150615e8f82615e28565b604082019050919050565b60006020820190508181036000830152615eb381615e77565b9050919050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b6000615f166026836156b4565b9150615f2182615eba565b604082019050919050565b60006020820190508181036000830152615f4581615f09565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015615f80578082015181840152602081019050615f65565b83811115615f8f576000848401525b50505050565b6000615fa082615f4c565b615faa8185615f57565b9350615fba818560208601615f62565b80840191505092915050565b6000615fd28284615f95565b915081905092915050565b600081519050919050565b6000615ff382615fdd565b615ffd81856156b4565b935061600d818560208601615f62565b61601681614d9c565b840191505092915050565b6000602082019050818103600083015261603b8184615fe8565b90509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220603d8c409e06f41efa2a33e0b9bd5e697713b9f13abbd824cf42c9ef6138797b64736f6c634300080b0033