Address Details
contract
0x737BCE423D87b8BCCb9e2b3b483082A5fD3B2Fdf
- Contract Name
- Account
- Creator
- 0x5bc1c4–68a788 at 0xf474bf–514547
- 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
- 12556967
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-30T05:19:02.034103Z
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"; /** * @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 { /** * @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 payable 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]; } /** * @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/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":"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":"payable","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
0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff168152503480156200004457600080fd5b50600060019054906101000a900460ff166200006f5760008054906101000a900460ff161562000080565b6200007f6200013c60201b60201c565b5b620000c2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000b99062000204565b60405180910390fd5b60008060019054906101000a900460ff16159050801562000113576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015620001355760008060016101000a81548160ff0219169083151502179055505b5062000226565b600062000154306200015a60201b620025031760201c565b15905090565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000620001ec602e836200017d565b9150620001f9826200018e565b604082019050919050565b600060208201905081810360008301526200021f81620001dd565b9050919050565b608051614a476200025760003960008181610df201528181610e8101528181610fe201526110710152614a476000f3fe60806040526004361061014f5760003560e01c806384aff2e7116100b6578063c7fb23281161006f578063c7fb23281461049b578063c9a101f3146104d8578063d0ebdbe714610501578063d15ca4ed1461052a578063f2fde38b14610568578063f340c0d01461059157610156565b806384aff2e7146103535780638da5cb5b14610390578063a020c8de146103bb578063acd201d0146103f8578063b09bdc5e14610435578063c0c53b8b1461047257610156565b806344dc49701161010857806344dc49701461024f578063481c6a751461028d5780634f1ef286146102b85780635fd5c95e146102d4578063715018a6146103115780637b1039991461032857610156565b806301c21d591461015b57806301d2b6ea146101775780631449edb0146101a25780632ad9ac41146101df5780632f842a1a1461020a5780633659cfe61461022657610156565b3661015657005b600080fd5b61017560048036038101906101709190613751565b6105cf565b005b34801561018357600080fd5b5061018c610862565b60405161019991906137eb565b60405180910390f35b3480156101ae57600080fd5b506101c960048036038101906101c49190613864565b610902565b6040516101d691906137eb565b60405180910390f35b3480156101eb57600080fd5b506101f461094e565b60405161020191906137eb565b60405180910390f35b610224600480360381019061021f9190613891565b610954565b005b34801561023257600080fd5b5061024d60048036038101906102489190613864565b610df0565b005b34801561025b57600080fd5b5061027660048036038101906102719190613952565b610f79565b604051610284929190613992565b60405180910390f35b34801561029957600080fd5b506102a2610fba565b6040516102af91906139ca565b60405180910390f35b6102d260048036038101906102cd9190613b26565b610fe0565b005b3480156102e057600080fd5b506102fb60048036038101906102f69190613864565b61111d565b60405161030891906137eb565b60405180910390f35b34801561031d57600080fd5b50610326611169565b005b34801561033457600080fd5b5061033d6111f1565b60405161034a9190613be1565b60405180910390f35b34801561035f57600080fd5b5061037a60048036038101906103759190613bfc565b611217565b60405161038791906137eb565b60405180910390f35b34801561039c57600080fd5b506103a56114ae565b6040516103b291906139ca565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190613c4f565b6114d8565b6040516103ef91906137eb565b60405180910390f35b34801561040457600080fd5b5061041f600480360381019061041a9190613864565b611a4d565b60405161042c91906137eb565b60405180910390f35b34801561044157600080fd5b5061045c60048036038101906104579190613864565b611b73565b60405161046991906137eb565b60405180910390f35b34801561047e57600080fd5b5061049960048036038101906104949190613cf1565b611bbf565b005b3480156104a757600080fd5b506104c260048036038101906104bd9190613d44565b611d6f565b6040516104cf91906137eb565b60405180910390f35b3480156104e457600080fd5b506104ff60048036038101906104fa9190613cf1565b611df9565b005b34801561050d57600080fd5b5061052860048036038101906105239190613864565b612118565b005b34801561053657600080fd5b50610551600480360381019061054c9190613952565b6121a0565b60405161055f929190613992565b60405180910390f35b34801561057457600080fd5b5061058f600480360381019061058a9190613864565b61223b565b005b34801561059d57600080fd5b506105b860048036038101906105b39190613864565b612333565b6040516105c6929190613e42565b60405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461066157336040517f3b2495f100000000000000000000000000000000000000000000000000000000815260040161065891906139ca565b60405180910390fd5b8181905084849050146106a0576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b85859050811015610814578383828181106106c6576106c5613e79565b5b90506020020135606860008888858181106106e4576106e3613e79565b5b90506020020160208101906106f99190613864565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282546107459190613ed7565b9250508190555083838281811061075f5761075e613e79565b5b90506020020135826107719190613ed7565b915085858281811061078657610785613e79565b5b905060200201602081019061079b9190613864565b73ffffffffffffffffffffffffffffffffffffffff167f3ee8e5d1cb8671d12b5b20284bb69c7fc325211a1f957cab060d8a78dcc64fba8585848181106107e5576107e4613e79565b5b905060200201356040516107f991906137eb565b60405180910390a2808061080c90613f2d565b9150506106a8565b5034811461085b5734816040517f02760fce000000000000000000000000000000000000000000000000000000008152600401610852929190613992565b60405180910390fd5b5050505050565b600060695461086f612526565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5306040518263ffffffff1660e01b81526004016108a791906139ca565b602060405180830381865afa1580156108c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e89190613f8b565b476108f39190613ed7565b6108fd9190613fb8565b905090565b6000606760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b60695481565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e657336040517f3b2495f10000000000000000000000000000000000000000000000000000000081526004016109dd91906139ca565b60405180910390fd5b818190508484905014610a25576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b83839050811015610dce5760003073ffffffffffffffffffffffffffffffffffffffff1663acd201d0888885818110610a6957610a68613e79565b5b9050602002016020810190610a7e9190613864565b6040518263ffffffff1660e01b8152600401610a9a91906139ca565b602060405180830381865afa158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb9190613f8b565b9050848483818110610af057610aef613e79565b5b90506020020135811015610b7f57868683818110610b1157610b10613e79565b5b9050602002016020810190610b269190613864565b81868685818110610b3a57610b39613e79565b5b905060200201356040517fd5493527000000000000000000000000000000000000000000000000000000008152600401610b7693929190613fec565b60405180910390fd5b848483818110610b9257610b91613e79565b5b9050602002013560686000898986818110610bb057610baf613e79565b5b9050602002016020810190610bc59190613864565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254610c119190613ed7565b92505081905550848483818110610c2b57610c2a613e79565b5b9050602002013560686000898986818110610c4957610c48613e79565b5b9050602002016020810190610c5e9190613864565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ce79190613ed7565b92505081905550848483818110610d0157610d00613e79565b5b9050602002013583610d139190613ed7565b9250868683818110610d2857610d27613e79565b5b9050602002016020810190610d3d9190613864565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f6b63acc273560d01b849e2d77c42ac2cd2b6ff5e1c775423c52a6e50be320e7b878786818110610d9e57610d9d613e79565b5b90506020020135604051610db291906137eb565b60405180910390a3508080610dc690613f2d565b915050610a2d565b508060696000828254610de19190613ed7565b92505081905550505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610e7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e76906140a6565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610ebe6125ed565b73ffffffffffffffffffffffffffffffffffffffff1614610f14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0b90614138565b60405180910390fd5b610f1d81612644565b610f7681600067ffffffffffffffff811115610f3c57610f3b6139fb565b5b6040519080825280601f01601f191660200182016040528015610f6e5781602001600182028036833780820191505090505b5060006126c3565b50565b60676020528160005260406000208181548110610f9557600080fd5b9060005260206000209060020201600091509150508060000154908060010154905082565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561106f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611066906140a6565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166110ae6125ed565b73ffffffffffffffffffffffffffffffffffffffff1614611104576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fb90614138565b60405180910390fd5b61110d82612644565b611119828260016126c3565b5050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b611171612894565b73ffffffffffffffffffffffffffffffffffffffff1661118f6114ae565b73ffffffffffffffffffffffffffffffffffffffff16146111e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111dc906141a4565b60405180910390fd5b6111ef600061289c565b565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000611227868686612962565b915091506000606760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905080600182805490506112809190613fb8565b8154811061129157611290613e79565b5b90600052602060002090600202018187815481106112b2576112b1613e79565b5b90600052602060002090600202016000820154816000015560018201548160010155905050808054806112e8576112e76141c4565b5b6001900381819060005260206000209060020201600080820160009055600182016000905550509055611319612526565b73ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d866040518263ffffffff1660e01b815260040161135191906137eb565b600060405180830381600087803b15801561136b57600080fd5b505af115801561137f573d6000803e3d6000fd5b50505050600061138d612bef565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb89866040518363ffffffff1660e01b81526004016113c79291906141f3565b6020604051808303816000875af11580156113e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140a9190614254565b9050806114505787846040517fbe1b53150000000000000000000000000000000000000000000000000000000081526004016114479291906141f3565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff167f3bb2914428a7565afeafb57ef1a5bad4a2de7be9bf7b41b7e5da505f4b974ce28585604051611498929190613992565b60405180910390a2839450505050509392505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080606860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156115a55788886040517f7a9a71fb00000000000000000000000000000000000000000000000000000000815260040161159c929190614281565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f6e250cfd645a8eac07044223b0b240549b17fe4a71aab09d925cb413b72b00ae8360405161160291906137eb565b60405180910390a36000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282546116e19190613fb8565b9250508190555080606960008282546116fa9190613fb8565b925050819055506000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490506000811115611898578181111561175d578190505b80606860008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282546117af9190613fb8565b9250508190555060006117c0612bef565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8c846040518363ffffffff1660e01b81526004016117fa9291906141f3565b6020604051808303816000875af1158015611819573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183d9190614254565b905080611883578a826040517fbe1b531500000000000000000000000000000000000000000000000000000000815260040161187a9291906141f3565b60405180910390fd5b8282141561189657819350505050611a42565b505b600081836118a69190613fb8565b905060006118b2612526565b9050606760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060405180604001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166320637d8e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561194f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119739190613f8b565b4261197e9190613ed7565b8152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550506119cf8b838c8c8c8c8c612cb6565b8073ffffffffffffffffffffffffffffffffffffffff16636198e339836040518263ffffffff1660e01b8152600401611a0891906137eb565b600060405180830381600087803b158015611a2257600080fd5b505af1158015611a36573d6000803e3d6000fd5b50505050829450505050505b979650505050505050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154611add612fe0565b73ffffffffffffffffffffffffffffffffffffffff16633861727285306040518363ffffffff1660e01b8152600401611b17929190614281565b602060405180830381865afa158015611b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b589190613f8b565b611b629190613ed7565b611b6c9190613fb8565b9050919050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600060019054906101000a900460ff16611be75760008054906101000a900460ff1615611bf0565b611bef6130a7565b5b611c2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c269061431c565b60405180910390fd5b60008060019054906101000a900460ff161590508015611c7f576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611c88846130b8565b611c91836131c9565b611c9a8261289c565b611ca2613224565b73ffffffffffffffffffffffffffffffffffffffff16639dca362f6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611cee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d129190614254565b611d48576040517f20188a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611d695760008060016101000a81548160ff0219169083151502179055505b50505050565b6000606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000611e03612fe0565b90506000606860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490506000606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508173ffffffffffffffffffffffffffffffffffffffff1663263ecf7430876040518363ffffffff1660e01b8152600401611ecf929190614281565b602060405180830381865afa158015611eec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f109190614254565b15611fd3578173ffffffffffffffffffffffffffffffffffffffff16631c5a9d9c866040518263ffffffff1660e01b8152600401611f4e91906139ca565b6020604051808303816000875af1158015611f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f919190614254565b611fd257846040517fbafbcc57000000000000000000000000000000000000000000000000000000008152600401611fc991906139ca565b60405180910390fd5b5b6000811415611fe3575050612113565b611feb612526565b73ffffffffffffffffffffffffffffffffffffffff1663f83d08ba826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561203257600080fd5b505af1158015612046573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663580d747a868387876040518563ffffffff1660e01b815260040161208a949392919061433c565b6020604051808303816000875af11580156120a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120cd9190614254565b6121105784816040517fcbf8d8ef0000000000000000000000000000000000000000000000000000000081526004016121079291906141f3565b60405180910390fd5b50505b505050565b612120612894565b73ffffffffffffffffffffffffffffffffffffffff1661213e6114ae565b73ffffffffffffffffffffffffffffffffffffffff1614612194576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218b906141a4565b60405180910390fd5b61219d816132eb565b50565b6000806000606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002084815481106121f6576121f5613e79565b5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505090508060000151816020015192509250509250929050565b612243612894565b73ffffffffffffffffffffffffffffffffffffffff166122616114ae565b73ffffffffffffffffffffffffffffffffffffffff16146122b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ae906141a4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612327576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161231e906143f3565b60405180910390fd5b6123308161289c565b50565b6060806000606760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090508067ffffffffffffffff811115612397576123966139fb565b5b6040519080825280602002602001820160405280156123c55781602001602082028036833780820191505090505b5092508067ffffffffffffffff8111156123e2576123e16139fb565b5b6040519080825280602002602001820160405280156124105781602001602082028036833780820191505090505b50915060005b818110156124fc576000606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061247157612470613e79565b5b906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050905080600001518583815181106124b8576124b7613e79565b5b60200260200101818152505080602001518483815181106124dc576124db613e79565b5b6020026020010181815250505080806124f490613f2d565b915050612416565b5050915091565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed6040516020016125759061446a565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016125a79190614498565b602060405180830381865afa1580156125c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e891906144c8565b905090565b600061261b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6133d9565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61264c612894565b73ffffffffffffffffffffffffffffffffffffffff1661266a6114ae565b73ffffffffffffffffffffffffffffffffffffffff16146126c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126b7906141a4565b60405180910390fd5b50565b60006126cd6125ed565b90506126d8846133e3565b6000835111806126e55750815b156126f6576126f4848461349c565b505b60006127247f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6134c9565b90508060000160009054906101000a900460ff1661288d5760018160000160006101000a81548160ff0219169083151502179055506127f0858360405160240161276e91906139ca565b6040516020818303038152906040527f3659cfe6000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061349c565b5060008160000160006101000a81548160ff0219169083151502179055506128166125ed565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614612883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287a90614567565b60405180910390fd5b61288c856134d3565b5b5050505050565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508410612a2f5783606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490506040517fdee6f574000000000000000000000000000000000000000000000000000000008152600401612a26929190613992565b60405180910390fd5b600080612a3a612526565b73ffffffffffffffffffffffffffffffffffffffff1663d15ca4ed30876040518363ffffffff1660e01b8152600401612a749291906141f3565b6040805180830381865afa158015612a90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab49190614587565b915091506000606760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208781548110612b0b57612b0a613e79565b5b906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050905082816000015114612b88578060000151836040517f753c4c22000000000000000000000000000000000000000000000000000000008152600401612b7f929190613992565b60405180910390fd5b81816020015114612bd6578060200151826040517f8acd9503000000000000000000000000000000000000000000000000000000008152600401612bcd929190613992565b60405180910390fd5b8060000151816020015194509450505050935093915050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001612c3e90614613565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401612c709190614498565b602060405180830381865afa158015612c8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb191906144c8565b905090565b6000612cc0612fe0565b905060008173ffffffffffffffffffffffffffffffffffffffff16639b95975f8a306040518363ffffffff1660e01b8152600401612cff929190614281565b602060405180830381865afa158015612d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d409190613f8b565b90506000612d4e8983613522565b90506000811115612e21578273ffffffffffffffffffffffffffffffffffffffff16639dfb60818b838b8b896040518663ffffffff1660e01b8152600401612d9a959493929190614628565b6020604051808303816000875af1158015612db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddd9190614254565b612e205789896040517f88f72d99000000000000000000000000000000000000000000000000000000008152600401612e179291906141f3565b60405180910390fd5b5b6000818a612e2f9190613fb8565b90506000811415612e435750505050612fd7565b60008473ffffffffffffffffffffffffffffffffffffffff1663d3e242a48d306040518363ffffffff1660e01b8152600401612e80929190614281565b602060405180830381865afa158015612e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec19190613f8b565b905081811015612f0a578b8b6040517fc7b27867000000000000000000000000000000000000000000000000000000008152600401612f019291906141f3565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16636e1984758d848b8b8b6040518663ffffffff1660e01b8152600401612f4b959493929190614628565b6020604051808303816000875af1158015612f6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f8e9190614254565b612fd1578b8b6040517f21ffa8e9000000000000000000000000000000000000000000000000000000008152600401612fc89291906141f3565b60405180910390fd5b50505050505b50505050505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161302f906146c7565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016130619190614498565b602060405180830381865afa15801561307e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130a291906144c8565b905090565b60006130b230612503565b15905090565b600060019054906101000a900460ff16613107576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130fe9061474e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156131845761ce10606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506131c6565b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600060019054906101000a900460ff16613218576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161320f9061474e565b60405180910390fd5b613221816132eb565b50565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001613273906147ba565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016132a59190614498565b602060405180830381865afa1580156132c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132e691906144c8565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613352576040517fe99d5ac500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f60a0f5b9f9e81e98216071b85826681c796256fe3d1354ecb675580fba64fa6960405160405180910390a250565b6000819050919050565b6133ec8161353b565b61342b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161342290614841565b60405180910390fd5b806134587f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6133d9565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606134c183836040518060600160405280602781526020016149eb6027913961354e565b905092915050565b6000819050919050565b6134dc816133e3565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60008183106135315781613533565b825b905092915050565b600080823b905060008111915050919050565b60606135598461353b565b613598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161358f906148d3565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516135c0919061496d565b600060405180830381855af49150503d80600081146135fb576040519150601f19603f3d011682016040523d82523d6000602084013e613600565b606091505b509150915061361082828661361b565b925050509392505050565b6060831561362b5782905061367b565b60008351111561363e5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161367291906149c8565b60405180910390fd5b9392505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126136bb576136ba613696565b5b8235905067ffffffffffffffff8111156136d8576136d761369b565b5b6020830191508360208202830111156136f4576136f36136a0565b5b9250929050565b60008083601f84011261371157613710613696565b5b8235905067ffffffffffffffff81111561372e5761372d61369b565b5b60208301915083602082028301111561374a576137496136a0565b5b9250929050565b6000806000806040858703121561376b5761376a61368c565b5b600085013567ffffffffffffffff81111561378957613788613691565b5b613795878288016136a5565b9450945050602085013567ffffffffffffffff8111156137b8576137b7613691565b5b6137c4878288016136fb565b925092505092959194509250565b6000819050919050565b6137e5816137d2565b82525050565b600060208201905061380060008301846137dc565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061383182613806565b9050919050565b61384181613826565b811461384c57600080fd5b50565b60008135905061385e81613838565b92915050565b60006020828403121561387a5761387961368c565b5b60006138888482850161384f565b91505092915050565b6000806000806000606086880312156138ad576138ac61368c565b5b60006138bb8882890161384f565b955050602086013567ffffffffffffffff8111156138dc576138db613691565b5b6138e8888289016136a5565b9450945050604086013567ffffffffffffffff81111561390b5761390a613691565b5b613917888289016136fb565b92509250509295509295909350565b61392f816137d2565b811461393a57600080fd5b50565b60008135905061394c81613926565b92915050565b600080604083850312156139695761396861368c565b5b60006139778582860161384f565b92505060206139888582860161393d565b9150509250929050565b60006040820190506139a760008301856137dc565b6139b460208301846137dc565b9392505050565b6139c481613826565b82525050565b60006020820190506139df60008301846139bb565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613a33826139ea565b810181811067ffffffffffffffff82111715613a5257613a516139fb565b5b80604052505050565b6000613a65613682565b9050613a718282613a2a565b919050565b600067ffffffffffffffff821115613a9157613a906139fb565b5b613a9a826139ea565b9050602081019050919050565b82818337600083830152505050565b6000613ac9613ac484613a76565b613a5b565b905082815260208101848484011115613ae557613ae46139e5565b5b613af0848285613aa7565b509392505050565b600082601f830112613b0d57613b0c613696565b5b8135613b1d848260208601613ab6565b91505092915050565b60008060408385031215613b3d57613b3c61368c565b5b6000613b4b8582860161384f565b925050602083013567ffffffffffffffff811115613b6c57613b6b613691565b5b613b7885828601613af8565b9150509250929050565b6000819050919050565b6000613ba7613ba2613b9d84613806565b613b82565b613806565b9050919050565b6000613bb982613b8c565b9050919050565b6000613bcb82613bae565b9050919050565b613bdb81613bc0565b82525050565b6000602082019050613bf66000830184613bd2565b92915050565b600080600060608486031215613c1557613c1461368c565b5b6000613c238682870161384f565b9350506020613c348682870161393d565b9250506040613c458682870161393d565b9150509250925092565b600080600080600080600060e0888a031215613c6e57613c6d61368c565b5b6000613c7c8a828b0161384f565b9750506020613c8d8a828b0161384f565b9650506040613c9e8a828b0161384f565b9550506060613caf8a828b0161384f565b9450506080613cc08a828b0161384f565b93505060a0613cd18a828b0161384f565b92505060c0613ce28a828b0161393d565b91505092959891949750929550565b600080600060608486031215613d0a57613d0961368c565b5b6000613d188682870161384f565b9350506020613d298682870161384f565b9250506040613d3a8682870161384f565b9150509250925092565b60008060408385031215613d5b57613d5a61368c565b5b6000613d698582860161384f565b9250506020613d7a8582860161384f565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613db9816137d2565b82525050565b6000613dcb8383613db0565b60208301905092915050565b6000602082019050919050565b6000613def82613d84565b613df98185613d8f565b9350613e0483613da0565b8060005b83811015613e35578151613e1c8882613dbf565b9750613e2783613dd7565b925050600181019050613e08565b5085935050505092915050565b60006040820190508181036000830152613e5c8185613de4565b90508181036020830152613e708184613de4565b90509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613ee2826137d2565b9150613eed836137d2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f2257613f21613ea8565b5b828201905092915050565b6000613f38826137d2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613f6b57613f6a613ea8565b5b600182019050919050565b600081519050613f8581613926565b92915050565b600060208284031215613fa157613fa061368c565b5b6000613faf84828501613f76565b91505092915050565b6000613fc3826137d2565b9150613fce836137d2565b925082821015613fe157613fe0613ea8565b5b828203905092915050565b600060608201905061400160008301866139bb565b61400e60208301856137dc565b61401b60408301846137dc565b949350505050565b600082825260208201905092915050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b6000614090602c83614023565b915061409b82614034565b604082019050919050565b600060208201905081810360008301526140bf81614083565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b6000614122602c83614023565b915061412d826140c6565b604082019050919050565b6000602082019050818103600083015261415181614115565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061418e602083614023565b915061419982614158565b602082019050919050565b600060208201905081810360008301526141bd81614181565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060408201905061420860008301856139bb565b61421560208301846137dc565b9392505050565b60008115159050919050565b6142318161421c565b811461423c57600080fd5b50565b60008151905061424e81614228565b92915050565b60006020828403121561426a5761426961368c565b5b60006142788482850161423f565b91505092915050565b600060408201905061429660008301856139bb565b6142a360208301846139bb565b9392505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000614306602e83614023565b9150614311826142aa565b604082019050919050565b60006020820190508181036000830152614335816142f9565b9050919050565b600060808201905061435160008301876139bb565b61435e60208301866137dc565b61436b60408301856139bb565b61437860608301846139bb565b95945050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006143dd602683614023565b91506143e882614381565b604082019050919050565b6000602082019050818103600083015261440c816143d0565b9050919050565b600081905092915050565b7f4c6f636b6564476f6c6400000000000000000000000000000000000000000000600082015250565b6000614454600a83614413565b915061445f8261441e565b600a82019050919050565b600061447582614447565b9150819050919050565b6000819050919050565b6144928161447f565b82525050565b60006020820190506144ad6000830184614489565b92915050565b6000815190506144c281613838565b92915050565b6000602082840312156144de576144dd61368c565b5b60006144ec848285016144b3565b91505092915050565b7f45524331393637557067726164653a207570677261646520627265616b73206660008201527f7572746865722075706772616465730000000000000000000000000000000000602082015250565b6000614551602f83614023565b915061455c826144f5565b604082019050919050565b6000602082019050818103600083015261458081614544565b9050919050565b6000806040838503121561459e5761459d61368c565b5b60006145ac85828601613f76565b92505060206145bd85828601613f76565b9150509250929050565b7f476f6c64546f6b656e0000000000000000000000000000000000000000000000600082015250565b60006145fd600983614413565b9150614608826145c7565b600982019050919050565b600061461e826145f0565b9150819050919050565b600060a08201905061463d60008301886139bb565b61464a60208301876137dc565b61465760408301866139bb565b61466460608301856139bb565b61467160808301846137dc565b9695505050505050565b7f456c656374696f6e000000000000000000000000000000000000000000000000600082015250565b60006146b1600883614413565b91506146bc8261467b565b600882019050919050565b60006146d2826146a4565b9150819050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000614738602b83614023565b9150614743826146dc565b604082019050919050565b600060208201905081810360008301526147678161472b565b9050919050565b7f4163636f756e7473000000000000000000000000000000000000000000000000600082015250565b60006147a4600883614413565b91506147af8261476e565b600882019050919050565b60006147c582614797565b9150819050919050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b600061482b602d83614023565b9150614836826147cf565b604082019050919050565b6000602082019050818103600083015261485a8161481e565b9050919050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b60006148bd602683614023565b91506148c882614861565b604082019050919050565b600060208201905081810360008301526148ec816148b0565b9050919050565b600081519050919050565b600081905092915050565b60005b8381101561492757808201518184015260208101905061490c565b83811115614936576000848401525b50505050565b6000614947826148f3565b61495181856148fe565b9350614961818560208601614909565b80840191505092915050565b6000614979828461493c565b915081905092915050565b600081519050919050565b600061499a82614984565b6149a48185614023565b93506149b4818560208601614909565b6149bd816139ea565b840191505092915050565b600060208201905081810360008301526149e2818461498f565b90509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220426939925e444a821f3c88cc7c67c382f39ca4e069daedc4d9c4142a1f7b7ef264736f6c634300080b0033
Deployed ByteCode
0x60806040526004361061014f5760003560e01c806384aff2e7116100b6578063c7fb23281161006f578063c7fb23281461049b578063c9a101f3146104d8578063d0ebdbe714610501578063d15ca4ed1461052a578063f2fde38b14610568578063f340c0d01461059157610156565b806384aff2e7146103535780638da5cb5b14610390578063a020c8de146103bb578063acd201d0146103f8578063b09bdc5e14610435578063c0c53b8b1461047257610156565b806344dc49701161010857806344dc49701461024f578063481c6a751461028d5780634f1ef286146102b85780635fd5c95e146102d4578063715018a6146103115780637b1039991461032857610156565b806301c21d591461015b57806301d2b6ea146101775780631449edb0146101a25780632ad9ac41146101df5780632f842a1a1461020a5780633659cfe61461022657610156565b3661015657005b600080fd5b61017560048036038101906101709190613751565b6105cf565b005b34801561018357600080fd5b5061018c610862565b60405161019991906137eb565b60405180910390f35b3480156101ae57600080fd5b506101c960048036038101906101c49190613864565b610902565b6040516101d691906137eb565b60405180910390f35b3480156101eb57600080fd5b506101f461094e565b60405161020191906137eb565b60405180910390f35b610224600480360381019061021f9190613891565b610954565b005b34801561023257600080fd5b5061024d60048036038101906102489190613864565b610df0565b005b34801561025b57600080fd5b5061027660048036038101906102719190613952565b610f79565b604051610284929190613992565b60405180910390f35b34801561029957600080fd5b506102a2610fba565b6040516102af91906139ca565b60405180910390f35b6102d260048036038101906102cd9190613b26565b610fe0565b005b3480156102e057600080fd5b506102fb60048036038101906102f69190613864565b61111d565b60405161030891906137eb565b60405180910390f35b34801561031d57600080fd5b50610326611169565b005b34801561033457600080fd5b5061033d6111f1565b60405161034a9190613be1565b60405180910390f35b34801561035f57600080fd5b5061037a60048036038101906103759190613bfc565b611217565b60405161038791906137eb565b60405180910390f35b34801561039c57600080fd5b506103a56114ae565b6040516103b291906139ca565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190613c4f565b6114d8565b6040516103ef91906137eb565b60405180910390f35b34801561040457600080fd5b5061041f600480360381019061041a9190613864565b611a4d565b60405161042c91906137eb565b60405180910390f35b34801561044157600080fd5b5061045c60048036038101906104579190613864565b611b73565b60405161046991906137eb565b60405180910390f35b34801561047e57600080fd5b5061049960048036038101906104949190613cf1565b611bbf565b005b3480156104a757600080fd5b506104c260048036038101906104bd9190613d44565b611d6f565b6040516104cf91906137eb565b60405180910390f35b3480156104e457600080fd5b506104ff60048036038101906104fa9190613cf1565b611df9565b005b34801561050d57600080fd5b5061052860048036038101906105239190613864565b612118565b005b34801561053657600080fd5b50610551600480360381019061054c9190613952565b6121a0565b60405161055f929190613992565b60405180910390f35b34801561057457600080fd5b5061058f600480360381019061058a9190613864565b61223b565b005b34801561059d57600080fd5b506105b860048036038101906105b39190613864565b612333565b6040516105c6929190613e42565b60405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461066157336040517f3b2495f100000000000000000000000000000000000000000000000000000000815260040161065891906139ca565b60405180910390fd5b8181905084849050146106a0576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b85859050811015610814578383828181106106c6576106c5613e79565b5b90506020020135606860008888858181106106e4576106e3613e79565b5b90506020020160208101906106f99190613864565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282546107459190613ed7565b9250508190555083838281811061075f5761075e613e79565b5b90506020020135826107719190613ed7565b915085858281811061078657610785613e79565b5b905060200201602081019061079b9190613864565b73ffffffffffffffffffffffffffffffffffffffff167f3ee8e5d1cb8671d12b5b20284bb69c7fc325211a1f957cab060d8a78dcc64fba8585848181106107e5576107e4613e79565b5b905060200201356040516107f991906137eb565b60405180910390a2808061080c90613f2d565b9150506106a8565b5034811461085b5734816040517f02760fce000000000000000000000000000000000000000000000000000000008152600401610852929190613992565b60405180910390fd5b5050505050565b600060695461086f612526565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5306040518263ffffffff1660e01b81526004016108a791906139ca565b602060405180830381865afa1580156108c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e89190613f8b565b476108f39190613ed7565b6108fd9190613fb8565b905090565b6000606760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b60695481565b3373ffffffffffffffffffffffffffffffffffffffff16606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e657336040517f3b2495f10000000000000000000000000000000000000000000000000000000081526004016109dd91906139ca565b60405180910390fd5b818190508484905014610a25576040517f8cd9cb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600090505b83839050811015610dce5760003073ffffffffffffffffffffffffffffffffffffffff1663acd201d0888885818110610a6957610a68613e79565b5b9050602002016020810190610a7e9190613864565b6040518263ffffffff1660e01b8152600401610a9a91906139ca565b602060405180830381865afa158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb9190613f8b565b9050848483818110610af057610aef613e79565b5b90506020020135811015610b7f57868683818110610b1157610b10613e79565b5b9050602002016020810190610b269190613864565b81868685818110610b3a57610b39613e79565b5b905060200201356040517fd5493527000000000000000000000000000000000000000000000000000000008152600401610b7693929190613fec565b60405180910390fd5b848483818110610b9257610b91613e79565b5b9050602002013560686000898986818110610bb057610baf613e79565b5b9050602002016020810190610bc59190613864565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254610c119190613ed7565b92505081905550848483818110610c2b57610c2a613e79565b5b9050602002013560686000898986818110610c4957610c48613e79565b5b9050602002016020810190610c5e9190613864565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ce79190613ed7565b92505081905550848483818110610d0157610d00613e79565b5b9050602002013583610d139190613ed7565b9250868683818110610d2857610d27613e79565b5b9050602002016020810190610d3d9190613864565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f6b63acc273560d01b849e2d77c42ac2cd2b6ff5e1c775423c52a6e50be320e7b878786818110610d9e57610d9d613e79565b5b90506020020135604051610db291906137eb565b60405180910390a3508080610dc690613f2d565b915050610a2d565b508060696000828254610de19190613ed7565b92505081905550505050505050565b7f000000000000000000000000737bce423d87b8bccb9e2b3b483082a5fd3b2fdf73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610e7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e76906140a6565b60405180910390fd5b7f000000000000000000000000737bce423d87b8bccb9e2b3b483082a5fd3b2fdf73ffffffffffffffffffffffffffffffffffffffff16610ebe6125ed565b73ffffffffffffffffffffffffffffffffffffffff1614610f14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0b90614138565b60405180910390fd5b610f1d81612644565b610f7681600067ffffffffffffffff811115610f3c57610f3b6139fb565b5b6040519080825280601f01601f191660200182016040528015610f6e5781602001600182028036833780820191505090505b5060006126c3565b50565b60676020528160005260406000208181548110610f9557600080fd5b9060005260206000209060020201600091509150508060000154908060010154905082565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000737bce423d87b8bccb9e2b3b483082a5fd3b2fdf73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561106f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611066906140a6565b60405180910390fd5b7f000000000000000000000000737bce423d87b8bccb9e2b3b483082a5fd3b2fdf73ffffffffffffffffffffffffffffffffffffffff166110ae6125ed565b73ffffffffffffffffffffffffffffffffffffffff1614611104576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fb90614138565b60405180910390fd5b61110d82612644565b611119828260016126c3565b5050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b611171612894565b73ffffffffffffffffffffffffffffffffffffffff1661118f6114ae565b73ffffffffffffffffffffffffffffffffffffffff16146111e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111dc906141a4565b60405180910390fd5b6111ef600061289c565b565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000611227868686612962565b915091506000606760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905080600182805490506112809190613fb8565b8154811061129157611290613e79565b5b90600052602060002090600202018187815481106112b2576112b1613e79565b5b90600052602060002090600202016000820154816000015560018201548160010155905050808054806112e8576112e76141c4565b5b6001900381819060005260206000209060020201600080820160009055600182016000905550509055611319612526565b73ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d866040518263ffffffff1660e01b815260040161135191906137eb565b600060405180830381600087803b15801561136b57600080fd5b505af115801561137f573d6000803e3d6000fd5b50505050600061138d612bef565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb89866040518363ffffffff1660e01b81526004016113c79291906141f3565b6020604051808303816000875af11580156113e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140a9190614254565b9050806114505787846040517fbe1b53150000000000000000000000000000000000000000000000000000000081526004016114479291906141f3565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff167f3bb2914428a7565afeafb57ef1a5bad4a2de7be9bf7b41b7e5da505f4b974ce28585604051611498929190613992565b60405180910390a2839450505050509392505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080606860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156115a55788886040517f7a9a71fb00000000000000000000000000000000000000000000000000000000815260040161159c929190614281565b60405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f6e250cfd645a8eac07044223b0b240549b17fe4a71aab09d925cb413b72b00ae8360405161160291906137eb565b60405180910390a36000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282546116e19190613fb8565b9250508190555080606960008282546116fa9190613fb8565b925050819055506000606860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490506000811115611898578181111561175d578190505b80606860008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282546117af9190613fb8565b9250508190555060006117c0612bef565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8c846040518363ffffffff1660e01b81526004016117fa9291906141f3565b6020604051808303816000875af1158015611819573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183d9190614254565b905080611883578a826040517fbe1b531500000000000000000000000000000000000000000000000000000000815260040161187a9291906141f3565b60405180910390fd5b8282141561189657819350505050611a42565b505b600081836118a69190613fb8565b905060006118b2612526565b9050606760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060405180604001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166320637d8e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561194f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119739190613f8b565b4261197e9190613ed7565b8152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550506119cf8b838c8c8c8c8c612cb6565b8073ffffffffffffffffffffffffffffffffffffffff16636198e339836040518263ffffffff1660e01b8152600401611a0891906137eb565b600060405180830381600087803b158015611a2257600080fd5b505af1158015611a36573d6000803e3d6000fd5b50505050829450505050505b979650505050505050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154611add612fe0565b73ffffffffffffffffffffffffffffffffffffffff16633861727285306040518363ffffffff1660e01b8152600401611b17929190614281565b602060405180830381865afa158015611b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b589190613f8b565b611b629190613ed7565b611b6c9190613fb8565b9050919050565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600060019054906101000a900460ff16611be75760008054906101000a900460ff1615611bf0565b611bef6130a7565b5b611c2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c269061431c565b60405180910390fd5b60008060019054906101000a900460ff161590508015611c7f576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611c88846130b8565b611c91836131c9565b611c9a8261289c565b611ca2613224565b73ffffffffffffffffffffffffffffffffffffffff16639dca362f6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611cee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d129190614254565b611d48576040517f20188a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611d695760008060016101000a81548160ff0219169083151502179055505b50505050565b6000606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000611e03612fe0565b90506000606860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490506000606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508173ffffffffffffffffffffffffffffffffffffffff1663263ecf7430876040518363ffffffff1660e01b8152600401611ecf929190614281565b602060405180830381865afa158015611eec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f109190614254565b15611fd3578173ffffffffffffffffffffffffffffffffffffffff16631c5a9d9c866040518263ffffffff1660e01b8152600401611f4e91906139ca565b6020604051808303816000875af1158015611f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f919190614254565b611fd257846040517fbafbcc57000000000000000000000000000000000000000000000000000000008152600401611fc991906139ca565b60405180910390fd5b5b6000811415611fe3575050612113565b611feb612526565b73ffffffffffffffffffffffffffffffffffffffff1663f83d08ba826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561203257600080fd5b505af1158015612046573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663580d747a868387876040518563ffffffff1660e01b815260040161208a949392919061433c565b6020604051808303816000875af11580156120a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120cd9190614254565b6121105784816040517fcbf8d8ef0000000000000000000000000000000000000000000000000000000081526004016121079291906141f3565b60405180910390fd5b50505b505050565b612120612894565b73ffffffffffffffffffffffffffffffffffffffff1661213e6114ae565b73ffffffffffffffffffffffffffffffffffffffff1614612194576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218b906141a4565b60405180910390fd5b61219d816132eb565b50565b6000806000606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002084815481106121f6576121f5613e79565b5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505090508060000151816020015192509250509250929050565b612243612894565b73ffffffffffffffffffffffffffffffffffffffff166122616114ae565b73ffffffffffffffffffffffffffffffffffffffff16146122b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ae906141a4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612327576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161231e906143f3565b60405180910390fd5b6123308161289c565b50565b6060806000606760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090508067ffffffffffffffff811115612397576123966139fb565b5b6040519080825280602002602001820160405280156123c55781602001602082028036833780820191505090505b5092508067ffffffffffffffff8111156123e2576123e16139fb565b5b6040519080825280602002602001820160405280156124105781602001602082028036833780820191505090505b50915060005b818110156124fc576000606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061247157612470613e79565b5b906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050905080600001518583815181106124b8576124b7613e79565b5b60200260200101818152505080602001518483815181106124dc576124db613e79565b5b6020026020010181815250505080806124f490613f2d565b915050612416565b5050915091565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed6040516020016125759061446a565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016125a79190614498565b602060405180830381865afa1580156125c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e891906144c8565b905090565b600061261b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6133d9565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61264c612894565b73ffffffffffffffffffffffffffffffffffffffff1661266a6114ae565b73ffffffffffffffffffffffffffffffffffffffff16146126c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126b7906141a4565b60405180910390fd5b50565b60006126cd6125ed565b90506126d8846133e3565b6000835111806126e55750815b156126f6576126f4848461349c565b505b60006127247f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6134c9565b90508060000160009054906101000a900460ff1661288d5760018160000160006101000a81548160ff0219169083151502179055506127f0858360405160240161276e91906139ca565b6040516020818303038152906040527f3659cfe6000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061349c565b5060008160000160006101000a81548160ff0219169083151502179055506128166125ed565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614612883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287a90614567565b60405180910390fd5b61288c856134d3565b5b5050505050565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080606760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508410612a2f5783606760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490506040517fdee6f574000000000000000000000000000000000000000000000000000000008152600401612a26929190613992565b60405180910390fd5b600080612a3a612526565b73ffffffffffffffffffffffffffffffffffffffff1663d15ca4ed30876040518363ffffffff1660e01b8152600401612a749291906141f3565b6040805180830381865afa158015612a90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab49190614587565b915091506000606760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208781548110612b0b57612b0a613e79565b5b906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050905082816000015114612b88578060000151836040517f753c4c22000000000000000000000000000000000000000000000000000000008152600401612b7f929190613992565b60405180910390fd5b81816020015114612bd6578060200151826040517f8acd9503000000000000000000000000000000000000000000000000000000008152600401612bcd929190613992565b60405180910390fd5b8060000151816020015194509450505050935093915050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001612c3e90614613565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401612c709190614498565b602060405180830381865afa158015612c8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb191906144c8565b905090565b6000612cc0612fe0565b905060008173ffffffffffffffffffffffffffffffffffffffff16639b95975f8a306040518363ffffffff1660e01b8152600401612cff929190614281565b602060405180830381865afa158015612d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d409190613f8b565b90506000612d4e8983613522565b90506000811115612e21578273ffffffffffffffffffffffffffffffffffffffff16639dfb60818b838b8b896040518663ffffffff1660e01b8152600401612d9a959493929190614628565b6020604051808303816000875af1158015612db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddd9190614254565b612e205789896040517f88f72d99000000000000000000000000000000000000000000000000000000008152600401612e179291906141f3565b60405180910390fd5b5b6000818a612e2f9190613fb8565b90506000811415612e435750505050612fd7565b60008473ffffffffffffffffffffffffffffffffffffffff1663d3e242a48d306040518363ffffffff1660e01b8152600401612e80929190614281565b602060405180830381865afa158015612e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec19190613f8b565b905081811015612f0a578b8b6040517fc7b27867000000000000000000000000000000000000000000000000000000008152600401612f019291906141f3565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16636e1984758d848b8b8b6040518663ffffffff1660e01b8152600401612f4b959493929190614628565b6020604051808303816000875af1158015612f6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f8e9190614254565b612fd1578b8b6040517f21ffa8e9000000000000000000000000000000000000000000000000000000008152600401612fc89291906141f3565b60405180910390fd5b50505050505b50505050505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200161302f906146c7565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016130619190614498565b602060405180830381865afa15801561307e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130a291906144c8565b905090565b60006130b230612503565b15905090565b600060019054906101000a900460ff16613107576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130fe9061474e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156131845761ce10606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506131c6565b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600060019054906101000a900460ff16613218576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161320f9061474e565b60405180910390fd5b613221816132eb565b50565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001613273906147ba565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016132a59190614498565b602060405180830381865afa1580156132c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132e691906144c8565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613352576040517fe99d5ac500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f60a0f5b9f9e81e98216071b85826681c796256fe3d1354ecb675580fba64fa6960405160405180910390a250565b6000819050919050565b6133ec8161353b565b61342b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161342290614841565b60405180910390fd5b806134587f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6133d9565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606134c183836040518060600160405280602781526020016149eb6027913961354e565b905092915050565b6000819050919050565b6134dc816133e3565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60008183106135315781613533565b825b905092915050565b600080823b905060008111915050919050565b60606135598461353b565b613598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161358f906148d3565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516135c0919061496d565b600060405180830381855af49150503d80600081146135fb576040519150601f19603f3d011682016040523d82523d6000602084013e613600565b606091505b509150915061361082828661361b565b925050509392505050565b6060831561362b5782905061367b565b60008351111561363e5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161367291906149c8565b60405180910390fd5b9392505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126136bb576136ba613696565b5b8235905067ffffffffffffffff8111156136d8576136d761369b565b5b6020830191508360208202830111156136f4576136f36136a0565b5b9250929050565b60008083601f84011261371157613710613696565b5b8235905067ffffffffffffffff81111561372e5761372d61369b565b5b60208301915083602082028301111561374a576137496136a0565b5b9250929050565b6000806000806040858703121561376b5761376a61368c565b5b600085013567ffffffffffffffff81111561378957613788613691565b5b613795878288016136a5565b9450945050602085013567ffffffffffffffff8111156137b8576137b7613691565b5b6137c4878288016136fb565b925092505092959194509250565b6000819050919050565b6137e5816137d2565b82525050565b600060208201905061380060008301846137dc565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061383182613806565b9050919050565b61384181613826565b811461384c57600080fd5b50565b60008135905061385e81613838565b92915050565b60006020828403121561387a5761387961368c565b5b60006138888482850161384f565b91505092915050565b6000806000806000606086880312156138ad576138ac61368c565b5b60006138bb8882890161384f565b955050602086013567ffffffffffffffff8111156138dc576138db613691565b5b6138e8888289016136a5565b9450945050604086013567ffffffffffffffff81111561390b5761390a613691565b5b613917888289016136fb565b92509250509295509295909350565b61392f816137d2565b811461393a57600080fd5b50565b60008135905061394c81613926565b92915050565b600080604083850312156139695761396861368c565b5b60006139778582860161384f565b92505060206139888582860161393d565b9150509250929050565b60006040820190506139a760008301856137dc565b6139b460208301846137dc565b9392505050565b6139c481613826565b82525050565b60006020820190506139df60008301846139bb565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613a33826139ea565b810181811067ffffffffffffffff82111715613a5257613a516139fb565b5b80604052505050565b6000613a65613682565b9050613a718282613a2a565b919050565b600067ffffffffffffffff821115613a9157613a906139fb565b5b613a9a826139ea565b9050602081019050919050565b82818337600083830152505050565b6000613ac9613ac484613a76565b613a5b565b905082815260208101848484011115613ae557613ae46139e5565b5b613af0848285613aa7565b509392505050565b600082601f830112613b0d57613b0c613696565b5b8135613b1d848260208601613ab6565b91505092915050565b60008060408385031215613b3d57613b3c61368c565b5b6000613b4b8582860161384f565b925050602083013567ffffffffffffffff811115613b6c57613b6b613691565b5b613b7885828601613af8565b9150509250929050565b6000819050919050565b6000613ba7613ba2613b9d84613806565b613b82565b613806565b9050919050565b6000613bb982613b8c565b9050919050565b6000613bcb82613bae565b9050919050565b613bdb81613bc0565b82525050565b6000602082019050613bf66000830184613bd2565b92915050565b600080600060608486031215613c1557613c1461368c565b5b6000613c238682870161384f565b9350506020613c348682870161393d565b9250506040613c458682870161393d565b9150509250925092565b600080600080600080600060e0888a031215613c6e57613c6d61368c565b5b6000613c7c8a828b0161384f565b9750506020613c8d8a828b0161384f565b9650506040613c9e8a828b0161384f565b9550506060613caf8a828b0161384f565b9450506080613cc08a828b0161384f565b93505060a0613cd18a828b0161384f565b92505060c0613ce28a828b0161393d565b91505092959891949750929550565b600080600060608486031215613d0a57613d0961368c565b5b6000613d188682870161384f565b9350506020613d298682870161384f565b9250506040613d3a8682870161384f565b9150509250925092565b60008060408385031215613d5b57613d5a61368c565b5b6000613d698582860161384f565b9250506020613d7a8582860161384f565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613db9816137d2565b82525050565b6000613dcb8383613db0565b60208301905092915050565b6000602082019050919050565b6000613def82613d84565b613df98185613d8f565b9350613e0483613da0565b8060005b83811015613e35578151613e1c8882613dbf565b9750613e2783613dd7565b925050600181019050613e08565b5085935050505092915050565b60006040820190508181036000830152613e5c8185613de4565b90508181036020830152613e708184613de4565b90509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613ee2826137d2565b9150613eed836137d2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f2257613f21613ea8565b5b828201905092915050565b6000613f38826137d2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613f6b57613f6a613ea8565b5b600182019050919050565b600081519050613f8581613926565b92915050565b600060208284031215613fa157613fa061368c565b5b6000613faf84828501613f76565b91505092915050565b6000613fc3826137d2565b9150613fce836137d2565b925082821015613fe157613fe0613ea8565b5b828203905092915050565b600060608201905061400160008301866139bb565b61400e60208301856137dc565b61401b60408301846137dc565b949350505050565b600082825260208201905092915050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b6000614090602c83614023565b915061409b82614034565b604082019050919050565b600060208201905081810360008301526140bf81614083565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b6000614122602c83614023565b915061412d826140c6565b604082019050919050565b6000602082019050818103600083015261415181614115565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061418e602083614023565b915061419982614158565b602082019050919050565b600060208201905081810360008301526141bd81614181565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060408201905061420860008301856139bb565b61421560208301846137dc565b9392505050565b60008115159050919050565b6142318161421c565b811461423c57600080fd5b50565b60008151905061424e81614228565b92915050565b60006020828403121561426a5761426961368c565b5b60006142788482850161423f565b91505092915050565b600060408201905061429660008301856139bb565b6142a360208301846139bb565b9392505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000614306602e83614023565b9150614311826142aa565b604082019050919050565b60006020820190508181036000830152614335816142f9565b9050919050565b600060808201905061435160008301876139bb565b61435e60208301866137dc565b61436b60408301856139bb565b61437860608301846139bb565b95945050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006143dd602683614023565b91506143e882614381565b604082019050919050565b6000602082019050818103600083015261440c816143d0565b9050919050565b600081905092915050565b7f4c6f636b6564476f6c6400000000000000000000000000000000000000000000600082015250565b6000614454600a83614413565b915061445f8261441e565b600a82019050919050565b600061447582614447565b9150819050919050565b6000819050919050565b6144928161447f565b82525050565b60006020820190506144ad6000830184614489565b92915050565b6000815190506144c281613838565b92915050565b6000602082840312156144de576144dd61368c565b5b60006144ec848285016144b3565b91505092915050565b7f45524331393637557067726164653a207570677261646520627265616b73206660008201527f7572746865722075706772616465730000000000000000000000000000000000602082015250565b6000614551602f83614023565b915061455c826144f5565b604082019050919050565b6000602082019050818103600083015261458081614544565b9050919050565b6000806040838503121561459e5761459d61368c565b5b60006145ac85828601613f76565b92505060206145bd85828601613f76565b9150509250929050565b7f476f6c64546f6b656e0000000000000000000000000000000000000000000000600082015250565b60006145fd600983614413565b9150614608826145c7565b600982019050919050565b600061461e826145f0565b9150819050919050565b600060a08201905061463d60008301886139bb565b61464a60208301876137dc565b61465760408301866139bb565b61466460608301856139bb565b61467160808301846137dc565b9695505050505050565b7f456c656374696f6e000000000000000000000000000000000000000000000000600082015250565b60006146b1600883614413565b91506146bc8261467b565b600882019050919050565b60006146d2826146a4565b9150819050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000614738602b83614023565b9150614743826146dc565b604082019050919050565b600060208201905081810360008301526147678161472b565b9050919050565b7f4163636f756e7473000000000000000000000000000000000000000000000000600082015250565b60006147a4600883614413565b91506147af8261476e565b600882019050919050565b60006147c582614797565b9150819050919050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b600061482b602d83614023565b9150614836826147cf565b604082019050919050565b6000602082019050818103600083015261485a8161481e565b9050919050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b60006148bd602683614023565b91506148c882614861565b604082019050919050565b600060208201905081810360008301526148ec816148b0565b9050919050565b600081519050919050565b600081905092915050565b60005b8381101561492757808201518184015260208101905061490c565b83811115614936576000848401525b50505050565b6000614947826148f3565b61495181856148fe565b9350614961818560208601614909565b80840191505092915050565b6000614979828461493c565b915081905092915050565b600081519050919050565b600061499a82614984565b6149a48185614023565b93506149b4818560208601614909565b6149bd816139ea565b840191505092915050565b600060208201905081810360008301526149e2818461498f565b90509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220426939925e444a821f3c88cc7c67c382f39ca4e069daedc4d9c4142a1f7b7ef264736f6c634300080b0033