Address Details
contract
0x0302a7655b850aC1FF5DA07f1877A93b1E5c2F22
- Contract Name
- Account
- Creator
- 0x5bc1c4–68a788 at 0x421dd7–405285
- 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
- 13664407
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
- 2022-09-30T07:48:42.078204Z
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"; /** * @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 { /** * @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. */ struct ScheduledVotes { uint256 toVote; uint256 toWithdraw; mapping(address => uint256) toWithdrawFor; } /** * @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 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 Empty constructor for proxy implementation, `initializer` modifer ensures the * implementation gets initialized. */ // solhint-disable-next-line no-empty-blocks constructor() initializer {} /** * @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(); } } // solhint-disable-next-line no-empty-blocks receive() external payable {} /** * @notice Deposits CELO sent via msg.value as unlocked CELO intended as * votes for groups. * @dev Only callable by the Staked CELO contract, which must restrict which groups are valid. * @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 { if (groups.length != votes.length) { revert GroupsAndVotesArrayLengthsMismatch(); } uint256 totalVotes; for (uint256 i = 0; i < groups.length; i++) { scheduledVotes[groups[i]].toVote += votes[i]; totalVotes += votes[i]; emit VotesScheduled(groups[i], votes[i]); } if (totalVotes != uint256(msg.value)) { revert TotalVotesMismatch(msg.value, totalVotes); } } /** * @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 { if (groups.length != withdrawals.length) { revert GroupsAndVotesArrayLengthsMismatch(); } uint256 totalWithdrawalsDelta; for (uint256 i = 0; i < withdrawals.length; i++) { uint256 celoAvailableForGroup = this.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. * @dev Only callable by the Staked CELO contract, which must restrict which groups are valid. * @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 the 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 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; uint256 immediateWithdrawalAmount = scheduledVotes[group].toVote; 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 { IElection election = getElection(); // The amount of unlocked CELO for group that we want to lock and vote with. uint256 unlockedCeloForGroup = scheduledVotes[group].toVote; // Reset the unlocked CELO amount for group. scheduledVotes[group].toVote = 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 (unlockedCeloForGroup == 0) { return; } // Lock up the unlockedCeloForGroup in LockedGold, which increments the // non-voting LockedGold balance for this contract. getLockedGold().lock{value: unlockedCeloForGroup}(); // Vote for group using the newly locked CELO, reverting if it fails. if (!election.vote(group, unlockedCeloForGroup, voteLesser, voteGreater)) { revert VoteFailed(group, unlockedCeloForGroup); } } /** * @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 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 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 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) external view returns (uint256) { return getElection().getTotalVotesForGroupByAccount(group, address(this)) + scheduledVotes[group].toVote - scheduledVotes[group].toWithdraw; } /** * @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 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]; } function hello() external pure returns (uint256) { return 111; } /** * @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); } }
/_openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967Upgrade { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallSecure( address newImplementation, bytes memory data, bool forceCall ) internal { address oldImplementation = _getImplementation(); // Initial upgrade and setup call _setImplementation(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } // Perform rollback test if not already in progress StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT); if (!rollbackTesting.value) { // Trigger rollback using upgradeTo from the new implementation rollbackTesting.value = true; Address.functionDelegateCall( newImplementation, abi.encodeWithSignature("upgradeTo(address)", oldImplementation) ); rollbackTesting.value = false; // Check rollback was effective require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades"); // Finally reset to the new implementation and log the upgrade _upgradeTo(newImplementation); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
/_openzeppelin/contracts/proxy/beacon/IBeacon.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
/_openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../ERC1967/ERC1967Upgrade.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is ERC1967Upgrade { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; }
/_openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/_openzeppelin/contracts/utils/StorageSlot.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
/_openzeppelin/contracts/utils/math/Math.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
/_openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
/_openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
/_openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/_openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
/contracts/Managed.sol
// 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"; /** * @title Used via inheritance to grant special access control to the Manager * contract. */ abstract contract Managed is 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); /** * @notice Used when a passed address is address(0). */ error NullAddress(); /** * @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); } /** * @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); } /** * @notice Sets the manager address. * @param _manager The new manager address. */ function _setManager(address _manager) internal { if (_manager == address(0)) { revert NullAddress(); } manager = _manager; emit ManagerSet(_manager); } }
/contracts/common/UUPSOwnableUpgradeable.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; /** * @title A contract that links UUPSUUpgradeable with OwanbleUpgradeable to gate upgrades. */ abstract contract UUPSOwnableUpgradeable is UUPSUpgradeable, OwnableUpgradeable { /** * @notice Guard method for UUPS (Universal Upgradable Proxy Standard) * See: https://docs.openzeppelin.com/contracts/4.x/api/proxy#transparent-vs-uups * @dev This methods overrides the virtual one in UUPSUpgradeable and * adds the onlyOwner modifer. */ // solhint-disable-next-line no-empty-blocks function _authorizeUpgrade(address) internal override onlyOwner {} }
/contracts/common/UsingRegistryUpgradeable.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "../interfaces/IAccounts.sol"; import "../interfaces/IElection.sol"; import "../interfaces/IGoldToken.sol"; import "../interfaces/ILockedGold.sol"; import "../interfaces/IRegistry.sol"; /** * @title A helper for getting Celo core contracts from the Registry. */ abstract contract UsingRegistryUpgradeable is Initializable { /** * @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 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. IRegistry public 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)); } }
/contracts/interfaces/IAccount.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IAccount { function getTotalCelo() external view returns (uint256); function getCeloForGroup(address) external view returns (uint256); function scheduleVotes(address[] calldata group, uint256[] calldata votes) external payable; function scheduledVotesForGroup(address group) external returns (uint256); function scheduleWithdrawals( address beneficiary, address[] calldata group, uint256[] calldata withdrawals ) external; }
/contracts/interfaces/IAccounts.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IAccounts { function isAccount(address) external view returns (bool); function voteSignerToAccount(address) external view returns (address); function validatorSignerToAccount(address) external view returns (address); function attestationSignerToAccount(address) external view returns (address); function signerToAccount(address) external view returns (address); function getAttestationSigner(address) external view returns (address); function getValidatorSigner(address) external view returns (address); function getVoteSigner(address) external view returns (address); function hasAuthorizedVoteSigner(address) external view returns (bool); function hasAuthorizedValidatorSigner(address) external view returns (bool); function hasAuthorizedAttestationSigner(address) external view returns (bool); function setAccountDataEncryptionKey(bytes calldata) external; function setMetadataURL(string calldata) external; function setName(string calldata) external; function setWalletAddress( address, uint8, bytes32, bytes32 ) external; function setAccount( string calldata, bytes calldata, address, uint8, bytes32, bytes32 ) external; function getDataEncryptionKey(address) external view returns (bytes memory); function getWalletAddress(address) external view returns (address); function getMetadataURL(address) external view returns (string memory); function batchGetMetadataURL(address[] calldata) external view returns (uint256[] memory, bytes memory); function getName(address) external view returns (string memory); function authorizeVoteSigner( address, uint8, bytes32, bytes32 ) external; function authorizeValidatorSigner( address, uint8, bytes32, bytes32 ) external; function authorizeValidatorSignerWithPublicKey( address, uint8, bytes32, bytes32, bytes calldata ) external; function authorizeValidatorSignerWithKeys( address, uint8, bytes32, bytes32, bytes calldata, bytes calldata, bytes calldata ) external; function authorizeAttestationSigner( address, uint8, bytes32, bytes32 ) external; function createAccount() external returns (bool); }
/contracts/interfaces/IElection.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IElection { function electValidatorSigners() external view returns (address[] memory); function electNValidatorSigners(uint256, uint256) external view returns (address[] memory); function vote( address, uint256, address, address ) external returns (bool); function activate(address) external returns (bool); function 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); // view functions function getElectableValidators() external view returns (uint256, uint256); function getElectabilityThreshold() external view returns (uint256); function getNumVotesReceivable(address) external view returns (uint256); function getTotalVotes() external view returns (uint256); function getActiveVotes() external view returns (uint256); function getTotalVotesByAccount(address) external view returns (uint256); function getPendingVotesForGroupByAccount(address, address) external view returns (uint256); function getActiveVotesForGroupByAccount(address, address) external view returns (uint256); function getTotalVotesForGroupByAccount(address, address) external view returns (uint256); function getActiveVoteUnitsForGroupByAccount(address, address) external view returns (uint256); function getTotalVotesForGroup(address) external view returns (uint256); function getActiveVotesForGroup(address) external view returns (uint256); function getPendingVotesForGroup(address) external view returns (uint256); function getGroupEligibility(address) external view returns (bool); function getGroupEpochRewards( address, uint256, uint256[] calldata ) external view returns (uint256); function getGroupsVotedForByAccount(address) external view returns (address[] memory); function getEligibleValidatorGroups() external view returns (address[] memory); function getTotalVotesForEligibleValidatorGroups() external view returns (address[] memory, uint256[] memory); function getCurrentValidatorSigners() external view returns (address[] memory); function canReceiveVotes(address, uint256) external view returns (bool); function hasActivatablePendingVotes(address, address) external view returns (bool); // only owner function setElectableValidators(uint256, uint256) external returns (bool); function setMaxNumGroupsVotedFor(uint256) external returns (bool); function setElectabilityThreshold(uint256) external returns (bool); // only VM function distributeEpochRewards( address, uint256, address, address ) external; function maxNumGroupsVotedFor() external view returns (uint256); }
/contracts/interfaces/IGoldToken.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IGoldToken { function transfer(address to, uint256 value) external returns (bool); function transferWithComment( address to, uint256 value, string calldata comment ) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function increaseAllowance(address spender, uint256 value) external returns (bool); function decreaseAllowance(address spender, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function balanceOf(address owner) external view returns (uint256); }
/contracts/interfaces/ILockedGold.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface ILockedGold { function unlockingPeriod() external view returns (uint256); function incrementNonvotingAccountBalance(address, uint256) external; function decrementNonvotingAccountBalance(address, uint256) external; function getAccountTotalLockedGold(address) external view returns (uint256); function getTotalLockedGold() external view returns (uint256); function getPendingWithdrawal(address, uint256) external view returns (uint256, uint256); function getPendingWithdrawals(address) external view returns (uint256[] memory, uint256[] memory); function getTotalPendingWithdrawals(address) external view returns (uint256); function lock() external payable; function unlock(uint256) external; function relock(uint256, uint256) external; function withdraw(uint256) external; function slash( address account, uint256 penalty, address reporter, uint256 reward, address[] calldata lessers, address[] calldata greaters, uint256[] calldata indices ) external; function isSlasher(address) external view returns (bool); }
/contracts/interfaces/IRegistry.sol
//SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.11; interface IRegistry { function setAddressFor(string calldata, address) external; function getAddressForOrDie(bytes32) external view returns (address); function getAddressFor(bytes32) external view returns (address); function getAddressForStringOrDie(string calldata identifier) external view returns (address); function getAddressForString(string calldata identifier) external view returns (address); function isOneOf(bytes32[] calldata, address) external view returns (bool); }
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":"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":"NullAddress","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":"VoteFailed","inputs":[{"type":"address","name":"group","internalType":"address"},{"type":"uint256","name":"amount","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":"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":"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":"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"}],"name":"hello","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":"address","name":"","internalType":"address"}],"name":"manager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","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":"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":"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":"setManager","inputs":[{"type":"address","name":"_manager","internalType":"address"}]},{"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":"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":[{"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
0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff168152503480156200004457600080fd5b50600060019054906101000a900460ff166200006f5760008054906101000a900460ff161562000080565b6200007f6200013c60201b60201c565b5b620000c2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000b99062000204565b60405180910390fd5b60008060019054906101000a900460ff16159050801562000113576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015620001355760008060016101000a81548160ff0219169083151502179055505b5062000226565b600062000154306200015a60201b6200255f1760201c565b15905090565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000620001ec602e836200017d565b9150620001f9826200018e565b604082019050919050565b600060208201905081810360008301526200021f81620001dd565b9050919050565b608051614aa36200025760003960008181610e4e01528181610edd0152818161103e01526110cd0152614aa36000f3fe60806040526004361061016a5760003560e01c80637b103999116100d1578063c0c53b8b1161008a578063d0ebdbe711610064578063d0ebdbe714610554578063d15ca4ed1461057d578063f2fde38b146105bb578063f340c0d0146105e457610171565b8063c0c53b8b146104c5578063c7fb2328146104ee578063c9a101f31461052b57610171565b80637b1039991461037b57806384aff2e7146103a65780638da5cb5b146103e3578063a020c8de1461040e578063acd201d01461044b578063b09bdc5e1461048857610171565b80633659cfe6116101235780633659cfe61461027957806344dc4970146102a2578063481c6a75146102e05780634f1ef2861461030b5780635fd5c95e14610327578063715018a61461036457610171565b806301c21d591461017657806301d2b6ea146101925780631449edb0146101bd57806319ff1d21146101fa5780632ad9ac41146102255780632f842a1a1461025057610171565b3661017157005b600080fd5b610190600480360381019061018b91906137ad565b610622565b005b34801561019e57600080fd5b506101a76108b5565b6040516101b49190613847565b60405180910390f35b3480156101c957600080fd5b506101e460048036038101906101df91906138c0565b610955565b6040516101f19190613847565b60405180910390f35b34801561020657600080fd5b5061020f6109a1565b60405161021c9190613847565b60405180910390f35b34801561023157600080fd5b5061023a6109aa565b6040516102479190613847565b60405180910390f35b34801561025c57600080fd5b50610277600480360381019061027291906138ed565b6109b0565b005b34801561028557600080fd5b506102a0600480360381019061029b91906138c0565b610e4c565b005b3480156102ae57600080fd5b506102c960048036038101906102c491906139ae565b610fd5565b6040516102d79291906139ee565b60405180910390f35b3480156102ec57600080fd5b506102f5611016565b6040516103029190613a26565b60405180910390f35b61032560048036038101906103209190613b82565b61103c565b005b34801561033357600080fd5b5061034e600480360381019061034991906138c0565b611179565b60405161035b9190613847565b60405180910390f35b34801561037057600080fd5b506103796111c5565b005b34801561038757600080fd5b5061039061124d565b60405161039d9190613c3d565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190613c58565b611273565b6040516103da9190613847565b60405180910390f35b3480156103ef57600080fd5b506103f861150a565b6040516104059190613a26565b60405180910390f35b34801561041a57600080fd5b5061043560048036038101906104309190613cab565b611534565b6040516104429190613847565b60405180910390f35b34801561045757600080fd5b50610472600480360381019061046d91906138c0565b611aa9565b60405161047f9190613847565b60405180910390f35b34801561049457600080fd5b506104af60048036038101906104aa91906138c0565b611bcf565b6040516104bc9190613847565b60405180910390f35b3480156104d157600080fd5b506104ec60048036038101906104e79190613d4d565b611c1b565b005b3480156104fa57600080fd5b5061051560048036038101906105109190613da0565b611dcb565b6040516105229190613847565b60405180910390f35b34801561053757600080fd5b50610552600480360381019061054d9190613d4d565b611e55565b005b34801561056057600080fd5b5061057b600480360381019061057691906138c0565b612174565b005b34801561058957600080fd5b506105a4600480360381019061059f91906139ae565b6121fc565b6040516105b29291906139ee565b60405180910390f35b3480156105c757600080fd5b506105e260048036038101906105dd91906138c0565b612297565b005b3480156105f057600080fd5b5061060b600480360381019061060691906138c0565b61238f565b604051610619929190613e9e565b60405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106b457336040517f3b2495f10000000000000000000000000000000000000000000000000000000081526004016106ab9190613a26565b60405180910390fd5b8181905084849050146106f3576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b858590508110156108675783838281811061071957610718613ed5565b5b905060200201356068600088888581811061073757610736613ed5565b5b905060200201602081019061074c91906138c0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282546107989190613f33565b925050819055508383828181106107b2576107b1613ed5565b5b90506020020135826107c49190613f33565b91508585828181106107d9576107d8613ed5565b5b90506020020160208101906107ee91906138c0565b73ffffffffffffffffffffffffffffffffffffffff167f3ee8e5d1cb8671d12b5b20284bb69c7fc325211a1f957cab060d8a78dcc64fba85858481811061083857610837613ed5565b5b9050602002013560405161084c9190613847565b60405180910390a2808061085f90613f89565b9150506106fb565b503481146108ae5734816040517f02760fce0000000000000000000000000000000000000000000000000000000081526004016108a59291906139ee565b60405180910390fd5b5050505050565b60006069546108c2612582565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5306040518263ffffffff1660e01b81526004016108fa9190613a26565b602060405180830381865afa158015610917573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093b9190613fe7565b476109469190613f33565b6109509190614014565b905090565b6000606760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6000606f905090565b60695481565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4257336040517f3b2495f1000000000000000000000000000000000000000000000000000000008152600401610a399190613a26565b60405180910390fd5b818190508484905014610a81576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b83839050811015610e2a5760003073ffffffffffffffffffffffffffffffffffffffff1663acd201d0888885818110610ac557610ac4613ed5565b5b9050602002016020810190610ada91906138c0565b6040518263ffffffff1660e01b8152600401610af69190613a26565b602060405180830381865afa158015610b13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b379190613fe7565b9050848483818110610b4c57610b4b613ed5565b5b90506020020135811015610bdb57868683818110610b6d57610b6c613ed5565b5b9050602002016020810190610b8291906138c0565b81868685818110610b9657610b95613ed5565b5b905060200201356040517fd5493527000000000000000000000000000000000000000000000000000000008152600401610bd293929190614048565b60405180910390fd5b848483818110610bee57610bed613ed5565b5b9050602002013560686000898986818110610c0c57610c0b613ed5565b5b9050602002016020810190610c2191906138c0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254610c6d9190613f33565b92505081905550848483818110610c8757610c86613ed5565b5b9050602002013560686000898986818110610ca557610ca4613ed5565b5b9050602002016020810190610cba91906138c0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d439190613f33565b92505081905550848483818110610d5d57610d5c613ed5565b5b9050602002013583610d6f9190613f33565b9250868683818110610d8457610d83613ed5565b5b9050602002016020810190610d9991906138c0565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f6b63acc273560d01b849e2d77c42ac2cd2b6ff5e1c775423c52a6e50be320e7b878786818110610dfa57610df9613ed5565b5b90506020020135604051610e0e9190613847565b60405180910390a3508080610e2290613f89565b915050610a89565b508060696000828254610e3d9190613f33565b92505081905550505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610edb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed290614102565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610f1a612649565b73ffffffffffffffffffffffffffffffffffffffff1614610f70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6790614194565b60405180910390fd5b610f79816126a0565b610fd281600067ffffffffffffffff811115610f9857610f97613a57565b5b6040519080825280601f01601f191660200182016040528015610fca5781602001600182028036833780820191505090505b50600061271f565b50565b60676020528160005260406000208181548110610ff157600080fd5b9060005260206000209060020201600091509150508060000154908060010154905082565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156110cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c290614102565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661110a612649565b73ffffffffffffffffffffffffffffffffffffffff1614611160576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115790614194565b60405180910390fd5b611169826126a0565b6111758282600161271f565b5050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b6111cd6128f0565b73ffffffffffffffffffffffffffffffffffffffff166111eb61150a565b73ffffffffffffffffffffffffffffffffffffffff1614611241576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123890614200565b60405180910390fd5b61124b60006128f8565b565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006112838686866129be565b915091506000606760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905080600182805490506112dc9190614014565b815481106112ed576112ec613ed5565b5b906000526020600020906002020181878154811061130e5761130d613ed5565b5b906000526020600020906002020160008201548160000155600182015481600101559050508080548061134457611343614220565b5b6001900381819060005260206000209060020201600080820160009055600182016000905550509055611375612582565b73ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d866040518263ffffffff1660e01b81526004016113ad9190613847565b600060405180830381600087803b1580156113c757600080fd5b505af11580156113db573d6000803e3d6000fd5b5050505060006113e9612c4b565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb89866040518363ffffffff1660e01b815260040161142392919061424f565b6020604051808303816000875af1158015611442573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146691906142b0565b9050806114ac5787846040517fbe1b53150000000000000000000000000000000000000000000000000000000081526004016114a392919061424f565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff167f3bb2914428a7565afeafb57ef1a5bad4a2de7be9bf7b41b7e5da505f4b974ce285856040516114f49291906139ee565b60405180910390a2839450505050509392505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080606860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156116015788886040517f7a9a71fb0000000000000000000000000000000000000000000000000000000081526004016115f89291906142dd565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f6e250cfd645a8eac07044223b0b240549b17fe4a71aab09d925cb413b72b00ae8360405161165e9190613847565b60405180910390a36000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825461173d9190614014565b9250508190555080606960008282546117569190614014565b925050819055506000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905060008111156118f457818111156117b9578190505b80606860008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600082825461180b9190614014565b92505081905550600061181c612c4b565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8c846040518363ffffffff1660e01b815260040161185692919061424f565b6020604051808303816000875af1158015611875573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189991906142b0565b9050806118df578a826040517fbe1b53150000000000000000000000000000000000000000000000000000000081526004016118d692919061424f565b60405180910390fd5b828214156118f257819350505050611a9e565b505b600081836119029190614014565b9050600061190e612582565b9050606760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060405180604001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166320637d8e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cf9190613fe7565b426119da9190613f33565b815250908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000155602082015181600101555050611a2b8b838c8c8c8c8c612d12565b8073ffffffffffffffffffffffffffffffffffffffff16636198e339836040518263ffffffff1660e01b8152600401611a649190613847565b600060405180830381600087803b158015611a7e57600080fd5b505af1158015611a92573d6000803e3d6000fd5b50505050829450505050505b979650505050505050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154611b3961303c565b73ffffffffffffffffffffffffffffffffffffffff16633861727285306040518363ffffffff1660e01b8152600401611b739291906142dd565b602060405180830381865afa158015611b90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb49190613fe7565b611bbe9190613f33565b611bc89190614014565b9050919050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600060019054906101000a900460ff16611c435760008054906101000a900460ff1615611c4c565b611c4b613103565b5b611c8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c8290614378565b60405180910390fd5b60008060019054906101000a900460ff161590508015611cdb576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611ce484613114565b611ced83613225565b611cf6826128f8565b611cfe613280565b73ffffffffffffffffffffffffffffffffffffffff16639dca362f6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611d4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6e91906142b0565b611da4576040517f20188a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611dc55760008060016101000a81548160ff0219169083151502179055505b50505050565b6000606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000611e5f61303c565b90506000606860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490506000606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508173ffffffffffffffffffffffffffffffffffffffff1663263ecf7430876040518363ffffffff1660e01b8152600401611f2b9291906142dd565b602060405180830381865afa158015611f48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6c91906142b0565b1561202f578173ffffffffffffffffffffffffffffffffffffffff16631c5a9d9c866040518263ffffffff1660e01b8152600401611faa9190613a26565b6020604051808303816000875af1158015611fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fed91906142b0565b61202e57846040517fbafbcc570000000000000000000000000000000000000000000000000000000081526004016120259190613a26565b60405180910390fd5b5b600081141561203f57505061216f565b612047612582565b73ffffffffffffffffffffffffffffffffffffffff1663f83d08ba826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561208e57600080fd5b505af11580156120a2573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663580d747a868387876040518563ffffffff1660e01b81526004016120e69493929190614398565b6020604051808303816000875af1158015612105573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212991906142b0565b61216c5784816040517fcbf8d8ef00000000000000000000000000000000000000000000000000000000815260040161216392919061424f565b60405180910390fd5b50505b505050565b61217c6128f0565b73ffffffffffffffffffffffffffffffffffffffff1661219a61150a565b73ffffffffffffffffffffffffffffffffffffffff16146121f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121e790614200565b60405180910390fd5b6121f981613347565b50565b6000806000606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020848154811061225257612251613ed5565b5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505090508060000151816020015192509250509250929050565b61229f6128f0565b73ffffffffffffffffffffffffffffffffffffffff166122bd61150a565b73ffffffffffffffffffffffffffffffffffffffff1614612313576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230a90614200565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612383576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237a9061444f565b60405180910390fd5b61238c816128f8565b50565b6060806000606760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090508067ffffffffffffffff8111156123f3576123f2613a57565b5b6040519080825280602002602001820160405280156124215781602001602082028036833780820191505090505b5092508067ffffffffffffffff81111561243e5761243d613a57565b5b60405190808252806020026020018201604052801561246c5781602001602082028036833780820191505090505b50915060005b81811015612558576000606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106124cd576124cc613ed5565b5b9060005260206000209060020201604051806040016040529081600082015481526020016001820154815250509050806000015185838151811061251457612513613ed5565b5b602002602001018181525050806020015184838151811061253857612537613ed5565b5b60200260200101818152505050808061255090613f89565b915050612472565b5050915091565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed6040516020016125d1906144c6565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161260391906144f4565b602060405180830381865afa158015612620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126449190614524565b905090565b60006126777f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b613435565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6126a86128f0565b73ffffffffffffffffffffffffffffffffffffffff166126c661150a565b73ffffffffffffffffffffffffffffffffffffffff161461271c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271390614200565b60405180910390fd5b50565b6000612729612649565b90506127348461343f565b6000835111806127415750815b156127525761275084846134f8565b505b60006127807f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b613525565b90508060000160009054906101000a900460ff166128e95760018160000160006101000a81548160ff02191690831515021790555061284c85836040516024016127ca9190613a26565b6040516020818303038152906040527f3659cfe6000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506134f8565b5060008160000160006101000a81548160ff021916908315150217905550612872612649565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146128df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128d6906145c3565b60405180910390fd5b6128e88561352f565b5b5050505050565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508410612a8b5783606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490506040517fdee6f574000000000000000000000000000000000000000000000000000000008152600401612a829291906139ee565b60405180910390fd5b600080612a96612582565b73ffffffffffffffffffffffffffffffffffffffff1663d15ca4ed30876040518363ffffffff1660e01b8152600401612ad092919061424f565b6040805180830381865afa158015612aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1091906145e3565b915091506000606760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208781548110612b6757612b66613ed5565b5b906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050905082816000015114612be4578060000151836040517f753c4c22000000000000000000000000000000000000000000000000000000008152600401612bdb9291906139ee565b60405180910390fd5b81816020015114612c32578060200151826040517f8acd9503000000000000000000000000000000000000000000000000000000008152600401612c299291906139ee565b60405180910390fd5b8060000151816020015194509450505050935093915050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001612c9a9061466f565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401612ccc91906144f4565b602060405180830381865afa158015612ce9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d0d9190614524565b905090565b6000612d1c61303c565b905060008173ffffffffffffffffffffffffffffffffffffffff16639b95975f8a306040518363ffffffff1660e01b8152600401612d5b9291906142dd565b602060405180830381865afa158015612d78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9c9190613fe7565b90506000612daa898361357e565b90506000811115612e7d578273ffffffffffffffffffffffffffffffffffffffff16639dfb60818b838b8b896040518663ffffffff1660e01b8152600401612df6959493929190614684565b6020604051808303816000875af1158015612e15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e3991906142b0565b612e7c5789896040517f88f72d99000000000000000000000000000000000000000000000000000000008152600401612e7392919061424f565b60405180910390fd5b5b6000818a612e8b9190614014565b90506000811415612e9f5750505050613033565b60008473ffffffffffffffffffffffffffffffffffffffff1663d3e242a48d306040518363ffffffff1660e01b8152600401612edc9291906142dd565b602060405180830381865afa158015612ef9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1d9190613fe7565b905081811015612f66578b8b6040517fc7b27867000000000000000000000000000000000000000000000000000000008152600401612f5d92919061424f565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16636e1984758d848b8b8b6040518663ffffffff1660e01b8152600401612fa7959493929190614684565b6020604051808303816000875af1158015612fc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fea91906142b0565b61302d578b8b6040517f21ffa8e900000000000000000000000000000000000000000000000000000000815260040161302492919061424f565b60405180910390fd5b50505050505b50505050505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161308b90614723565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016130bd91906144f4565b602060405180830381865afa1580156130da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130fe9190614524565b905090565b600061310e3061255f565b15905090565b600060019054906101000a900460ff16613163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161315a906147aa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156131e05761ce10606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613222565b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600060019054906101000a900460ff16613274576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161326b906147aa565b60405180910390fd5b61327d81613347565b50565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed6040516020016132cf90614816565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161330191906144f4565b602060405180830381865afa15801561331e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133429190614524565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156133ae576040517fe99d5ac500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f60a0f5b9f9e81e98216071b85826681c796256fe3d1354ecb675580fba64fa6960405160405180910390a250565b6000819050919050565b61344881613597565b613487576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161347e9061489d565b60405180910390fd5b806134b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b613435565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606061351d8383604051806060016040528060278152602001614a47602791396135aa565b905092915050565b6000819050919050565b6135388161343f565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b600081831061358d578161358f565b825b905092915050565b600080823b905060008111915050919050565b60606135b584613597565b6135f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135eb9061492f565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161361c91906149c9565b600060405180830381855af49150503d8060008114613657576040519150601f19603f3d011682016040523d82523d6000602084013e61365c565b606091505b509150915061366c828286613677565b925050509392505050565b60608315613687578290506136d7565b60008351111561369a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136ce9190614a24565b60405180910390fd5b9392505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112613717576137166136f2565b5b8235905067ffffffffffffffff811115613734576137336136f7565b5b6020830191508360208202830111156137505761374f6136fc565b5b9250929050565b60008083601f84011261376d5761376c6136f2565b5b8235905067ffffffffffffffff81111561378a576137896136f7565b5b6020830191508360208202830111156137a6576137a56136fc565b5b9250929050565b600080600080604085870312156137c7576137c66136e8565b5b600085013567ffffffffffffffff8111156137e5576137e46136ed565b5b6137f187828801613701565b9450945050602085013567ffffffffffffffff811115613814576138136136ed565b5b61382087828801613757565b925092505092959194509250565b6000819050919050565b6138418161382e565b82525050565b600060208201905061385c6000830184613838565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061388d82613862565b9050919050565b61389d81613882565b81146138a857600080fd5b50565b6000813590506138ba81613894565b92915050565b6000602082840312156138d6576138d56136e8565b5b60006138e4848285016138ab565b91505092915050565b600080600080600060608688031215613909576139086136e8565b5b6000613917888289016138ab565b955050602086013567ffffffffffffffff811115613938576139376136ed565b5b61394488828901613701565b9450945050604086013567ffffffffffffffff811115613967576139666136ed565b5b61397388828901613757565b92509250509295509295909350565b61398b8161382e565b811461399657600080fd5b50565b6000813590506139a881613982565b92915050565b600080604083850312156139c5576139c46136e8565b5b60006139d3858286016138ab565b92505060206139e485828601613999565b9150509250929050565b6000604082019050613a036000830185613838565b613a106020830184613838565b9392505050565b613a2081613882565b82525050565b6000602082019050613a3b6000830184613a17565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613a8f82613a46565b810181811067ffffffffffffffff82111715613aae57613aad613a57565b5b80604052505050565b6000613ac16136de565b9050613acd8282613a86565b919050565b600067ffffffffffffffff821115613aed57613aec613a57565b5b613af682613a46565b9050602081019050919050565b82818337600083830152505050565b6000613b25613b2084613ad2565b613ab7565b905082815260208101848484011115613b4157613b40613a41565b5b613b4c848285613b03565b509392505050565b600082601f830112613b6957613b686136f2565b5b8135613b79848260208601613b12565b91505092915050565b60008060408385031215613b9957613b986136e8565b5b6000613ba7858286016138ab565b925050602083013567ffffffffffffffff811115613bc857613bc76136ed565b5b613bd485828601613b54565b9150509250929050565b6000819050919050565b6000613c03613bfe613bf984613862565b613bde565b613862565b9050919050565b6000613c1582613be8565b9050919050565b6000613c2782613c0a565b9050919050565b613c3781613c1c565b82525050565b6000602082019050613c526000830184613c2e565b92915050565b600080600060608486031215613c7157613c706136e8565b5b6000613c7f868287016138ab565b9350506020613c9086828701613999565b9250506040613ca186828701613999565b9150509250925092565b600080600080600080600060e0888a031215613cca57613cc96136e8565b5b6000613cd88a828b016138ab565b9750506020613ce98a828b016138ab565b9650506040613cfa8a828b016138ab565b9550506060613d0b8a828b016138ab565b9450506080613d1c8a828b016138ab565b93505060a0613d2d8a828b016138ab565b92505060c0613d3e8a828b01613999565b91505092959891949750929550565b600080600060608486031215613d6657613d656136e8565b5b6000613d74868287016138ab565b9350506020613d85868287016138ab565b9250506040613d96868287016138ab565b9150509250925092565b60008060408385031215613db757613db66136e8565b5b6000613dc5858286016138ab565b9250506020613dd6858286016138ab565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613e158161382e565b82525050565b6000613e278383613e0c565b60208301905092915050565b6000602082019050919050565b6000613e4b82613de0565b613e558185613deb565b9350613e6083613dfc565b8060005b83811015613e91578151613e788882613e1b565b9750613e8383613e33565b925050600181019050613e64565b5085935050505092915050565b60006040820190508181036000830152613eb88185613e40565b90508181036020830152613ecc8184613e40565b90509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613f3e8261382e565b9150613f498361382e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f7e57613f7d613f04565b5b828201905092915050565b6000613f948261382e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613fc757613fc6613f04565b5b600182019050919050565b600081519050613fe181613982565b92915050565b600060208284031215613ffd57613ffc6136e8565b5b600061400b84828501613fd2565b91505092915050565b600061401f8261382e565b915061402a8361382e565b92508282101561403d5761403c613f04565b5b828203905092915050565b600060608201905061405d6000830186613a17565b61406a6020830185613838565b6140776040830184613838565b949350505050565b600082825260208201905092915050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b60006140ec602c8361407f565b91506140f782614090565b604082019050919050565b6000602082019050818103600083015261411b816140df565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b600061417e602c8361407f565b915061418982614122565b604082019050919050565b600060208201905081810360008301526141ad81614171565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006141ea60208361407f565b91506141f5826141b4565b602082019050919050565b60006020820190508181036000830152614219816141dd565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006040820190506142646000830185613a17565b6142716020830184613838565b9392505050565b60008115159050919050565b61428d81614278565b811461429857600080fd5b50565b6000815190506142aa81614284565b92915050565b6000602082840312156142c6576142c56136e8565b5b60006142d48482850161429b565b91505092915050565b60006040820190506142f26000830185613a17565b6142ff6020830184613a17565b9392505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000614362602e8361407f565b915061436d82614306565b604082019050919050565b6000602082019050818103600083015261439181614355565b9050919050565b60006080820190506143ad6000830187613a17565b6143ba6020830186613838565b6143c76040830185613a17565b6143d46060830184613a17565b95945050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061443960268361407f565b9150614444826143dd565b604082019050919050565b600060208201905081810360008301526144688161442c565b9050919050565b600081905092915050565b7f4c6f636b6564476f6c6400000000000000000000000000000000000000000000600082015250565b60006144b0600a8361446f565b91506144bb8261447a565b600a82019050919050565b60006144d1826144a3565b9150819050919050565b6000819050919050565b6144ee816144db565b82525050565b600060208201905061450960008301846144e5565b92915050565b60008151905061451e81613894565b92915050565b60006020828403121561453a576145396136e8565b5b60006145488482850161450f565b91505092915050565b7f45524331393637557067726164653a207570677261646520627265616b73206660008201527f7572746865722075706772616465730000000000000000000000000000000000602082015250565b60006145ad602f8361407f565b91506145b882614551565b604082019050919050565b600060208201905081810360008301526145dc816145a0565b9050919050565b600080604083850312156145fa576145f96136e8565b5b600061460885828601613fd2565b925050602061461985828601613fd2565b9150509250929050565b7f476f6c64546f6b656e0000000000000000000000000000000000000000000000600082015250565b600061465960098361446f565b915061466482614623565b600982019050919050565b600061467a8261464c565b9150819050919050565b600060a0820190506146996000830188613a17565b6146a66020830187613838565b6146b36040830186613a17565b6146c06060830185613a17565b6146cd6080830184613838565b9695505050505050565b7f456c656374696f6e000000000000000000000000000000000000000000000000600082015250565b600061470d60088361446f565b9150614718826146d7565b600882019050919050565b600061472e82614700565b9150819050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000614794602b8361407f565b915061479f82614738565b604082019050919050565b600060208201905081810360008301526147c381614787565b9050919050565b7f4163636f756e7473000000000000000000000000000000000000000000000000600082015250565b600061480060088361446f565b915061480b826147ca565b600882019050919050565b6000614821826147f3565b9150819050919050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b6000614887602d8361407f565b91506148928261482b565b604082019050919050565b600060208201905081810360008301526148b68161487a565b9050919050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b600061491960268361407f565b9150614924826148bd565b604082019050919050565b600060208201905081810360008301526149488161490c565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015614983578082015181840152602081019050614968565b83811115614992576000848401525b50505050565b60006149a38261494f565b6149ad818561495a565b93506149bd818560208601614965565b80840191505092915050565b60006149d58284614998565b915081905092915050565b600081519050919050565b60006149f6826149e0565b614a00818561407f565b9350614a10818560208601614965565b614a1981613a46565b840191505092915050565b60006020820190508181036000830152614a3e81846149eb565b90509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220dd835712cb6f813a1d1e8e94c8d1da8240672349d157fcc52d1c7688b74755b464736f6c634300080b0033
Deployed ByteCode
0x60806040526004361061016a5760003560e01c80637b103999116100d1578063c0c53b8b1161008a578063d0ebdbe711610064578063d0ebdbe714610554578063d15ca4ed1461057d578063f2fde38b146105bb578063f340c0d0146105e457610171565b8063c0c53b8b146104c5578063c7fb2328146104ee578063c9a101f31461052b57610171565b80637b1039991461037b57806384aff2e7146103a65780638da5cb5b146103e3578063a020c8de1461040e578063acd201d01461044b578063b09bdc5e1461048857610171565b80633659cfe6116101235780633659cfe61461027957806344dc4970146102a2578063481c6a75146102e05780634f1ef2861461030b5780635fd5c95e14610327578063715018a61461036457610171565b806301c21d591461017657806301d2b6ea146101925780631449edb0146101bd57806319ff1d21146101fa5780632ad9ac41146102255780632f842a1a1461025057610171565b3661017157005b600080fd5b610190600480360381019061018b91906137ad565b610622565b005b34801561019e57600080fd5b506101a76108b5565b6040516101b49190613847565b60405180910390f35b3480156101c957600080fd5b506101e460048036038101906101df91906138c0565b610955565b6040516101f19190613847565b60405180910390f35b34801561020657600080fd5b5061020f6109a1565b60405161021c9190613847565b60405180910390f35b34801561023157600080fd5b5061023a6109aa565b6040516102479190613847565b60405180910390f35b34801561025c57600080fd5b50610277600480360381019061027291906138ed565b6109b0565b005b34801561028557600080fd5b506102a0600480360381019061029b91906138c0565b610e4c565b005b3480156102ae57600080fd5b506102c960048036038101906102c491906139ae565b610fd5565b6040516102d79291906139ee565b60405180910390f35b3480156102ec57600080fd5b506102f5611016565b6040516103029190613a26565b60405180910390f35b61032560048036038101906103209190613b82565b61103c565b005b34801561033357600080fd5b5061034e600480360381019061034991906138c0565b611179565b60405161035b9190613847565b60405180910390f35b34801561037057600080fd5b506103796111c5565b005b34801561038757600080fd5b5061039061124d565b60405161039d9190613c3d565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190613c58565b611273565b6040516103da9190613847565b60405180910390f35b3480156103ef57600080fd5b506103f861150a565b6040516104059190613a26565b60405180910390f35b34801561041a57600080fd5b5061043560048036038101906104309190613cab565b611534565b6040516104429190613847565b60405180910390f35b34801561045757600080fd5b50610472600480360381019061046d91906138c0565b611aa9565b60405161047f9190613847565b60405180910390f35b34801561049457600080fd5b506104af60048036038101906104aa91906138c0565b611bcf565b6040516104bc9190613847565b60405180910390f35b3480156104d157600080fd5b506104ec60048036038101906104e79190613d4d565b611c1b565b005b3480156104fa57600080fd5b5061051560048036038101906105109190613da0565b611dcb565b6040516105229190613847565b60405180910390f35b34801561053757600080fd5b50610552600480360381019061054d9190613d4d565b611e55565b005b34801561056057600080fd5b5061057b600480360381019061057691906138c0565b612174565b005b34801561058957600080fd5b506105a4600480360381019061059f91906139ae565b6121fc565b6040516105b29291906139ee565b60405180910390f35b3480156105c757600080fd5b506105e260048036038101906105dd91906138c0565b612297565b005b3480156105f057600080fd5b5061060b600480360381019061060691906138c0565b61238f565b604051610619929190613e9e565b60405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106b457336040517f3b2495f10000000000000000000000000000000000000000000000000000000081526004016106ab9190613a26565b60405180910390fd5b8181905084849050146106f3576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b858590508110156108675783838281811061071957610718613ed5565b5b905060200201356068600088888581811061073757610736613ed5565b5b905060200201602081019061074c91906138c0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282546107989190613f33565b925050819055508383828181106107b2576107b1613ed5565b5b90506020020135826107c49190613f33565b91508585828181106107d9576107d8613ed5565b5b90506020020160208101906107ee91906138c0565b73ffffffffffffffffffffffffffffffffffffffff167f3ee8e5d1cb8671d12b5b20284bb69c7fc325211a1f957cab060d8a78dcc64fba85858481811061083857610837613ed5565b5b9050602002013560405161084c9190613847565b60405180910390a2808061085f90613f89565b9150506106fb565b503481146108ae5734816040517f02760fce0000000000000000000000000000000000000000000000000000000081526004016108a59291906139ee565b60405180910390fd5b5050505050565b60006069546108c2612582565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5306040518263ffffffff1660e01b81526004016108fa9190613a26565b602060405180830381865afa158015610917573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093b9190613fe7565b476109469190613f33565b6109509190614014565b905090565b6000606760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6000606f905090565b60695481565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4257336040517f3b2495f1000000000000000000000000000000000000000000000000000000008152600401610a399190613a26565b60405180910390fd5b818190508484905014610a81576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b83839050811015610e2a5760003073ffffffffffffffffffffffffffffffffffffffff1663acd201d0888885818110610ac557610ac4613ed5565b5b9050602002016020810190610ada91906138c0565b6040518263ffffffff1660e01b8152600401610af69190613a26565b602060405180830381865afa158015610b13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b379190613fe7565b9050848483818110610b4c57610b4b613ed5565b5b90506020020135811015610bdb57868683818110610b6d57610b6c613ed5565b5b9050602002016020810190610b8291906138c0565b81868685818110610b9657610b95613ed5565b5b905060200201356040517fd5493527000000000000000000000000000000000000000000000000000000008152600401610bd293929190614048565b60405180910390fd5b848483818110610bee57610bed613ed5565b5b9050602002013560686000898986818110610c0c57610c0b613ed5565b5b9050602002016020810190610c2191906138c0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254610c6d9190613f33565b92505081905550848483818110610c8757610c86613ed5565b5b9050602002013560686000898986818110610ca557610ca4613ed5565b5b9050602002016020810190610cba91906138c0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d439190613f33565b92505081905550848483818110610d5d57610d5c613ed5565b5b9050602002013583610d6f9190613f33565b9250868683818110610d8457610d83613ed5565b5b9050602002016020810190610d9991906138c0565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f6b63acc273560d01b849e2d77c42ac2cd2b6ff5e1c775423c52a6e50be320e7b878786818110610dfa57610df9613ed5565b5b90506020020135604051610e0e9190613847565b60405180910390a3508080610e2290613f89565b915050610a89565b508060696000828254610e3d9190613f33565b92505081905550505050505050565b7f0000000000000000000000000302a7655b850ac1ff5da07f1877a93b1e5c2f2273ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610edb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed290614102565b60405180910390fd5b7f0000000000000000000000000302a7655b850ac1ff5da07f1877a93b1e5c2f2273ffffffffffffffffffffffffffffffffffffffff16610f1a612649565b73ffffffffffffffffffffffffffffffffffffffff1614610f70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6790614194565b60405180910390fd5b610f79816126a0565b610fd281600067ffffffffffffffff811115610f9857610f97613a57565b5b6040519080825280601f01601f191660200182016040528015610fca5781602001600182028036833780820191505090505b50600061271f565b50565b60676020528160005260406000208181548110610ff157600080fd5b9060005260206000209060020201600091509150508060000154908060010154905082565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f0000000000000000000000000302a7655b850ac1ff5da07f1877a93b1e5c2f2273ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156110cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c290614102565b60405180910390fd5b7f0000000000000000000000000302a7655b850ac1ff5da07f1877a93b1e5c2f2273ffffffffffffffffffffffffffffffffffffffff1661110a612649565b73ffffffffffffffffffffffffffffffffffffffff1614611160576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115790614194565b60405180910390fd5b611169826126a0565b6111758282600161271f565b5050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b6111cd6128f0565b73ffffffffffffffffffffffffffffffffffffffff166111eb61150a565b73ffffffffffffffffffffffffffffffffffffffff1614611241576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123890614200565b60405180910390fd5b61124b60006128f8565b565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006112838686866129be565b915091506000606760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905080600182805490506112dc9190614014565b815481106112ed576112ec613ed5565b5b906000526020600020906002020181878154811061130e5761130d613ed5565b5b906000526020600020906002020160008201548160000155600182015481600101559050508080548061134457611343614220565b5b6001900381819060005260206000209060020201600080820160009055600182016000905550509055611375612582565b73ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d866040518263ffffffff1660e01b81526004016113ad9190613847565b600060405180830381600087803b1580156113c757600080fd5b505af11580156113db573d6000803e3d6000fd5b5050505060006113e9612c4b565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb89866040518363ffffffff1660e01b815260040161142392919061424f565b6020604051808303816000875af1158015611442573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146691906142b0565b9050806114ac5787846040517fbe1b53150000000000000000000000000000000000000000000000000000000081526004016114a392919061424f565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff167f3bb2914428a7565afeafb57ef1a5bad4a2de7be9bf7b41b7e5da505f4b974ce285856040516114f49291906139ee565b60405180910390a2839450505050509392505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080606860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156116015788886040517f7a9a71fb0000000000000000000000000000000000000000000000000000000081526004016115f89291906142dd565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f6e250cfd645a8eac07044223b0b240549b17fe4a71aab09d925cb413b72b00ae8360405161165e9190613847565b60405180910390a36000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825461173d9190614014565b9250508190555080606960008282546117569190614014565b925050819055506000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905060008111156118f457818111156117b9578190505b80606860008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600082825461180b9190614014565b92505081905550600061181c612c4b565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8c846040518363ffffffff1660e01b815260040161185692919061424f565b6020604051808303816000875af1158015611875573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189991906142b0565b9050806118df578a826040517fbe1b53150000000000000000000000000000000000000000000000000000000081526004016118d692919061424f565b60405180910390fd5b828214156118f257819350505050611a9e565b505b600081836119029190614014565b9050600061190e612582565b9050606760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060405180604001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166320637d8e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cf9190613fe7565b426119da9190613f33565b815250908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000155602082015181600101555050611a2b8b838c8c8c8c8c612d12565b8073ffffffffffffffffffffffffffffffffffffffff16636198e339836040518263ffffffff1660e01b8152600401611a649190613847565b600060405180830381600087803b158015611a7e57600080fd5b505af1158015611a92573d6000803e3d6000fd5b50505050829450505050505b979650505050505050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154611b3961303c565b73ffffffffffffffffffffffffffffffffffffffff16633861727285306040518363ffffffff1660e01b8152600401611b739291906142dd565b602060405180830381865afa158015611b90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb49190613fe7565b611bbe9190613f33565b611bc89190614014565b9050919050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600060019054906101000a900460ff16611c435760008054906101000a900460ff1615611c4c565b611c4b613103565b5b611c8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c8290614378565b60405180910390fd5b60008060019054906101000a900460ff161590508015611cdb576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611ce484613114565b611ced83613225565b611cf6826128f8565b611cfe613280565b73ffffffffffffffffffffffffffffffffffffffff16639dca362f6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611d4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6e91906142b0565b611da4576040517f20188a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611dc55760008060016101000a81548160ff0219169083151502179055505b50505050565b6000606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000611e5f61303c565b90506000606860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490506000606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508173ffffffffffffffffffffffffffffffffffffffff1663263ecf7430876040518363ffffffff1660e01b8152600401611f2b9291906142dd565b602060405180830381865afa158015611f48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6c91906142b0565b1561202f578173ffffffffffffffffffffffffffffffffffffffff16631c5a9d9c866040518263ffffffff1660e01b8152600401611faa9190613a26565b6020604051808303816000875af1158015611fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fed91906142b0565b61202e57846040517fbafbcc570000000000000000000000000000000000000000000000000000000081526004016120259190613a26565b60405180910390fd5b5b600081141561203f57505061216f565b612047612582565b73ffffffffffffffffffffffffffffffffffffffff1663f83d08ba826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561208e57600080fd5b505af11580156120a2573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663580d747a868387876040518563ffffffff1660e01b81526004016120e69493929190614398565b6020604051808303816000875af1158015612105573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212991906142b0565b61216c5784816040517fcbf8d8ef00000000000000000000000000000000000000000000000000000000815260040161216392919061424f565b60405180910390fd5b50505b505050565b61217c6128f0565b73ffffffffffffffffffffffffffffffffffffffff1661219a61150a565b73ffffffffffffffffffffffffffffffffffffffff16146121f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121e790614200565b60405180910390fd5b6121f981613347565b50565b6000806000606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020848154811061225257612251613ed5565b5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505090508060000151816020015192509250509250929050565b61229f6128f0565b73ffffffffffffffffffffffffffffffffffffffff166122bd61150a565b73ffffffffffffffffffffffffffffffffffffffff1614612313576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230a90614200565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612383576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237a9061444f565b60405180910390fd5b61238c816128f8565b50565b6060806000606760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090508067ffffffffffffffff8111156123f3576123f2613a57565b5b6040519080825280602002602001820160405280156124215781602001602082028036833780820191505090505b5092508067ffffffffffffffff81111561243e5761243d613a57565b5b60405190808252806020026020018201604052801561246c5781602001602082028036833780820191505090505b50915060005b81811015612558576000606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106124cd576124cc613ed5565b5b9060005260206000209060020201604051806040016040529081600082015481526020016001820154815250509050806000015185838151811061251457612513613ed5565b5b602002602001018181525050806020015184838151811061253857612537613ed5565b5b60200260200101818152505050808061255090613f89565b915050612472565b5050915091565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed6040516020016125d1906144c6565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161260391906144f4565b602060405180830381865afa158015612620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126449190614524565b905090565b60006126777f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b613435565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6126a86128f0565b73ffffffffffffffffffffffffffffffffffffffff166126c661150a565b73ffffffffffffffffffffffffffffffffffffffff161461271c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271390614200565b60405180910390fd5b50565b6000612729612649565b90506127348461343f565b6000835111806127415750815b156127525761275084846134f8565b505b60006127807f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b613525565b90508060000160009054906101000a900460ff166128e95760018160000160006101000a81548160ff02191690831515021790555061284c85836040516024016127ca9190613a26565b6040516020818303038152906040527f3659cfe6000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506134f8565b5060008160000160006101000a81548160ff021916908315150217905550612872612649565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146128df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128d6906145c3565b60405180910390fd5b6128e88561352f565b5b5050505050565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508410612a8b5783606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490506040517fdee6f574000000000000000000000000000000000000000000000000000000008152600401612a829291906139ee565b60405180910390fd5b600080612a96612582565b73ffffffffffffffffffffffffffffffffffffffff1663d15ca4ed30876040518363ffffffff1660e01b8152600401612ad092919061424f565b6040805180830381865afa158015612aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1091906145e3565b915091506000606760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208781548110612b6757612b66613ed5565b5b906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050905082816000015114612be4578060000151836040517f753c4c22000000000000000000000000000000000000000000000000000000008152600401612bdb9291906139ee565b60405180910390fd5b81816020015114612c32578060200151826040517f8acd9503000000000000000000000000000000000000000000000000000000008152600401612c299291906139ee565b60405180910390fd5b8060000151816020015194509450505050935093915050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001612c9a9061466f565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401612ccc91906144f4565b602060405180830381865afa158015612ce9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d0d9190614524565b905090565b6000612d1c61303c565b905060008173ffffffffffffffffffffffffffffffffffffffff16639b95975f8a306040518363ffffffff1660e01b8152600401612d5b9291906142dd565b602060405180830381865afa158015612d78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9c9190613fe7565b90506000612daa898361357e565b90506000811115612e7d578273ffffffffffffffffffffffffffffffffffffffff16639dfb60818b838b8b896040518663ffffffff1660e01b8152600401612df6959493929190614684565b6020604051808303816000875af1158015612e15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e3991906142b0565b612e7c5789896040517f88f72d99000000000000000000000000000000000000000000000000000000008152600401612e7392919061424f565b60405180910390fd5b5b6000818a612e8b9190614014565b90506000811415612e9f5750505050613033565b60008473ffffffffffffffffffffffffffffffffffffffff1663d3e242a48d306040518363ffffffff1660e01b8152600401612edc9291906142dd565b602060405180830381865afa158015612ef9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1d9190613fe7565b905081811015612f66578b8b6040517fc7b27867000000000000000000000000000000000000000000000000000000008152600401612f5d92919061424f565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16636e1984758d848b8b8b6040518663ffffffff1660e01b8152600401612fa7959493929190614684565b6020604051808303816000875af1158015612fc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fea91906142b0565b61302d578b8b6040517f21ffa8e900000000000000000000000000000000000000000000000000000000815260040161302492919061424f565b60405180910390fd5b50505050505b50505050505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161308b90614723565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016130bd91906144f4565b602060405180830381865afa1580156130da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130fe9190614524565b905090565b600061310e3061255f565b15905090565b600060019054906101000a900460ff16613163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161315a906147aa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156131e05761ce10606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613222565b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600060019054906101000a900460ff16613274576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161326b906147aa565b60405180910390fd5b61327d81613347565b50565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed6040516020016132cf90614816565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161330191906144f4565b602060405180830381865afa15801561331e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133429190614524565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156133ae576040517fe99d5ac500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f60a0f5b9f9e81e98216071b85826681c796256fe3d1354ecb675580fba64fa6960405160405180910390a250565b6000819050919050565b61344881613597565b613487576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161347e9061489d565b60405180910390fd5b806134b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b613435565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606061351d8383604051806060016040528060278152602001614a47602791396135aa565b905092915050565b6000819050919050565b6135388161343f565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b600081831061358d578161358f565b825b905092915050565b600080823b905060008111915050919050565b60606135b584613597565b6135f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135eb9061492f565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161361c91906149c9565b600060405180830381855af49150503d8060008114613657576040519150601f19603f3d011682016040523d82523d6000602084013e61365c565b606091505b509150915061366c828286613677565b925050509392505050565b60608315613687578290506136d7565b60008351111561369a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136ce9190614a24565b60405180910390fd5b9392505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112613717576137166136f2565b5b8235905067ffffffffffffffff811115613734576137336136f7565b5b6020830191508360208202830111156137505761374f6136fc565b5b9250929050565b60008083601f84011261376d5761376c6136f2565b5b8235905067ffffffffffffffff81111561378a576137896136f7565b5b6020830191508360208202830111156137a6576137a56136fc565b5b9250929050565b600080600080604085870312156137c7576137c66136e8565b5b600085013567ffffffffffffffff8111156137e5576137e46136ed565b5b6137f187828801613701565b9450945050602085013567ffffffffffffffff811115613814576138136136ed565b5b61382087828801613757565b925092505092959194509250565b6000819050919050565b6138418161382e565b82525050565b600060208201905061385c6000830184613838565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061388d82613862565b9050919050565b61389d81613882565b81146138a857600080fd5b50565b6000813590506138ba81613894565b92915050565b6000602082840312156138d6576138d56136e8565b5b60006138e4848285016138ab565b91505092915050565b600080600080600060608688031215613909576139086136e8565b5b6000613917888289016138ab565b955050602086013567ffffffffffffffff811115613938576139376136ed565b5b61394488828901613701565b9450945050604086013567ffffffffffffffff811115613967576139666136ed565b5b61397388828901613757565b92509250509295509295909350565b61398b8161382e565b811461399657600080fd5b50565b6000813590506139a881613982565b92915050565b600080604083850312156139c5576139c46136e8565b5b60006139d3858286016138ab565b92505060206139e485828601613999565b9150509250929050565b6000604082019050613a036000830185613838565b613a106020830184613838565b9392505050565b613a2081613882565b82525050565b6000602082019050613a3b6000830184613a17565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613a8f82613a46565b810181811067ffffffffffffffff82111715613aae57613aad613a57565b5b80604052505050565b6000613ac16136de565b9050613acd8282613a86565b919050565b600067ffffffffffffffff821115613aed57613aec613a57565b5b613af682613a46565b9050602081019050919050565b82818337600083830152505050565b6000613b25613b2084613ad2565b613ab7565b905082815260208101848484011115613b4157613b40613a41565b5b613b4c848285613b03565b509392505050565b600082601f830112613b6957613b686136f2565b5b8135613b79848260208601613b12565b91505092915050565b60008060408385031215613b9957613b986136e8565b5b6000613ba7858286016138ab565b925050602083013567ffffffffffffffff811115613bc857613bc76136ed565b5b613bd485828601613b54565b9150509250929050565b6000819050919050565b6000613c03613bfe613bf984613862565b613bde565b613862565b9050919050565b6000613c1582613be8565b9050919050565b6000613c2782613c0a565b9050919050565b613c3781613c1c565b82525050565b6000602082019050613c526000830184613c2e565b92915050565b600080600060608486031215613c7157613c706136e8565b5b6000613c7f868287016138ab565b9350506020613c9086828701613999565b9250506040613ca186828701613999565b9150509250925092565b600080600080600080600060e0888a031215613cca57613cc96136e8565b5b6000613cd88a828b016138ab565b9750506020613ce98a828b016138ab565b9650506040613cfa8a828b016138ab565b9550506060613d0b8a828b016138ab565b9450506080613d1c8a828b016138ab565b93505060a0613d2d8a828b016138ab565b92505060c0613d3e8a828b01613999565b91505092959891949750929550565b600080600060608486031215613d6657613d656136e8565b5b6000613d74868287016138ab565b9350506020613d85868287016138ab565b9250506040613d96868287016138ab565b9150509250925092565b60008060408385031215613db757613db66136e8565b5b6000613dc5858286016138ab565b9250506020613dd6858286016138ab565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613e158161382e565b82525050565b6000613e278383613e0c565b60208301905092915050565b6000602082019050919050565b6000613e4b82613de0565b613e558185613deb565b9350613e6083613dfc565b8060005b83811015613e91578151613e788882613e1b565b9750613e8383613e33565b925050600181019050613e64565b5085935050505092915050565b60006040820190508181036000830152613eb88185613e40565b90508181036020830152613ecc8184613e40565b90509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613f3e8261382e565b9150613f498361382e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f7e57613f7d613f04565b5b828201905092915050565b6000613f948261382e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613fc757613fc6613f04565b5b600182019050919050565b600081519050613fe181613982565b92915050565b600060208284031215613ffd57613ffc6136e8565b5b600061400b84828501613fd2565b91505092915050565b600061401f8261382e565b915061402a8361382e565b92508282101561403d5761403c613f04565b5b828203905092915050565b600060608201905061405d6000830186613a17565b61406a6020830185613838565b6140776040830184613838565b949350505050565b600082825260208201905092915050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b60006140ec602c8361407f565b91506140f782614090565b604082019050919050565b6000602082019050818103600083015261411b816140df565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b600061417e602c8361407f565b915061418982614122565b604082019050919050565b600060208201905081810360008301526141ad81614171565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006141ea60208361407f565b91506141f5826141b4565b602082019050919050565b60006020820190508181036000830152614219816141dd565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006040820190506142646000830185613a17565b6142716020830184613838565b9392505050565b60008115159050919050565b61428d81614278565b811461429857600080fd5b50565b6000815190506142aa81614284565b92915050565b6000602082840312156142c6576142c56136e8565b5b60006142d48482850161429b565b91505092915050565b60006040820190506142f26000830185613a17565b6142ff6020830184613a17565b9392505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000614362602e8361407f565b915061436d82614306565b604082019050919050565b6000602082019050818103600083015261439181614355565b9050919050565b60006080820190506143ad6000830187613a17565b6143ba6020830186613838565b6143c76040830185613a17565b6143d46060830184613a17565b95945050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061443960268361407f565b9150614444826143dd565b604082019050919050565b600060208201905081810360008301526144688161442c565b9050919050565b600081905092915050565b7f4c6f636b6564476f6c6400000000000000000000000000000000000000000000600082015250565b60006144b0600a8361446f565b91506144bb8261447a565b600a82019050919050565b60006144d1826144a3565b9150819050919050565b6000819050919050565b6144ee816144db565b82525050565b600060208201905061450960008301846144e5565b92915050565b60008151905061451e81613894565b92915050565b60006020828403121561453a576145396136e8565b5b60006145488482850161450f565b91505092915050565b7f45524331393637557067726164653a207570677261646520627265616b73206660008201527f7572746865722075706772616465730000000000000000000000000000000000602082015250565b60006145ad602f8361407f565b91506145b882614551565b604082019050919050565b600060208201905081810360008301526145dc816145a0565b9050919050565b600080604083850312156145fa576145f96136e8565b5b600061460885828601613fd2565b925050602061461985828601613fd2565b9150509250929050565b7f476f6c64546f6b656e0000000000000000000000000000000000000000000000600082015250565b600061465960098361446f565b915061466482614623565b600982019050919050565b600061467a8261464c565b9150819050919050565b600060a0820190506146996000830188613a17565b6146a66020830187613838565b6146b36040830186613a17565b6146c06060830185613a17565b6146cd6080830184613838565b9695505050505050565b7f456c656374696f6e000000000000000000000000000000000000000000000000600082015250565b600061470d60088361446f565b9150614718826146d7565b600882019050919050565b600061472e82614700565b9150819050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000614794602b8361407f565b915061479f82614738565b604082019050919050565b600060208201905081810360008301526147c381614787565b9050919050565b7f4163636f756e7473000000000000000000000000000000000000000000000000600082015250565b600061480060088361446f565b915061480b826147ca565b600882019050919050565b6000614821826147f3565b9150819050919050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b6000614887602d8361407f565b91506148928261482b565b604082019050919050565b600060208201905081810360008301526148b68161487a565b9050919050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b600061491960268361407f565b9150614924826148bd565b604082019050919050565b600060208201905081810360008301526149488161490c565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015614983578082015181840152602081019050614968565b83811115614992576000848401525b50505050565b60006149a38261494f565b6149ad818561495a565b93506149bd818560208601614965565b80840191505092915050565b60006149d58284614998565b915081905092915050565b600081519050919050565b60006149f6826149e0565b614a00818561407f565b9350614a10818560208601614965565b614a1981613a46565b840191505092915050565b60006020820190508181036000830152614a3e81846149eb565b90509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220dd835712cb6f813a1d1e8e94c8d1da8240672349d157fcc52d1c7688b74755b464736f6c634300080b0033