Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OracleFeeDistributor
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "../@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "../@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "../feeDistributorFactory/IFeeDistributorFactory.sol"; import "../assetRecovering/OwnableTokenRecoverer.sol"; import "./IFeeDistributor.sol"; import "../oracle/IOracle.sol"; import "../structs/P2pStructs.sol"; import "./BaseFeeDistributor.sol"; /// @notice Should be a Oracle contract /// @param _passedAddress passed address that does not support IOracle interface error OracleFeeDistributor__NotOracle(address _passedAddress); /// @notice cannot withdraw until rewards (CL+EL) are enough to be split error OracleFeeDistributor__WaitForEnoughRewardsToWithdraw(); /// @notice clientOnlyClRewards can only be set once error OracleFeeDistributor__CannotResetClientOnlyClRewards(); /// @notice Client basis points should be higher than 5000 error OracleFeeDistributor__ClientBasisPointsShouldBeHigherThan5000(); /// @title FeeDistributor accepting EL rewards only but splitting them with consideration of CL rewards /// @dev CL rewards are received by the client directly since client's address is ETH2 withdrawal credentials contract OracleFeeDistributor is BaseFeeDistributor { /// @notice Emits when clientOnlyClRewards has been updated /// @param _clientOnlyClRewards new value of clientOnlyClRewards event OracleFeeDistributor__ClientOnlyClRewardsUpdated( uint256 _clientOnlyClRewards ); /// @notice address of Oracle IOracle private immutable i_oracle; /// @notice amount of CL rewards (in Wei) that should belong to the client only /// and should not be considered for splitting between the service and the referrer uint256 s_clientOnlyClRewards; /// @dev Set values that are constant, common for all the clients, known at the initial deploy time. /// @param _oracle address of Oracle /// @param _factory address of FeeDistributorFactory /// @param _service address of the service (P2P) fee recipient constructor( address _oracle, address _factory, address payable _service ) BaseFeeDistributor(_factory, _service) { if (!ERC165Checker.supportsInterface(_oracle, type(IOracle).interfaceId)) { revert OracleFeeDistributor__NotOracle(_oracle); } i_oracle = IOracle(_oracle); } /// @inheritdoc IFeeDistributor function initialize( FeeRecipient calldata _clientConfig, FeeRecipient calldata _referrerConfig ) public override { if (_clientConfig.basisPoints <= 5000) { revert OracleFeeDistributor__ClientBasisPointsShouldBeHigherThan5000(); } super.initialize(_clientConfig, _referrerConfig); } /// @notice Set clientOnlyClRewards to a new value /// @param _clientOnlyClRewards new value of clientOnlyClRewards /// @dev may be needed when attaching this FeeDistributor to an existing validator. /// If previously earned rewards need not be split, they should be declared as client only. function setClientOnlyClRewards(uint256 _clientOnlyClRewards) external { i_factory.checkOperatorOrOwner(msg.sender); if (s_clientOnlyClRewards != 0) { revert OracleFeeDistributor__CannotResetClientOnlyClRewards(); } s_clientOnlyClRewards = _clientOnlyClRewards; emit OracleFeeDistributor__ClientOnlyClRewardsUpdated(_clientOnlyClRewards); } /// @notice Withdraw the whole balance of the contract according to the pre-defined basis points. /// @dev In case someone (either service, or client, or referrer) fails to accept ether, /// the owner will be able to recover some of their share. /// This scenario is very unlikely. It can only happen if that someone is a contract /// whose receive function changed its behavior since FeeDistributor's initialization. /// It can never happen unless the receiving party themselves wants it to happen. /// We strongly recommend against intentional reverts in the receive function /// because the remaining parties might call `withdraw` again multiple times without waiting /// for the owner to recover ether for the reverting party. /// In fact, as a punishment for the reverting party, before the recovering, /// 1 more regular `withdraw` will happen, rewarding the non-reverting parties again. /// `recoverEther` function is just an emergency backup plan and does not replace `withdraw`. /// /// @param _proof Merkle proof (the leaf's sibling, and each non-leaf hash that could not otherwise be calculated without additional leaf nodes) /// @param _amountInGwei total CL rewards earned by all validators in GWei (see _validatorCount) function withdraw( bytes32[] calldata _proof, uint256 _amountInGwei ) external nonReentrant { if (s_clientConfig.recipient == address(0)) { revert FeeDistributor__ClientNotSet(); } // get the contract's balance uint256 balance = address(this).balance; if (balance == 0) { // revert if there is no ether to withdraw revert FeeDistributor__NothingToWithdraw(); } // verify the data from the caller against the oracle i_oracle.verify(_proof, address(this), _amountInGwei); // Gwei to Wei uint256 amount = _amountInGwei * (10 ** 9); if (amount < s_clientOnlyClRewards) { // Can happen if the client has called emergencyEtherRecoveryWithoutOracleData before // but the actual rewards amount now appeared to be lower than the already split. // Should happen rarely. revert OracleFeeDistributor__WaitForEnoughRewardsToWithdraw(); } // total to split = EL + CL - already split part of CL (should be OK unless halfBalance < serviceAmount) uint256 totalAmountToSplit = balance + amount - s_clientOnlyClRewards; // set client basis points to value from storage config uint256 clientBp = s_clientConfig.basisPoints; // how much should service get uint256 serviceAmount = totalAmountToSplit - ((totalAmountToSplit * clientBp) / 10000); uint256 halfBalance = balance / 2; // how much should client get uint256 clientAmount; // if a half of the available balance is not enough to cover service (and referrer) shares // can happen when CL rewards (only accessible by client) are way much than EL rewards if (serviceAmount > halfBalance) { // client gets 50% of EL rewards clientAmount = halfBalance; // service (and referrer) get 50% of EL rewards combined (+1 wei in case balance is odd) serviceAmount = balance - halfBalance; // update the total amount being split to a smaller value to fit the actual balance of this contract totalAmountToSplit = (halfBalance * 10000) / (10000 - clientBp); } else { // send the remaining balance to client clientAmount = balance - serviceAmount; } emit OracleFeeDistributor__ClientOnlyClRewardsUpdated(s_clientOnlyClRewards); bool someEthSent; // how much should referrer get uint256 referrerAmount; if (s_referrerConfig.recipient != address(0)) { // if there is a referrer referrerAmount = (totalAmountToSplit * s_referrerConfig.basisPoints) / 10000; serviceAmount -= referrerAmount; // Send ETH to referrer. Ignore the possible yet unlikely revert in the receive function. someEthSent = P2pAddressLib._sendValue(s_referrerConfig.recipient, referrerAmount); } // Send ETH to service. Ignore the possible yet unlikely revert in the receive function. someEthSent = P2pAddressLib._sendValue(i_service, serviceAmount) || someEthSent; // Send ETH to client. Ignore the possible yet unlikely revert in the receive function. someEthSent = P2pAddressLib._sendValue(s_clientConfig.recipient, clientAmount) || someEthSent; if (someEthSent) { // client gets the rest from CL as not split anymore amount s_clientOnlyClRewards += (totalAmountToSplit - balance); } emit FeeDistributor__Withdrawn( serviceAmount, clientAmount, referrerAmount ); } /// @notice Recover ether in a rare case when either service, or client, or referrer /// refuse to accept ether. /// @param _to receiver address /// @param _proof Merkle proof (the leaf's sibling, and each non-leaf hash that could not otherwise be calculated without additional leaf nodes) /// @param _amountInGwei total CL rewards earned by all validators in GWei (see _validatorCount) function recoverEther( address payable _to, bytes32[] calldata _proof, uint256 _amountInGwei ) external onlyOwner { if (_to == address(0)) { revert FeeDistributor__ZeroAddressEthReceiver(); } this.withdraw(_proof, _amountInGwei); // get the contract's balance uint256 balance = address(this).balance; if (balance > 0) { // only happens if at least 1 party reverted in their receive bool success = P2pAddressLib._sendValueWithoutGasRestrictions(_to, balance); if (success) { emit FeeDistributor__EtherRecovered(_to, balance); } else { revert FeeDistributor__EtherRecoveryFailed(_to, balance); } } } /// @notice SHOULD NEVER BE CALLED NORMALLY!!!! Recover ether if oracle data (Merkle proof) is not available for some reason. function emergencyEtherRecoveryWithoutOracleData() external onlyClient nonReentrant { // get the contract's balance uint256 balance = address(this).balance; if (balance == 0) { // revert if there is no ether to withdraw revert FeeDistributor__NothingToWithdraw(); } uint256 halfBalance = balance / 2; // client gets 50% of EL rewards uint256 clientAmount = halfBalance; // service (and referrer) get 50% of EL rewards combined (+1 wei in case balance is odd) uint256 serviceAmount = balance - halfBalance; // the total amount being split fits the actual balance of this contract uint256 totalAmountToSplit = (halfBalance * 10000) / (10000 - s_clientConfig.basisPoints); emit OracleFeeDistributor__ClientOnlyClRewardsUpdated(s_clientOnlyClRewards); bool someEthSent; // how much should referrer get uint256 referrerAmount; if (s_referrerConfig.recipient != address(0)) { // if there is a referrer referrerAmount = (totalAmountToSplit * s_referrerConfig.basisPoints) / 10000; serviceAmount -= referrerAmount; // Send ETH to referrer. Ignore the possible yet unlikely revert in the receive function. someEthSent = P2pAddressLib._sendValue(s_referrerConfig.recipient, referrerAmount); } // Send ETH to service. Ignore the possible yet unlikely revert in the receive function. someEthSent = P2pAddressLib._sendValue(i_service, serviceAmount) || someEthSent; // Send ETH to client. Ignore the possible yet unlikely revert in the receive function. someEthSent = P2pAddressLib._sendValue(s_clientConfig.recipient, clientAmount) || someEthSent; if (someEthSent) { // client gets the rest from CL as not split anymore amount s_clientOnlyClRewards += (totalAmountToSplit - balance); } emit FeeDistributor__Withdrawn( serviceAmount, clientAmount, referrerAmount ); } /// @notice amount of CL rewards (in Wei) that should belong to the client only /// and should not be considered for splitting between the service and the referrer /// @return uint256 amount of client only CL rewards function clientOnlyClRewards() external view returns (uint256) { return s_clientOnlyClRewards; } /// @notice Returns the oracle address /// @return address oracle address function oracle() external view returns (address) { return address(i_oracle); } /// @inheritdoc Erc4337Account function withdrawSelector() public pure override returns (bytes4) { return OracleFeeDistributor.withdraw.selector; } /// @inheritdoc IFeeDistributor /// @dev client address function eth2WithdrawalCredentialsAddress() external override view returns (address) { return s_clientConfig.recipient; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity 0.8.10; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity 0.8.10; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.2) (utils/introspection/ERC165Checker.sol) pragma solidity 0.8.10; import "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface, */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return _supportsERC165Interface(account, type(IERC165).interfaceId) && !_supportsERC165Interface(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && _supportsERC165Interface(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in _interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!_supportsERC165Interface(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * Interface identification is specified in ERC-165. */ function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) { // prepare call bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); // perform static call bool success; uint256 returnSize; uint256 returnValue; assembly { success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) returnSize := returndatasize() returnValue := mload(0x00) } return success && returnSize >= 0x20 && returnValue > 0; } }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "../@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "../access/IOwnable.sol"; import "../feeDistributor/IFeeDistributor.sol"; import "../structs/P2pStructs.sol"; /// @dev External interface of FeeDistributorFactory declared to support ERC165 detection. interface IFeeDistributorFactory is IOwnable, IERC165 { /// @notice Emits when a new FeeDistributor instance has been created for a client /// @param _newFeeDistributorAddress address of the newly created FeeDistributor contract instance /// @param _clientAddress address of the client for whom the new instance was created /// @param _referenceFeeDistributor The address of the reference implementation of FeeDistributor used as the basis for clones /// @param _clientBasisPoints client basis points (percent * 100) event FeeDistributorFactory__FeeDistributorCreated( address indexed _newFeeDistributorAddress, address indexed _clientAddress, address indexed _referenceFeeDistributor, uint96 _clientBasisPoints ); /// @notice Emits when a new P2pEth2Depositor contract address has been set. /// @param _p2pEth2Depositor the address of the new P2pEth2Depositor contract event FeeDistributorFactory__P2pEth2DepositorSet( address indexed _p2pEth2Depositor ); /// @notice Emits when a new value of defaultClientBasisPoints has been set. /// @param _defaultClientBasisPoints new value of defaultClientBasisPoints event FeeDistributorFactory__DefaultClientBasisPointsSet( uint96 _defaultClientBasisPoints ); /// @notice Creates a FeeDistributor instance for a client /// @dev _referrerConfig can be zero if there is no referrer. /// /// @param _referenceFeeDistributor The address of the reference implementation of FeeDistributor used as the basis for clones /// @param _clientConfig address and basis points (percent * 100) of the client /// @param _referrerConfig address and basis points (percent * 100) of the referrer. /// @return newFeeDistributorAddress user FeeDistributor instance that has just been deployed function createFeeDistributor( address _referenceFeeDistributor, FeeRecipient calldata _clientConfig, FeeRecipient calldata _referrerConfig ) external returns (address newFeeDistributorAddress); /// @notice Computes the address of a FeeDistributor created by `createFeeDistributor` function /// @dev FeeDistributor instances are guaranteed to have the same address if all of /// 1) referenceFeeDistributor 2) clientConfig 3) referrerConfig /// are the same /// @param _referenceFeeDistributor The address of the reference implementation of FeeDistributor used as the basis for clones /// @param _clientConfig address and basis points (percent * 100) of the client /// @param _referrerConfig address and basis points (percent * 100) of the referrer. /// @return address user FeeDistributor instance that will be or has been deployed function predictFeeDistributorAddress( address _referenceFeeDistributor, FeeRecipient calldata _clientConfig, FeeRecipient calldata _referrerConfig ) external view returns (address); /// @notice Returns an array of client FeeDistributors /// @param _client client address /// @return address[] array of client FeeDistributors function allClientFeeDistributors( address _client ) external view returns (address[] memory); /// @notice Returns an array of all FeeDistributors for all clients /// @return address[] array of all FeeDistributors function allFeeDistributors() external view returns (address[] memory); /// @notice The address of P2pEth2Depositor /// @return address of P2pEth2Depositor function p2pEth2Depositor() external view returns (address); /// @notice Returns default client basis points /// @return default client basis points function defaultClientBasisPoints() external view returns (uint96); /// @notice Returns the current operator /// @return address of the current operator function operator() external view returns (address); /// @notice Reverts if the passed address is neither operator nor owner /// @param _address passed address function checkOperatorOrOwner(address _address) external view; /// @notice Reverts if the passed address is not P2pEth2Depositor /// @param _address passed address function checkP2pEth2Depositor(address _address) external view; /// @notice Reverts if the passed address is neither of: 1) operator 2) owner 3) P2pEth2Depositor /// @param _address passed address function check_Operator_Owner_P2pEth2Depositor(address _address) external view; }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, Lido <[email protected]> // SPDX-License-Identifier: MIT // https://github.com/lidofinance/lido-otc-seller/blob/master/contracts/lib/AssetRecoverer.sol pragma solidity 0.8.10; import "./TokenRecoverer.sol"; import "../access/OwnableBase.sol"; /// @title Token Recoverer with public functions callable by assetAccessingAddress /// @notice Recover ERC20, ERC721 and ERC1155 from a derived contract abstract contract OwnableTokenRecoverer is TokenRecoverer, OwnableBase { // Functions /** * @notice transfer an ERC20 token from this contract * @dev `SafeERC20.safeTransfer` doesn't always return a bool * as it performs an internal `require` check * @param _token address of the ERC20 token * @param _recipient address to transfer the tokens to * @param _amount amount of tokens to transfer */ function transferERC20( address _token, address _recipient, uint256 _amount ) external onlyOwner { _transferERC20(_token, _recipient, _amount); } /** * @notice transfer an ERC721 token from this contract * @dev `IERC721.safeTransferFrom` doesn't always return a bool * as it performs an internal `require` check * @param _token address of the ERC721 token * @param _recipient address to transfer the token to * @param _tokenId id of the individual token */ function transferERC721( address _token, address _recipient, uint256 _tokenId ) external onlyOwner { _transferERC721(_token, _recipient, _tokenId); } /** * @notice transfer an ERC1155 token from this contract * @dev see `AssetRecoverer` * @param _token address of the ERC1155 token that is being recovered * @param _recipient address to transfer the token to * @param _tokenId id of the individual token to transfer * @param _amount amount of tokens to transfer * @param _data data to transfer along */ function transferERC1155( address _token, address _recipient, uint256 _tokenId, uint256 _amount, bytes calldata _data ) external onlyOwner { _transferERC1155(_token, _recipient, _tokenId, _amount, _data); } }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "../@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "../structs/P2pStructs.sol"; /// @dev External interface of FeeDistributor declared to support ERC165 detection. interface IFeeDistributor is IERC165 { /// @notice Emits once the client and the optional referrer have been set. /// @param _client address of the client. /// @param _clientBasisPoints basis points (percent * 100) of EL rewards that should go to the client /// @param _referrer address of the referrer. /// @param _referrerBasisPoints basis points (percent * 100) of EL rewards that should go to the referrer event FeeDistributor__Initialized( address indexed _client, uint96 _clientBasisPoints, address indexed _referrer, uint96 _referrerBasisPoints ); /// @notice Emits on successful withdrawal /// @param _serviceAmount how much wei service received /// @param _clientAmount how much wei client received /// @param _referrerAmount how much wei referrer received event FeeDistributor__Withdrawn( uint256 _serviceAmount, uint256 _clientAmount, uint256 _referrerAmount ); /// @notice Emits on request for a voluntary exit of validators /// @param _pubkeys pubkeys of validators event FeeDistributor__VoluntaryExit( bytes[] _pubkeys ); /// @notice Emits if case there was some ether left after `withdraw` and it has been sent successfully. /// @param _to destination address for ether. /// @param _amount how much wei the destination address received. event FeeDistributor__EtherRecovered( address indexed _to, uint256 _amount ); /// @notice Set client address. /// @dev Could not be in the constructor since it is different for different clients. /// _referrerConfig can be zero if there is no referrer. /// @param _clientConfig address and basis points (percent * 100) of the client /// @param _referrerConfig address and basis points (percent * 100) of the referrer. function initialize( FeeRecipient calldata _clientConfig, FeeRecipient calldata _referrerConfig ) external; /// @notice Increase the number of deposited validators. /// @dev Should be called when a new ETH2 deposit has been made /// @param _validatorCountToAdd number of newly deposited validators function increaseDepositedCount( uint32 _validatorCountToAdd ) external; /// @notice Request a voluntary exit of validators /// @dev Should be called by the client when they want to signal P2P that certain validators need to be exited /// @param _pubkeys pubkeys of validators function voluntaryExit( bytes[] calldata _pubkeys ) external; /// @notice Returns the factory address /// @return address factory address function factory() external view returns (address); /// @notice Returns the service address /// @return address service address function service() external view returns (address); /// @notice Returns the client address /// @return address client address function client() external view returns (address); /// @notice Returns the client basis points /// @return uint256 client basis points function clientBasisPoints() external view returns (uint256); /// @notice Returns the referrer address /// @return address referrer address function referrer() external view returns (address); /// @notice Returns the referrer basis points /// @return uint256 referrer basis points function referrerBasisPoints() external view returns (uint256); /// @notice Returns the address for ETH2 0x01 withdrawal credentials associated with this FeeDistributor /// @dev Return FeeDistributor's own address if FeeDistributor should be CL rewards recipient /// Otherwise, return the client address /// @return address address for ETH2 0x01 withdrawal credentials function eth2WithdrawalCredentialsAddress() external view returns (address); }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "../@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "../access/IOwnable.sol"; /** * @dev External interface of Oracle declared to support ERC165 detection. */ interface IOracle is IOwnable, IERC165 { // Events /** * @notice Emits when a new oracle report (Merkle root) recorded * @param _root Merkle root */ event Oracle__Reported(bytes32 indexed _root); // Functions /** * @notice Set a new oracle report (Merkle root) * @param _root Merkle root */ function report(bytes32 _root) external; /** * @notice Verify Merkle proof (that the leaf belongs to the tree) * @param _proof Merkle proof (the leaf's sibling, and each non-leaf hash that could not otherwise be calculated without additional leaf nodes) * @param _feeDistributorInstance feeDistributor instance address * @param _amountInGwei total CL rewards earned by all validators in GWei (see _validatorCount) */ function verify( bytes32[] calldata _proof, address _feeDistributorInstance, uint256 _amountInGwei ) external view; }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "../feeDistributor/IFeeDistributor.sol"; /// @dev 256 bit struct /// @member basisPoints basis points (percent * 100) of EL rewards that should go to the recipient /// @member recipient address of the recipient struct FeeRecipient { uint96 basisPoints; address payable recipient; } /// @dev 256 bit struct /// @member depositedCount the number of deposited validators /// @member exitedCount the number of validators requested to exit /// @member collateralReturnedValue amount of ETH returned to the client to cover the collaterals /// @member cooldownUntil timestamp after which it will be possible to withdraw ignoring the client's revert on ETH receive struct ValidatorData { uint32 depositedCount; uint32 exitedCount; uint112 collateralReturnedValue; uint80 cooldownUntil; } /// @dev status of the client deposit /// @member None default status indicating that no ETH is waiting to be forwarded to Beacon DepositContract /// @member EthAdded client added ETH /// @member BeaconDepositInProgress P2P has forwarded some (but not all) ETH to Beacon DepositContract /// If all ETH has been forwarded, the status will be None. /// @member ServiceRejected P2P has rejected the service for a given FeeDistributor instance // The client can get a refund immediately. enum ClientDepositStatus { None, EthAdded, BeaconDepositInProgress, ServiceRejected } /// @dev 256 bit struct /// @member amount amount of ETH in wei to be used for an ETH2 deposit corresponding to a particular FeeDistributor instance /// @member expiration block timestamp after which the client will be able to get a refund /// @member status deposit status /// @member reservedForFutureUse unused space making up to 256 bit struct ClientDeposit { uint112 amount; uint40 expiration; ClientDepositStatus status; uint96 reservedForFutureUse; }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "../@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "../@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "../feeDistributorFactory/IFeeDistributorFactory.sol"; import "../assetRecovering/OwnableTokenRecoverer.sol"; import "../access/OwnableWithOperator.sol"; import "./IFeeDistributor.sol"; import "./FeeDistributorErrors.sol"; import "../structs/P2pStructs.sol"; import "../lib/P2pAddressLib.sol"; import "./Erc4337Account.sol"; /// @title Common logic for all FeeDistributor types abstract contract BaseFeeDistributor is Erc4337Account, OwnableTokenRecoverer, OwnableWithOperator, ReentrancyGuard, ERC165, IFeeDistributor { /// @notice FeeDistributorFactory address IFeeDistributorFactory internal immutable i_factory; /// @notice P2P fee recipient address address payable internal immutable i_service; /// @notice Client rewards recipient address and basis points FeeRecipient internal s_clientConfig; /// @notice Referrer rewards recipient address and basis points FeeRecipient internal s_referrerConfig; /// @notice If caller not client, revert modifier onlyClient() { address clientAddress = s_clientConfig.recipient; if (clientAddress != msg.sender) { revert FeeDistributor__CallerNotClient(msg.sender, clientAddress); } _; } /// @notice If caller not factory, revert modifier onlyFactory() { if (msg.sender != address(i_factory)) { revert FeeDistributor__NotFactoryCalled(msg.sender, i_factory); } _; } /// @dev Set values that are constant, common for all the clients, known at the initial deploy time. /// @param _factory address of FeeDistributorFactory /// @param _service address of the service (P2P) fee recipient constructor( address _factory, address payable _service ) { if (!ERC165Checker.supportsInterface(_factory, type(IFeeDistributorFactory).interfaceId)) { revert FeeDistributor__NotFactory(_factory); } if (_service == address(0)) { revert FeeDistributor__ZeroAddressService(); } i_factory = IFeeDistributorFactory(_factory); i_service = _service; bool serviceCanReceiveEther = P2pAddressLib._sendValue(_service, 0); if (!serviceCanReceiveEther) { revert FeeDistributor__ServiceCannotReceiveEther(_service); } } /// @inheritdoc IFeeDistributor function initialize( FeeRecipient calldata _clientConfig, FeeRecipient calldata _referrerConfig ) public virtual onlyFactory { if (_clientConfig.recipient == address(0)) { revert FeeDistributor__ZeroAddressClient(); } if (_clientConfig.recipient == i_service) { revert FeeDistributor__ClientAddressEqualsService(_clientConfig.recipient); } if (s_clientConfig.recipient != address(0)) { revert FeeDistributor__ClientAlreadySet(s_clientConfig.recipient); } if (_clientConfig.basisPoints >= 10000) { revert FeeDistributor__InvalidClientBasisPoints(_clientConfig.basisPoints); } if (_referrerConfig.recipient != address(0)) {// if there is a referrer if (_referrerConfig.recipient == i_service) { revert FeeDistributor__ReferrerAddressEqualsService(_referrerConfig.recipient); } if (_referrerConfig.recipient == _clientConfig.recipient) { revert FeeDistributor__ReferrerAddressEqualsClient(_referrerConfig.recipient); } if (_referrerConfig.basisPoints == 0) { revert FeeDistributor__ZeroReferrerBasisPointsForNonZeroReferrer(); } if (_clientConfig.basisPoints + _referrerConfig.basisPoints > 10000) { revert FeeDistributor__ClientPlusReferralBasisPointsExceed10000( _clientConfig.basisPoints, _referrerConfig.basisPoints ); } // set referrer config s_referrerConfig = _referrerConfig; } else {// if there is no referrer if (_referrerConfig.basisPoints != 0) { revert FeeDistributor__ReferrerBasisPointsMustBeZeroIfAddressIsZero(_referrerConfig.basisPoints); } } // set client config s_clientConfig = _clientConfig; emit FeeDistributor__Initialized( _clientConfig.recipient, _clientConfig.basisPoints, _referrerConfig.recipient, _referrerConfig.basisPoints ); bool clientCanReceiveEther = P2pAddressLib._sendValue(_clientConfig.recipient, 0); if (!clientCanReceiveEther) { revert FeeDistributor__ClientCannotReceiveEther(_clientConfig.recipient); } if (_referrerConfig.recipient != address(0)) {// if there is a referrer bool referrerCanReceiveEther = P2pAddressLib._sendValue(_referrerConfig.recipient, 0); if (!referrerCanReceiveEther) { revert FeeDistributor__ReferrerCannotReceiveEther(_referrerConfig.recipient); } } } /// @notice Accept ether from transactions receive() external payable { // only accept ether in an instance, not in a template if (s_clientConfig.recipient == address(0)) { revert FeeDistributor__ClientNotSet(); } } /// @inheritdoc IFeeDistributor function increaseDepositedCount(uint32 _validatorCountToAdd) external virtual { // Do nothing by default. Can be overridden. } /// @inheritdoc IFeeDistributor function voluntaryExit(bytes[] calldata _pubkeys) public virtual onlyClient { emit FeeDistributor__VoluntaryExit(_pubkeys); } /// @inheritdoc IFeeDistributor function factory() external view returns (address) { return address(i_factory); } /// @inheritdoc IFeeDistributor function service() external view returns (address) { return i_service; } /// @inheritdoc IFeeDistributor function client() public view override(Erc4337Account, IFeeDistributor) returns (address) { return s_clientConfig.recipient; } /// @inheritdoc IFeeDistributor function clientBasisPoints() external view returns (uint256) { return s_clientConfig.basisPoints; } /// @inheritdoc IFeeDistributor function referrer() external view returns (address) { return s_referrerConfig.recipient; } /// @inheritdoc IFeeDistributor function referrerBasisPoints() external view returns (uint256) { return s_referrerConfig.basisPoints; } /// @inheritdoc IFeeDistributor function eth2WithdrawalCredentialsAddress() external virtual view returns (address); /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IFeeDistributor).interfaceId || super.supportsInterface(interfaceId); } /// @inheritdoc IOwnable function owner() public view override(Erc4337Account, OwnableBase, Ownable) returns (address) { return i_factory.owner(); } /// @inheritdoc IOwnableWithOperator function operator() public view override(Erc4337Account, OwnableWithOperator) returns (address) { return super.operator(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity 0.8.10; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; /** * @dev External interface of Ownable. */ interface IOwnable { /** * @dev Returns the address of the current owner. */ function owner() external view returns (address); }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, Lido <[email protected]> // SPDX-License-Identifier: MIT // https://github.com/lidofinance/lido-otc-seller/blob/master/contracts/lib/AssetRecoverer.sol pragma solidity 0.8.10; import {IERC20} from "../@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC721} from "../@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {IERC1155} from "../@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import {SafeERC20} from "../@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @notice prevents burn for transfer functions * @dev _recipient should not be a zero address */ error TokenRecoverer__NoBurn(); /// @title Token Recoverer /// @notice Recover ERC20, ERC721 and ERC1155 from a derived contract abstract contract TokenRecoverer { using SafeERC20 for IERC20; event ERC20Transferred(address indexed _token, address indexed _recipient, uint256 _amount); event ERC721Transferred(address indexed _token, address indexed _recipient, uint256 _tokenId); event ERC1155Transferred(address indexed _token, address indexed _recipient, uint256 _tokenId, uint256 _amount, bytes _data); /** * @notice prevents burn for transfer functions * @dev checks for zero address and reverts if true * @param _recipient address of the transfer recipient */ modifier burnDisallowed(address _recipient) { if (_recipient == address(0)) { revert TokenRecoverer__NoBurn(); } _; } /** * @notice transfer an ERC20 token from this contract * @dev `SafeERC20.safeTransfer` doesn't always return a bool * as it performs an internal `require` check * @param _token address of the ERC20 token * @param _recipient address to transfer the tokens to * @param _amount amount of tokens to transfer */ function _transferERC20( address _token, address _recipient, uint256 _amount ) internal virtual burnDisallowed(_recipient) { IERC20(_token).safeTransfer(_recipient, _amount); emit ERC20Transferred(_token, _recipient, _amount); } /** * @notice transfer an ERC721 token from this contract * @dev `IERC721.safeTransferFrom` doesn't always return a bool * as it performs an internal `require` check * @param _token address of the ERC721 token * @param _recipient address to transfer the token to * @param _tokenId id of the individual token */ function _transferERC721( address _token, address _recipient, uint256 _tokenId ) internal virtual burnDisallowed(_recipient) { IERC721(_token).transferFrom(address(this), _recipient, _tokenId); emit ERC721Transferred(_token, _recipient, _tokenId); } /** * @notice transfer an ERC1155 token from this contract * @dev `IERC1155.safeTransferFrom` doesn't always return a bool * as it performs an internal `require` check * @param _token address of the ERC1155 token that is being recovered * @param _recipient address to transfer the token to * @param _tokenId id of the individual token to transfer * @param _amount amount of tokens to transfer * @param _data data to transfer along */ function _transferERC1155( address _token, address _recipient, uint256 _tokenId, uint256 _amount, bytes calldata _data ) internal virtual burnDisallowed(_recipient) { IERC1155(_token).safeTransferFrom(address(this), _recipient, _tokenId, _amount, _data); emit ERC1155Transferred(_token, _recipient, _tokenId, _amount, _data); } }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "../@openzeppelin/contracts/utils/Context.sol"; import "./IOwnable.sol"; /** * @notice Throws if called by any account other than the owner. * @param _caller address of the caller * @param _owner address of the owner */ error OwnableBase__CallerNotOwner(address _caller, address _owner); /** * @dev minimalistic version of OpenZeppelin's Ownable. * The owner is abstract and is not persisted in storage. * Needs to be overridden in a child contract. */ abstract contract OwnableBase is Context, IOwnable { /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { address caller = _msgSender(); address currentOwner = owner(); if (currentOwner != caller) { revert OwnableBase__CallerNotOwner(caller, currentOwner); } _; } /** * @dev Returns the address of the current owner. * Needs to be overridden in a child contract. */ function owner() public view virtual override returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity 0.8.10; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity 0.8.10; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity 0.8.10; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity 0.8.10; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity 0.8.10; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity 0.8.10; /** * @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 * ==== * * [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 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity 0.8.10; /** * @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 Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "./Ownable2Step.sol"; import "./IOwnableWithOperator.sol"; /** * @notice newOperator is the zero address */ error Access__ZeroNewOperator(); /** * @notice newOperator is the same as the old one */ error Access__SameOperator(address _operator); /** * @notice caller is neither the operator nor owner */ error Access__CallerNeitherOperatorNorOwner(address _caller, address _operator, address _owner); /** * @notice address is neither the operator nor owner */ error Access__AddressNeitherOperatorNorOwner(address _address, address _operator, address _owner); /** * @dev Ownable with an additional role of operator */ abstract contract OwnableWithOperator is Ownable2Step, IOwnableWithOperator { address private s_operator; /** * @dev Emits when the operator has been changed * @param _previousOperator address of the previous operator * @param _newOperator address of the new operator */ event OperatorChanged( address indexed _previousOperator, address indexed _newOperator ); /** * @dev Throws if called by any account other than the operator or the owner. */ modifier onlyOperatorOrOwner() { address currentOwner = owner(); address currentOperator = s_operator; if (currentOperator != _msgSender() && currentOwner != _msgSender()) { revert Access__CallerNeitherOperatorNorOwner(_msgSender(), currentOperator, currentOwner); } _; } function checkOperatorOrOwner(address _address) public view virtual { address currentOwner = owner(); address currentOperator = s_operator; if (_address == address(0) || (currentOperator != _address && currentOwner != _address)) { revert Access__AddressNeitherOperatorNorOwner(_address, currentOperator, currentOwner); } } /** * @dev Returns the current operator. */ function operator() public view virtual returns (address) { return s_operator; } /** * @dev Transfers operator to a new account (`newOperator`). * Can only be called by the current owner. */ function changeOperator(address _newOperator) external virtual onlyOwner { if (_newOperator == address(0)) { revert Access__ZeroNewOperator(); } if (_newOperator == s_operator) { revert Access__SameOperator(_newOperator); } _changeOperator(_newOperator); } /** * @dev Transfers operator to a new account (`newOperator`). * Internal function without access restriction. */ function _changeOperator(address _newOperator) internal virtual { address oldOperator = s_operator; s_operator = _newOperator; emit OperatorChanged(oldOperator, _newOperator); } /** * @dev Dismisses the old operator without setting a new one. * Can only be called by the current owner. */ function dismissOperator() external virtual onlyOwner { _changeOperator(address(0)); } }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "../feeDistributorFactory/IFeeDistributorFactory.sol"; /// @notice Should be a FeeDistributorFactory contract /// @param _passedAddress passed address that does not support IFeeDistributorFactory interface error FeeDistributor__NotFactory(address _passedAddress); /// @notice Service address should be a secure P2P address, not zero. error FeeDistributor__ZeroAddressService(); /// @notice Client address should be different from service address. /// @param _passedAddress passed client address that equals to the service address error FeeDistributor__ClientAddressEqualsService(address _passedAddress); /// @notice Client address should be an actual client address, not zero. error FeeDistributor__ZeroAddressClient(); /// @notice Client basis points should be >= 0 and <= 10000 /// @param _clientBasisPoints passed incorrect client basis points error FeeDistributor__InvalidClientBasisPoints(uint96 _clientBasisPoints); /// @notice Referrer basis points should be > 0 if the referrer exists error FeeDistributor__ZeroReferrerBasisPointsForNonZeroReferrer(); /// @notice The sum of (Client basis points + Referral basis points) should be >= 0 and <= 10000 /// @param _clientBasisPoints passed client basis points /// @param _referralBasisPoints passed referral basis points error FeeDistributor__ClientPlusReferralBasisPointsExceed10000(uint96 _clientBasisPoints, uint96 _referralBasisPoints); /// @notice Referrer address should be different from service address. /// @param _passedAddress passed referrer address that equals to the service address error FeeDistributor__ReferrerAddressEqualsService(address _passedAddress); /// @notice Referrer address should be different from client address. /// @param _passedAddress passed referrer address that equals to the client address error FeeDistributor__ReferrerAddressEqualsClient(address _passedAddress); /// @notice Only factory can call `initialize`. /// @param _msgSender sender address. /// @param _actualFactory the actual factory address that can call `initialize`. error FeeDistributor__NotFactoryCalled(address _msgSender, IFeeDistributorFactory _actualFactory); /// @notice `initialize` should only be called once. /// @param _existingClient address of the client with which the contact has already been initialized. error FeeDistributor__ClientAlreadySet(address _existingClient); /// @notice Cannot call `withdraw` if the client address is not set yet. /// @dev The client address is supposed to be set by the factory. error FeeDistributor__ClientNotSet(); /// @notice basisPoints of the referrer must be zero if referrer address is empty. /// @param _referrerBasisPoints basisPoints of the referrer. error FeeDistributor__ReferrerBasisPointsMustBeZeroIfAddressIsZero(uint96 _referrerBasisPoints); /// @notice service should be able to receive ether. /// @param _service address of the service. error FeeDistributor__ServiceCannotReceiveEther(address _service); /// @notice client should be able to receive ether. /// @param _client address of the client. error FeeDistributor__ClientCannotReceiveEther(address _client); /// @notice referrer should be able to receive ether. /// @param _referrer address of the referrer. error FeeDistributor__ReferrerCannotReceiveEther(address _referrer); /// @notice zero ether balance error FeeDistributor__NothingToWithdraw(); /// @notice Throws if called by any account other than the client. /// @param _caller address of the caller /// @param _client address of the client error FeeDistributor__CallerNotClient(address _caller, address _client); /// @notice Throws in case there was some ether left after `withdraw` and it has failed to recover. /// @param _to destination address for ether. /// @param _amount how much wei the destination address should have received, but didn't. error FeeDistributor__EtherRecoveryFailed( address _to, uint256 _amount ); /// @notice ETH receiver should not be a zero address error FeeDistributor__ZeroAddressEthReceiver();
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; library P2pAddressLib { /// @notice Sends amount of ETH in wei to recipient /// @param _recipient address of recipient /// @param _amount amount of ETH in wei /// @return bool whether send succeeded function _sendValue(address payable _recipient, uint256 _amount) internal returns (bool) { (bool success, ) = _recipient.call{ value: _amount, gas: gasleft() / 4 // to prevent DOS, should be enough in normal cases }(""); return success; } /// @notice Sends amount of ETH in wei to recipient /// @param _recipient address of recipient /// @param _amount amount of ETH in wei /// @return bool whether send succeeded function _sendValueWithoutGasRestrictions(address payable _recipient, uint256 _amount) internal returns (bool) { (bool success, ) = _recipient.call{ value: _amount }(""); return success; } }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "../@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "../erc4337/IAccount.sol"; import "../erc4337/IEntryPointStakeManager.sol"; import "../erc4337/UserOperation.sol"; import "../access/IOwnableWithOperator.sol"; /// @notice passed address should be a valid ERC-4337 entryPoint /// @param _passedAddress passed address error Erc4337Account__NotEntryPoint(address _passedAddress); /// @notice data length should be at least 4 byte to be a function signature error Erc4337Account__DataTooShort(); /// @notice only withdraw function is allowed to be called via ERC-4337 UserOperation error Erc4337Account__OnlyWithdrawIsAllowed(); /// @notice only client, owner, and operator are allowed to withdraw from EntryPoint error Erc4337Account__NotAllowedToWithdrawFromEntryPoint(); /// @title gasless withdraw for FeeDistributors via ERC-4337 abstract contract Erc4337Account is IAccount, IOwnableWithOperator { using ECDSA for bytes32; /// @notice withdraw without arguments bytes4 private constant defaultWithdrawSelector = bytes4(keccak256("withdraw()")); /// @notice Singleton ERC-4337 entryPoint 0.6.0 used by this account address payable constant entryPoint = payable(0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789); /// @inheritdoc IAccount function validateUserOp( UserOperation calldata userOp, bytes32 userOpHash, uint256 missingAccountFunds ) external override returns (uint256 validationData) { if (msg.sender != entryPoint) { revert Erc4337Account__NotEntryPoint(msg.sender); } validationData = _validateSignature(userOp, userOpHash); bytes4 selector = _getFunctionSelector(userOp.callData); if (selector != withdrawSelector()) { revert Erc4337Account__OnlyWithdrawIsAllowed(); } _payPrefund(missingAccountFunds); } /// @notice Withdraw this contract's balance from EntryPoint back to this contract function withdrawFromEntryPoint() external { if (!( msg.sender == owner() || msg.sender == operator() || msg.sender == client() )) { revert Erc4337Account__NotAllowedToWithdrawFromEntryPoint(); } uint256 balance = IEntryPointStakeManager(entryPoint).balanceOf(address(this)); IEntryPointStakeManager(entryPoint).withdrawTo(payable(address(this)), balance); } /// @notice Validates the signature of a user operation. /// @param _userOp the operation that is about to be executed. /// @param _userOpHash hash of the user's request data. can be used as the basis for signature. /// @return validationData 0 for valid signature, 1 to mark signature failure function _validateSignature( UserOperation calldata _userOp, bytes32 _userOpHash ) private view returns (uint256 validationData) { bytes32 hash = _userOpHash.toEthSignedMessageHash(); address signer = hash.recover(_userOp.signature); if ( signer == operator() || signer == client() ) { validationData = 0; } else { validationData = 1; } } /// @notice Returns function selector (first 4 bytes of data) /// @param _data calldata (encoded signature + arguments) /// @return functionSelector function selector function _getFunctionSelector(bytes calldata _data) private pure returns (bytes4 functionSelector) { if (_data.length < 4) { revert Erc4337Account__DataTooShort(); } return bytes4(_data[:4]); } /// @notice sends to the entrypoint (msg.sender) the missing funds for this transaction. /// @param _missingAccountFunds the minimum value this method should send the entrypoint. /// this value MAY be zero, in case there is enough deposit, or the userOp has a paymaster. function _payPrefund(uint256 _missingAccountFunds) private { if (_missingAccountFunds != 0) { (bool success, ) = payable(msg.sender).call{ value: _missingAccountFunds, gas: type(uint256).max }(""); (success); //ignore failure (its EntryPoint's job to verify, not account.) } } /// @notice Returns the client address /// @return address client address function client() public view virtual returns (address); /// @inheritdoc IOwnable function owner() public view virtual returns (address); /// @inheritdoc IOwnableWithOperator function operator() public view virtual returns (address); /// @notice withdraw function selector /// @dev since withdraw function in derived contracts can have arguments, its /// signature can vary and can be overridden in derived contracts /// @return bytes4 withdraw function selector function withdrawSelector() public pure virtual returns (bytes4) { return defaultWithdrawSelector; } }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "./Ownable.sol"; /** * @notice caller must be pendingOwner */ error Ownable2Step__CallerNotNewOwner(); /** * @notice new owner address should be different from the current owner */ error Ownable2Step__NewOwnerShouldNotBeCurrentOwner(); /** * @dev Contract module which provides 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} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private s_pendingOwner; /** * @dev Emits in transferOwnership (start of the transfer) * @param _previousOwner address of the previous owner * @param _newOwner address of the new owner */ event OwnershipTransferStarted(address indexed _previousOwner, address indexed _newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return s_pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { address currentOwner = owner(); if (newOwner == currentOwner) { revert Ownable2Step__NewOwnerShouldNotBeCurrentOwner(); } s_pendingOwner = newOwner; emit OwnershipTransferStarted(currentOwner, newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete s_pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() external { address sender = _msgSender(); if (pendingOwner() != sender) { revert Ownable2Step__CallerNotNewOwner(); } _transferOwnership(sender); } }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "./IOwnable.sol"; /** * @dev Ownable with an additional role of operator */ interface IOwnableWithOperator is IOwnable { /** * @dev Returns the current operator. */ function operator() external view returns (address); }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) // SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "./OwnableBase.sol"; /** * @notice _newOwner cannot be a zero address */ error Ownable__NewOwnerIsZeroAddress(); /** * @dev OpenZeppelin's Ownable with modifier onlyOwner extracted to OwnableBase * and removed `renounceOwnership` */ abstract contract Ownable is OwnableBase { /** * @dev Emits when the owner has been changed. * @param _previousOwner address of the previous owner * @param _newOwner address of the new owner */ event OwnershipTransferred(address indexed _previousOwner, address indexed _newOwner); address private s_owner; /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual override returns (address) { return s_owner; } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. * @param _newOwner address of the new owner */ function transferOwnership(address _newOwner) external virtual onlyOwner { if (_newOwner == address(0)) { revert Ownable__NewOwnerIsZeroAddress(); } _transferOwnership(_newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. * @param _newOwner address of the new owner */ function _transferOwnership(address _newOwner) internal virtual { address oldOwner = s_owner; s_owner = _newOwner; emit OwnershipTransferred(oldOwner, _newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity 0.8.10; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.10; import "./UserOperation.sol"; interface IAccount { /** * Validate user's signature and nonce * the entryPoint will make the call to the recipient only if this validation call returns successfully. * signature failure should be reported by returning SIG_VALIDATION_FAILED (1). * This allows making a "simulation call" without a valid signature * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure. * * @dev Must validate caller is the entryPoint. * Must validate the signature and nonce * @param userOp the operation that is about to be executed. * @param userOpHash hash of the user's request data. can be used as the basis for signature. * @param missingAccountFunds missing funds on the account's deposit in the entrypoint. * This is the minimum amount to transfer to the sender(entryPoint) to be able to make the call. * The excess is left as a deposit in the entrypoint, for future calls. * can be withdrawn anytime using "entryPoint.withdrawTo()" * In case there is a paymaster in the request (or the current deposit is high enough), this value will be zero. * @return validationData packaged ValidationData structure. use `_packValidationData` and `_unpackValidationData` to encode and decode * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure, * otherwise, an address of an "authorizer" contract. * <6-byte> validUntil - last timestamp this operation is valid. 0 for "indefinite" * <6-byte> validAfter - first timestamp this operation is valid * If an account doesn't use time-range, it is enough to return SIG_VALIDATION_FAILED value (1) for signature failure. * Note that the validation code cannot use block.timestamp (or block.number) directly. */ function validateUserOp(UserOperation calldata userOp, bytes32 userOpHash, uint256 missingAccountFunds) external returns (uint256 validationData); }
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.10; interface IEntryPointStakeManager { /// @return the deposit (for gas payment) of the account function balanceOf(address account) external view returns (uint256); /** * withdraw from the deposit. * @param withdrawAddress the address to send withdrawn value. * @param withdrawAmount the amount to withdraw. */ function withdrawTo(address payable withdrawAddress, uint256 withdrawAmount) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.10; /** * User Operation struct * @param sender the sender account of this request. * @param nonce unique value the sender uses to verify it is not a replay. * @param initCode if set, the account contract will be created by this constructor/ * @param callData the method call to execute on this account. * @param callGasLimit the gas limit passed to the callData method call. * @param verificationGasLimit gas used for validateUserOp and validatePaymasterUserOp. * @param preVerificationGas gas not calculated by the handleOps method, but added to the gas paid. Covers batch overhead. * @param maxFeePerGas same as EIP-1559 gas parameter. * @param maxPriorityFeePerGas same as EIP-1559 gas parameter. * @param paymasterAndData if set, this field holds the paymaster address and paymaster-specific data. the paymaster will pay for the transaction instead of the sender. * @param signature sender-verified signature over the entire request, the EntryPoint address and the chain ID. */ struct UserOperation { address sender; uint256 nonce; bytes initCode; bytes callData; uint256 callGasLimit; uint256 verificationGasLimit; uint256 preVerificationGas; uint256 maxFeePerGas; uint256 maxPriorityFeePerGas; bytes paymasterAndData; bytes signature; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity 0.8.10; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address payable","name":"_service","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"Access__AddressNeitherOperatorNorOwner","type":"error"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"Access__SameOperator","type":"error"},{"inputs":[],"name":"Access__ZeroNewOperator","type":"error"},{"inputs":[],"name":"Erc4337Account__DataTooShort","type":"error"},{"inputs":[],"name":"Erc4337Account__NotAllowedToWithdrawFromEntryPoint","type":"error"},{"inputs":[{"internalType":"address","name":"_passedAddress","type":"address"}],"name":"Erc4337Account__NotEntryPoint","type":"error"},{"inputs":[],"name":"Erc4337Account__OnlyWithdrawIsAllowed","type":"error"},{"inputs":[{"internalType":"address","name":"_caller","type":"address"},{"internalType":"address","name":"_client","type":"address"}],"name":"FeeDistributor__CallerNotClient","type":"error"},{"inputs":[{"internalType":"address","name":"_passedAddress","type":"address"}],"name":"FeeDistributor__ClientAddressEqualsService","type":"error"},{"inputs":[{"internalType":"address","name":"_existingClient","type":"address"}],"name":"FeeDistributor__ClientAlreadySet","type":"error"},{"inputs":[{"internalType":"address","name":"_client","type":"address"}],"name":"FeeDistributor__ClientCannotReceiveEther","type":"error"},{"inputs":[],"name":"FeeDistributor__ClientNotSet","type":"error"},{"inputs":[{"internalType":"uint96","name":"_clientBasisPoints","type":"uint96"},{"internalType":"uint96","name":"_referralBasisPoints","type":"uint96"}],"name":"FeeDistributor__ClientPlusReferralBasisPointsExceed10000","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"FeeDistributor__EtherRecoveryFailed","type":"error"},{"inputs":[{"internalType":"uint96","name":"_clientBasisPoints","type":"uint96"}],"name":"FeeDistributor__InvalidClientBasisPoints","type":"error"},{"inputs":[{"internalType":"address","name":"_passedAddress","type":"address"}],"name":"FeeDistributor__NotFactory","type":"error"},{"inputs":[{"internalType":"address","name":"_msgSender","type":"address"},{"internalType":"contract IFeeDistributorFactory","name":"_actualFactory","type":"address"}],"name":"FeeDistributor__NotFactoryCalled","type":"error"},{"inputs":[],"name":"FeeDistributor__NothingToWithdraw","type":"error"},{"inputs":[{"internalType":"address","name":"_passedAddress","type":"address"}],"name":"FeeDistributor__ReferrerAddressEqualsClient","type":"error"},{"inputs":[{"internalType":"address","name":"_passedAddress","type":"address"}],"name":"FeeDistributor__ReferrerAddressEqualsService","type":"error"},{"inputs":[{"internalType":"uint96","name":"_referrerBasisPoints","type":"uint96"}],"name":"FeeDistributor__ReferrerBasisPointsMustBeZeroIfAddressIsZero","type":"error"},{"inputs":[{"internalType":"address","name":"_referrer","type":"address"}],"name":"FeeDistributor__ReferrerCannotReceiveEther","type":"error"},{"inputs":[{"internalType":"address","name":"_service","type":"address"}],"name":"FeeDistributor__ServiceCannotReceiveEther","type":"error"},{"inputs":[],"name":"FeeDistributor__ZeroAddressClient","type":"error"},{"inputs":[],"name":"FeeDistributor__ZeroAddressEthReceiver","type":"error"},{"inputs":[],"name":"FeeDistributor__ZeroAddressService","type":"error"},{"inputs":[],"name":"FeeDistributor__ZeroReferrerBasisPointsForNonZeroReferrer","type":"error"},{"inputs":[],"name":"OracleFeeDistributor__CannotResetClientOnlyClRewards","type":"error"},{"inputs":[],"name":"OracleFeeDistributor__ClientBasisPointsShouldBeHigherThan5000","type":"error"},{"inputs":[{"internalType":"address","name":"_passedAddress","type":"address"}],"name":"OracleFeeDistributor__NotOracle","type":"error"},{"inputs":[],"name":"OracleFeeDistributor__WaitForEnoughRewardsToWithdraw","type":"error"},{"inputs":[],"name":"Ownable2Step__CallerNotNewOwner","type":"error"},{"inputs":[],"name":"Ownable2Step__NewOwnerShouldNotBeCurrentOwner","type":"error"},{"inputs":[{"internalType":"address","name":"_caller","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"OwnableBase__CallerNotOwner","type":"error"},{"inputs":[],"name":"TokenRecoverer__NoBurn","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_data","type":"bytes"}],"name":"ERC1155Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ERC20Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ERC721Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"FeeDistributor__EtherRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_client","type":"address"},{"indexed":false,"internalType":"uint96","name":"_clientBasisPoints","type":"uint96"},{"indexed":true,"internalType":"address","name":"_referrer","type":"address"},{"indexed":false,"internalType":"uint96","name":"_referrerBasisPoints","type":"uint96"}],"name":"FeeDistributor__Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes[]","name":"_pubkeys","type":"bytes[]"}],"name":"FeeDistributor__VoluntaryExit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_serviceAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_clientAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_referrerAmount","type":"uint256"}],"name":"FeeDistributor__Withdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"_newOperator","type":"address"}],"name":"OperatorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_clientOnlyClRewards","type":"uint256"}],"name":"OracleFeeDistributor__ClientOnlyClRewardsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"_newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"_newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOperator","type":"address"}],"name":"changeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"checkOperatorOrOwner","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"client","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clientBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clientOnlyClRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dismissOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyEtherRecoveryWithoutOracleData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eth2WithdrawalCredentialsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_validatorCountToAdd","type":"uint32"}],"name":"increaseDepositedCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint96","name":"basisPoints","type":"uint96"},{"internalType":"address payable","name":"recipient","type":"address"}],"internalType":"struct FeeRecipient","name":"_clientConfig","type":"tuple"},{"components":[{"internalType":"uint96","name":"basisPoints","type":"uint96"},{"internalType":"address payable","name":"recipient","type":"address"}],"internalType":"struct FeeRecipient","name":"_referrerConfig","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"uint256","name":"_amountInGwei","type":"uint256"}],"name":"recoverEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"referrer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referrerBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"service","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_clientOnlyClRewards","type":"uint256"}],"name":"setClientOnlyClRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"transferERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation","name":"userOp","type":"tuple"},{"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"internalType":"uint256","name":"missingAccountFunds","type":"uint256"}],"name":"validateUserOp","outputs":[{"internalType":"uint256","name":"validationData","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"_pubkeys","type":"bytes[]"}],"name":"voluntaryExit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"uint256","name":"_amountInGwei","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFromEntryPoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawSelector","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e06040523480156200001157600080fd5b5060405162005dd938038062005dd9833981810160405281019062000037919062000664565b8181620000596200004d620002c860201b60201c565b620002d060201b60201c565b600160038190555062000098827f1e9abf3f000000000000000000000000000000000000000000000000000000006200030e60201b620021911760201c565b620000dc57816040517f93bfc646000000000000000000000000000000000000000000000000000000008152600401620000d39190620006d1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000144576040517f58d36f3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250506000620001c68260006200034460201b620021b61760201c565b9050806200020d57816040517f9ebcdf5600000000000000000000000000000000000000000000000000000000815260040162000204919062000759565b60405180910390fd5b50505062000247837f22b086d4000000000000000000000000000000000000000000000000000000006200030e60201b620021911760201c565b6200028b57826040517faad03bd2000000000000000000000000000000000000000000000000000000008152600401620002829190620006d1565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250505050506200088d565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556200030b81620003d060201b6200223c1760201c565b50565b600062000321836200049460201b60201c565b80156200033c57506200033b8383620004f260201b60201c565b5b905092915050565b6000808373ffffffffffffffffffffffffffffffffffffffff168360045a6200036e9190620007af565b906040516200037d906200081c565b600060405180830381858888f193505050503d8060008114620003bd576040519150601f19603f3d011682016040523d82523d6000602084013e620003c2565b606091505b505090508091505092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000620004c8827f01ffc9a700000000000000000000000000000000000000000000000000000000620004f260201b60201c565b8015620004eb5750620004e98263ffffffff60e01b620004f260201b60201c565b155b9050919050565b6000806301ffc9a760e01b8360405160240162000510919062000870565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000806000602060008551602087018a617530fa92503d915060005190508280156200059c575060208210155b8015620005a95750600081115b94505050505092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005e782620005ba565b9050919050565b620005f981620005da565b81146200060557600080fd5b50565b6000815190506200061981620005ee565b92915050565b60006200062c82620005ba565b9050919050565b6200063e816200061f565b81146200064a57600080fd5b50565b6000815190506200065e8162000633565b92915050565b60008060006060848603121562000680576200067f620005b5565b5b6000620006908682870162000608565b9350506020620006a38682870162000608565b9250506040620006b6868287016200064d565b9150509250925092565b620006cb81620005da565b82525050565b6000602082019050620006e86000830184620006c0565b92915050565b6000819050919050565b600062000719620007136200070d84620005ba565b620006ee565b620005ba565b9050919050565b60006200072d82620006f8565b9050919050565b6000620007418262000720565b9050919050565b620007538162000734565b82525050565b600060208201905062000770600083018462000748565b92915050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000620007bc8262000776565b9150620007c98362000776565b925082620007dc57620007db62000780565b5b828204905092915050565b600081905092915050565b50565b600062000804600083620007e7565b91506200081182620007f2565b600082019050919050565b60006200082982620007f5565b9150819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6200086a8162000833565b82525050565b60006020820190506200088760008301846200085f565b92915050565b60805160a05160c0516154dd620008fc60003960008181610d9a01526113fc0152600081816111ed015281816116d601528181611fab01528181612bd10152612dff015260008181610dc2015281816111c50152818161208d01528181612aa60152612afa01526154dd6000f3fe6080604052600436106101dc5760003560e01c80639db5dbe411610102578063ddc9d30711610095578063f7fa846911610064578063f7fa8469146106d3578063f818e093146106fc578063fad34b3714610725578063ffa61ae21461073c5761026f565b8063ddc9d3071461062d578063e30c397814610656578063f2fde38b14610681578063f63720a4146106aa5761026f565b8063d598d4c9116100d1578063d598d4c914610585578063dbecc616146105b0578063dcc7b851146105d9578063dd83edc3146106045761026f565b80639db5dbe4146104ef578063ac407bbc14610518578063b83802f514610543578063c45a01551461055a5761026f565b8063570ca7351161017a5780637dc0d1d0116101495780637dc0d1d0146104575780638da5cb5b146104825780638eb9b324146104ad5780639261eda6146104c45761026f565b8063570ca735146103bf5780635d2e0470146103ea57806368447c931461041557806379ba5097146104405761026f565b80631aca6376116101b65780631aca6376146103055780631b54769e1461032e5780633a871cdd14610357578063470cc5f2146103945761026f565b806301ffc9a71461027457806306394c9b146102b1578063109e94cf146102da5761026f565b3661026f57600073ffffffffffffffffffffffffffffffffffffffff166004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561026d576040517f27438ff100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b34801561028057600080fd5b5061029b60048036038101906102969190613b60565b610765565b6040516102a89190613ba8565b60405180910390f35b3480156102bd57600080fd5b506102d860048036038101906102d39190613c21565b6107df565b005b3480156102e657600080fd5b506102ef610971565b6040516102fc9190613c5d565b60405180910390f35b34801561031157600080fd5b5061032c60048036038101906103279190613cae565b61099e565b005b34801561033a57600080fd5b5061035560048036038101906103509190613c21565b610a3a565b005b34801561036357600080fd5b5061037e60048036038101906103799190613d5c565b610b57565b60405161038b9190613dda565b60405180910390f35b3480156103a057600080fd5b506103a9610c94565b6040516103b69190613dda565b60405180910390f35b3480156103cb57600080fd5b506103d4610cc7565b6040516103e19190613c5d565b60405180910390f35b3480156103f657600080fd5b506103ff610cd6565b60405161040c9190613e04565b60405180910390f35b34801561042157600080fd5b5061042a610ce5565b6040516104379190613c5d565b60405180910390f35b34801561044c57600080fd5b50610455610d12565b005b34801561046357600080fd5b5061046c610d96565b6040516104799190613c5d565b60405180910390f35b34801561048e57600080fd5b50610497610dbe565b6040516104a49190613c5d565b60405180910390f35b3480156104b957600080fd5b506104c2610e54565b005b3480156104d057600080fd5b506104d9611050565b6040516104e69190613dda565b60405180910390f35b3480156104fb57600080fd5b5061051660048036038101906105119190613cae565b611083565b005b34801561052457600080fd5b5061052d61111f565b60405161053a9190613dda565b60405180910390f35b34801561054f57600080fd5b50610558611129565b005b34801561056657600080fd5b5061056f6111c1565b60405161057c9190613c5d565b60405180910390f35b34801561059157600080fd5b5061059a6111e9565b6040516105a79190613c5d565b60405180910390f35b3480156105bc57600080fd5b506105d760048036038101906105d29190613e84565b611211565b005b3480156105e557600080fd5b506105ee6112b3565b6040516105fb9190613c5d565b60405180910390f35b34801561061057600080fd5b5061062b60048036038101906106269190613f74565b6112e0565b005b34801561063957600080fd5b50610654600480360381019061064f9190614012565b6117ba565b005b34801561066257600080fd5b5061066b6119d9565b6040516106789190613c5d565b60405180910390f35b34801561068d57600080fd5b506106a860048036038101906106a39190613c21565b611a03565b005b3480156106b657600080fd5b506106d160048036038101906106cc91906140c2565b611ba0565b005b3480156106df57600080fd5b506106fa60048036038101906106f59190614145565b611ba3565b005b34801561070857600080fd5b50610723600480360381019061071e91906141b1565b611c7d565b005b34801561073157600080fd5b5061073a611ce6565b005b34801561074857600080fd5b50610763600480360381019061075e91906141f1565b61208b565b005b60007f9967e99b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107d857506107d782612300565b5b9050919050565b60006107e961236a565b905060006107f5610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108695781816040517f078c725900000000000000000000000000000000000000000000000000000000815260040161086092919061421e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108d0576040517f6cca850000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561096357826040517fb16f970500000000000000000000000000000000000000000000000000000000815260040161095a9190613c5d565b60405180910390fd5b61096c83612372565b505050565b60006004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006109a861236a565b905060006109b4610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a285781816040517f078c7259000000000000000000000000000000000000000000000000000000008152600401610a1f92919061421e565b60405180910390fd5b610a33858585612438565b5050505050565b6000610a44610dbe565b90506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610b0c57508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610b0b57508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b5b15610b52578281836040517ff8864219000000000000000000000000000000000000000000000000000000008152600401610b4993929190614247565b60405180910390fd5b505050565b6000735ff137d4b0fdcd49dca30c7cf57e578a026d278973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bdd57336040517f56bd3832000000000000000000000000000000000000000000000000000000008152600401610bd49190613c5d565b60405180910390fd5b610be7848461257a565b90506000610c03858060600190610bfe919061428d565b612680565b9050610c0d610cd6565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610c83576040517f28b01fc200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c8c836126e7565b509392505050565b6000600560000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b6000610cd1612783565b905090565b600063dd83edc360e01b905090565b60006005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610d1c61236a565b90508073ffffffffffffffffffffffffffffffffffffffff16610d3d6119d9565b73ffffffffffffffffffffffffffffffffffffffff1614610d8a576040517f4b5dfa7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d93816127ad565b50565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4f9190614305565b905090565b610e5c610dbe565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610ec75750610e98610cc7565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80610f045750610ed5610971565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610f3a576040517f9218ea7200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000735ff137d4b0fdcd49dca30c7cf57e578a026d278973ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610f899190613c5d565b602060405180830381865afa158015610fa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fca9190614347565b9050735ff137d4b0fdcd49dca30c7cf57e578a026d278973ffffffffffffffffffffffffffffffffffffffff1663205c287830836040518363ffffffff1660e01b815260040161101b929190614383565b600060405180830381600087803b15801561103557600080fd5b505af1158015611049573d6000803e3d6000fd5b5050505050565b6000600460000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b600061108d61236a565b90506000611099610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461110d5781816040517f078c725900000000000000000000000000000000000000000000000000000000815260040161110492919061421e565b60405180910390fd5b6111188585856127de565b5050505050565b6000600654905090565b600061113361236a565b9050600061113f610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111b35781816040517f078c72590000000000000000000000000000000000000000000000000000000081526004016111aa92919061421e565b60405180910390fd5b6111bd6000612372565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b600061121b61236a565b90506000611227610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461129b5781816040517f078c725900000000000000000000000000000000000000000000000000000000815260040161129292919061421e565b60405180910390fd5b6112a98888888888886128dc565b5050505050505050565b60006004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60026003541415611326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131d90614409565b60405180910390fd5b6002600381905550600073ffffffffffffffffffffffffffffffffffffffff166004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156113ba576040517f27438ff100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600047905060008114156113fa576040517f851c981300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166304b38ce0858530866040518563ffffffff1660e01b815260040161145994939291906144aa565b60006040518083038186803b15801561147157600080fd5b505afa158015611485573d6000803e3d6000fd5b505050506000633b9aca008361149b9190614519565b90506006548110156114d9576040517f6367839400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060065482846114ea9190614573565b6114f491906145c9565b90506000600460000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600061271082846115379190614519565b611541919061462c565b8361154c91906145c9565b9050600060028661155d919061462c565b90506000818311156115a757819050818761157891906145c9565b92508361271061158891906145c9565b612710836115969190614519565b6115a0919061462c565b94506115b6565b82876115b391906145c9565b90505b7f8f7f893f27ebf075600a1d8910a1472953cee12c959de036d85454e556eb286b6006546040516115e79190613dda565b60405180910390a1600080600073ffffffffffffffffffffffffffffffffffffffff166005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d157612710600560000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16886116859190614519565b61168f919061462c565b9050808561169d91906145c9565b94506116ce6005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826121b6565b91505b6116fb7f0000000000000000000000000000000000000000000000000000000000000000866121b6565b806117035750815b91506117346004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846121b6565b8061173c5750815b9150811561176957888761175091906145c9565b600660008282546117619190614573565b925050819055505b7fd677f135315cde603d8fd2eb0a155980bf63fe7de2c4fd0c87107f6444aab7a185848360405161179c9392919061465d565b60405180910390a15050505050505050506001600381905550505050565b60006117c461236a565b905060006117d0610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146118445781816040517f078c725900000000000000000000000000000000000000000000000000000000815260040161183b92919061421e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156118ab576040517f5c2a09ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff1663dd83edc38686866040518463ffffffff1660e01b81526004016118e893929190614694565b600060405180830381600087803b15801561190257600080fd5b505af1158015611916573d6000803e3d6000fd5b50505050600047905060008111156119d05760006119348883612a2d565b9050801561198f578773ffffffffffffffffffffffffffffffffffffffff167f40f5306aff6a89943d2c2cdc9e8f4ce64717bf780c07d562f96eecbec8f36527836040516119829190613dda565b60405180910390a26119ce565b87826040517f1bad55a10000000000000000000000000000000000000000000000000000000081526004016119c5929190614725565b60405180910390fd5b505b50505050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611a0d61236a565b90506000611a19610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a8d5781816040517f078c7259000000000000000000000000000000000000000000000000000000008152600401611a8492919061421e565b60405180910390fd5b6000611a97610dbe565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611aff576040517f4310d9f200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350505050565b50565b60006004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611c3f5733816040517fa96b080e000000000000000000000000000000000000000000000000000000008152600401611c3692919061421e565b60405180910390fd5b7f7f88469032e5ef826f39b217188d7fb9466a77bab8f9736d77f8b509560ec8358383604051611c709291906148c3565b60405180910390a1505050565b611388826000016020810190611c93919061492b565b6bffffffffffffffffffffffff1611611cd8576040517fdb095d9c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ce28282612aa4565b5050565b60006004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611d825733816040517fa96b080e000000000000000000000000000000000000000000000000000000008152600401611d7992919061421e565b60405180910390fd5b60026003541415611dc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dbf90614409565b60405180910390fd5b600260038190555060004790506000811415611e10576040517f851c981300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600282611e1f919061462c565b9050600081905060008284611e3491906145c9565b90506000600460000160009054906101000a90046bffffffffffffffffffffffff16612710611e639190614958565b6bffffffffffffffffffffffff1661271085611e7f9190614519565b611e89919061462c565b90507f8f7f893f27ebf075600a1d8910a1472953cee12c959de036d85454e556eb286b600654604051611ebc9190613dda565b60405180910390a1600080600073ffffffffffffffffffffffffffffffffffffffff166005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611fa657612710600560000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1684611f5a9190614519565b611f64919061462c565b90508084611f7291906145c9565b9350611fa36005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826121b6565b91505b611fd07f0000000000000000000000000000000000000000000000000000000000000000856121b6565b80611fd85750815b91506120096004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866121b6565b806120115750815b9150811561203e57868361202591906145c9565b600660008282546120369190614573565b925050819055505b7fd677f135315cde603d8fd2eb0a155980bf63fe7de2c4fd0c87107f6444aab7a18486836040516120719392919061465d565b60405180910390a150505050505050600160038190555050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631b54769e336040518263ffffffff1660e01b81526004016120e49190613c5d565b60006040518083038186803b1580156120fc57600080fd5b505afa158015612110573d6000803e3d6000fd5b50505050600060065414612150576040517f86947fcc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806006819055507f8f7f893f27ebf075600a1d8910a1472953cee12c959de036d85454e556eb286b816040516121869190613dda565b60405180910390a150565b600061219c836132e5565b80156121ae57506121ad8383613332565b5b905092915050565b6000808373ffffffffffffffffffffffffffffffffffffffff168360045a6121de919061462c565b906040516121eb906149bd565b600060405180830381858888f193505050503d8060008114612229576040519150601f19603f3d011682016040523d82523d6000602084013e61222e565b606091505b505090508091505092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c60405160405180910390a35050565b81600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156124a0576040517fa8cefabd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3085856040518463ffffffff1660e01b81526004016124dd939291906149d2565b600060405180830381600087803b1580156124f757600080fd5b505af115801561250b573d6000803e3d6000fd5b505050508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fcd68d836931d28b26c81fd06a68b603542d9b3a2fd1ba1c1bd30c9e2e5f4e6eb8460405161256c9190613dda565b60405180910390a350505050565b600080612586836133f1565b905060006125f08580610140019061259e919061428d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508361342190919063ffffffff16565b90506125fa610cc7565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806126655750612636610971565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156126735760009250612678565b600192505b505092915050565b600060048383905010156126c0576040517f7cc5a27c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82826000906004926126d493929190614a13565b906126df9190614a66565b905092915050565b600081146127805760003373ffffffffffffffffffffffffffffffffffffffff16827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90604051612737906149bd565b600060405180830381858888f193505050503d8060008114612775576040519150601f19603f3d011682016040523d82523d6000602084013e61277a565b606091505b50509050505b50565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556127db8161223c565b50565b81600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612846576040517fa8cefabd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61287183838673ffffffffffffffffffffffffffffffffffffffff166134489092919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fe8de91d538b06154a2c48315768c5046f47e127d7fd3f726fd85cc723f29b052846040516128ce9190613dda565b60405180910390a350505050565b84600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612944576040517fa8cefabd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8673ffffffffffffffffffffffffffffffffffffffff1663f242432a3088888888886040518763ffffffff1660e01b815260040161298796959493929190614b03565b600060405180830381600087803b1580156129a157600080fd5b505af11580156129b5573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f1c84289b4389ba8251b26974eaec89409eb21a1198ca5eb281c86388da2e778b87878787604051612a1c9493929190614b5f565b60405180910390a350505050505050565b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051612a54906149bd565b60006040518083038185875af1925050503d8060008114612a91576040519150601f19603f3d011682016040523d82523d6000602084013e612a96565b606091505b505090508091505092915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612b5657337f00000000000000000000000000000000000000000000000000000000000000006040517f459bd43e000000000000000000000000000000000000000000000000000000008152600401612b4d929190614bc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16826020016020810190612b819190614be9565b73ffffffffffffffffffffffffffffffffffffffff161415612bcf576040517f3d8e75ef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16826020016020810190612c199190614be9565b73ffffffffffffffffffffffffffffffffffffffff161415612c8457816020016020810190612c489190614be9565b6040517faf3d5b87000000000000000000000000000000000000000000000000000000008152600401612c7b9190614c16565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612d3f576004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040517f0ce83aa8000000000000000000000000000000000000000000000000000000008152600401612d369190614c16565b60405180910390fd5b612710826000016020810190612d55919061492b565b6bffffffffffffffffffffffff1610612db757816000016020810190612d7b919061492b565b6040517f27d66061000000000000000000000000000000000000000000000000000000008152600401612dae9190614c40565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16816020016020810190612de29190614be9565b73ffffffffffffffffffffffffffffffffffffffff1614613075577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16816020016020810190612e479190614be9565b73ffffffffffffffffffffffffffffffffffffffff161415612eb257806020016020810190612e769190614be9565b6040517f308fa9ec000000000000000000000000000000000000000000000000000000008152600401612ea99190614c16565b60405180910390fd5b816020016020810190612ec59190614be9565b73ffffffffffffffffffffffffffffffffffffffff16816020016020810190612eee9190614be9565b73ffffffffffffffffffffffffffffffffffffffff161415612f5957806020016020810190612f1d9190614be9565b6040517fd9013c13000000000000000000000000000000000000000000000000000000008152600401612f509190614c16565b60405180910390fd5b6000816000016020810190612f6e919061492b565b6bffffffffffffffffffffffff161415612fb4576040517f7063768800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612710816000016020810190612fca919061492b565b836000016020810190612fdd919061492b565b612fe79190614c5b565b6bffffffffffffffffffffffff16111561305e5781600001602081019061300e919061492b565b816000016020810190613021919061492b565b6040517fb1de779c000000000000000000000000000000000000000000000000000000008152600401613055929190614c9d565b60405180910390fd5b806005818161306d9190614e62565b9050506130ed565b600081600001602081019061308a919061492b565b6bffffffffffffffffffffffff16146130ec578060000160208101906130b0919061492b565b6040517fc67d2aa70000000000000000000000000000000000000000000000000000000081526004016130e39190614c40565b60405180910390fd5b5b81600481816130fc9190614e62565b9050508060200160208101906131129190614be9565b73ffffffffffffffffffffffffffffffffffffffff1682602001602081019061313b9190614be9565b73ffffffffffffffffffffffffffffffffffffffff167f5f934cf4d51f6dfdde4b6af48b5f60e42020522a88e381b1bee7e52a30c70826846000016020810190613185919061492b565b846000016020810190613198919061492b565b6040516131a6929190614c9d565b60405180910390a360006131cd8360200160208101906131c69190614be9565b60006121b6565b905080613223578260200160208101906131e79190614be9565b6040517f38c42f9a00000000000000000000000000000000000000000000000000000000815260040161321a9190614c16565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1682602001602081019061324e9190614be9565b73ffffffffffffffffffffffffffffffffffffffff16146132e05760006132888360200160208101906132819190614be9565b60006121b6565b9050806132de578260200160208101906132a29190614be9565b6040517fd8a749d50000000000000000000000000000000000000000000000000000000081526004016132d59190614c16565b60405180910390fd5b505b505050565b6000613311827f01ffc9a700000000000000000000000000000000000000000000000000000000613332565b801561332b57506133298263ffffffff60e01b613332565b155b9050919050565b6000806301ffc9a760e01b8360405160240161334e9190613e04565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000806000602060008551602087018a617530fa92503d915060005190508280156133d9575060208210155b80156133e55750600081115b94505050505092915050565b6000816040516020016134049190614ee8565b604051602081830303815290604052805190602001209050919050565b600080600061343085856134ce565b9150915061343d81613551565b819250505092915050565b6134c98363a9059cbb60e01b8484604051602401613467929190614f0e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613726565b505050565b6000806041835114156135105760008060006020860151925060408601519150606086015160001a9050613504878285856137ed565b9450945050505061354a565b6040835114156135415760008060208501519150604085015190506135368683836138fa565b93509350505061354a565b60006002915091505b9250929050565b6000600481111561356557613564614f37565b5b81600481111561357857613577614f37565b5b141561358357613723565b6001600481111561359757613596614f37565b5b8160048111156135aa576135a9614f37565b5b14156135eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135e290614fb2565b60405180910390fd5b600260048111156135ff576135fe614f37565b5b81600481111561361257613611614f37565b5b1415613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161364a9061501e565b60405180910390fd5b6003600481111561366757613666614f37565b5b81600481111561367a57613679614f37565b5b14156136bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136b2906150b0565b60405180910390fd5b6004808111156136ce576136cd614f37565b5b8160048111156136e1576136e0614f37565b5b1415613722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161371990615142565b60405180910390fd5b5b50565b6000613788826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166139489092919063ffffffff16565b90506000815111156137e857808060200190518101906137a8919061518e565b6137e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137de9061522d565b60405180910390fd5b5b505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156138285760006003915091506138f1565b601b8560ff16141580156138405750601c8560ff1614155b156138525760006004915091506138f1565b6000600187878787604051600081526020016040526040516138779493929190615278565b6020604051602081039080840390855afa158015613899573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156138e8576000600192509250506138f1565b80600092509250505b94509492505050565b6000806000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85169150601b8560ff1c01905061393a878288856137ed565b935093505050935093915050565b60606139578484600085613960565b90509392505050565b6060824710156139a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161399c9061532f565b60405180910390fd5b6139ae85613a74565b6139ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139e49061539b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613a16919061542a565b60006040518083038185875af1925050503d8060008114613a53576040519150601f19603f3d011682016040523d82523d6000602084013e613a58565b606091505b5091509150613a68828286613a97565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315613aa757829050613af7565b600083511115613aba5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613aee9190615485565b60405180910390fd5b9392505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613b3d81613b08565b8114613b4857600080fd5b50565b600081359050613b5a81613b34565b92915050565b600060208284031215613b7657613b75613afe565b5b6000613b8484828501613b4b565b91505092915050565b60008115159050919050565b613ba281613b8d565b82525050565b6000602082019050613bbd6000830184613b99565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613bee82613bc3565b9050919050565b613bfe81613be3565b8114613c0957600080fd5b50565b600081359050613c1b81613bf5565b92915050565b600060208284031215613c3757613c36613afe565b5b6000613c4584828501613c0c565b91505092915050565b613c5781613be3565b82525050565b6000602082019050613c726000830184613c4e565b92915050565b6000819050919050565b613c8b81613c78565b8114613c9657600080fd5b50565b600081359050613ca881613c82565b92915050565b600080600060608486031215613cc757613cc6613afe565b5b6000613cd586828701613c0c565b9350506020613ce686828701613c0c565b9250506040613cf786828701613c99565b9150509250925092565b600080fd5b60006101608284031215613d1d57613d1c613d01565b5b81905092915050565b6000819050919050565b613d3981613d26565b8114613d4457600080fd5b50565b600081359050613d5681613d30565b92915050565b600080600060608486031215613d7557613d74613afe565b5b600084013567ffffffffffffffff811115613d9357613d92613b03565b5b613d9f86828701613d06565b9350506020613db086828701613d47565b9250506040613dc186828701613c99565b9150509250925092565b613dd481613c78565b82525050565b6000602082019050613def6000830184613dcb565b92915050565b613dfe81613b08565b82525050565b6000602082019050613e196000830184613df5565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112613e4457613e43613e1f565b5b8235905067ffffffffffffffff811115613e6157613e60613e24565b5b602083019150836001820283011115613e7d57613e7c613e29565b5b9250929050565b60008060008060008060a08789031215613ea157613ea0613afe565b5b6000613eaf89828a01613c0c565b9650506020613ec089828a01613c0c565b9550506040613ed189828a01613c99565b9450506060613ee289828a01613c99565b935050608087013567ffffffffffffffff811115613f0357613f02613b03565b5b613f0f89828a01613e2e565b92509250509295509295509295565b60008083601f840112613f3457613f33613e1f565b5b8235905067ffffffffffffffff811115613f5157613f50613e24565b5b602083019150836020820283011115613f6d57613f6c613e29565b5b9250929050565b600080600060408486031215613f8d57613f8c613afe565b5b600084013567ffffffffffffffff811115613fab57613faa613b03565b5b613fb786828701613f1e565b93509350506020613fca86828701613c99565b9150509250925092565b6000613fdf82613bc3565b9050919050565b613fef81613fd4565b8114613ffa57600080fd5b50565b60008135905061400c81613fe6565b92915050565b6000806000806060858703121561402c5761402b613afe565b5b600061403a87828801613ffd565b945050602085013567ffffffffffffffff81111561405b5761405a613b03565b5b61406787828801613f1e565b9350935050604061407a87828801613c99565b91505092959194509250565b600063ffffffff82169050919050565b61409f81614086565b81146140aa57600080fd5b50565b6000813590506140bc81614096565b92915050565b6000602082840312156140d8576140d7613afe565b5b60006140e6848285016140ad565b91505092915050565b60008083601f84011261410557614104613e1f565b5b8235905067ffffffffffffffff81111561412257614121613e24565b5b60208301915083602082028301111561413e5761413d613e29565b5b9250929050565b6000806020838503121561415c5761415b613afe565b5b600083013567ffffffffffffffff81111561417a57614179613b03565b5b614186858286016140ef565b92509250509250929050565b6000604082840312156141a8576141a7613d01565b5b81905092915050565b600080608083850312156141c8576141c7613afe565b5b60006141d685828601614192565b92505060406141e785828601614192565b9150509250929050565b60006020828403121561420757614206613afe565b5b600061421584828501613c99565b91505092915050565b60006040820190506142336000830185613c4e565b6142406020830184613c4e565b9392505050565b600060608201905061425c6000830186613c4e565b6142696020830185613c4e565b6142766040830184613c4e565b949350505050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126142aa576142a961427e565b5b80840192508235915067ffffffffffffffff8211156142cc576142cb614283565b5b6020830192506001820236038313156142e8576142e7614288565b5b509250929050565b6000815190506142ff81613bf5565b92915050565b60006020828403121561431b5761431a613afe565b5b6000614329848285016142f0565b91505092915050565b60008151905061434181613c82565b92915050565b60006020828403121561435d5761435c613afe565b5b600061436b84828501614332565b91505092915050565b61437d81613fd4565b82525050565b60006040820190506143986000830185614374565b6143a56020830184613dcb565b9392505050565b600082825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006143f3601f836143ac565b91506143fe826143bd565b602082019050919050565b60006020820190508181036000830152614422816143e6565b9050919050565b600082825260208201905092915050565b600080fd5b82818337600083830152505050565b600061445a8385614429565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561448d5761448c61443a565b5b60208302925061449e83858461443f565b82840190509392505050565b600060608201905081810360008301526144c581868861444e565b90506144d46020830185613c4e565b6144e16040830184613dcb565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061452482613c78565b915061452f83613c78565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614568576145676144ea565b5b828202905092915050565b600061457e82613c78565b915061458983613c78565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156145be576145bd6144ea565b5b828201905092915050565b60006145d482613c78565b91506145df83613c78565b9250828210156145f2576145f16144ea565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061463782613c78565b915061464283613c78565b925082614652576146516145fd565b5b828204905092915050565b60006060820190506146726000830186613dcb565b61467f6020830185613dcb565b61468c6040830184613dcb565b949350505050565b600060408201905081810360008301526146af81858761444e565b90506146be6020830184613dcb565b949350505050565b6000819050919050565b60006146eb6146e66146e184613bc3565b6146c6565b613bc3565b9050919050565b60006146fd826146d0565b9050919050565b600061470f826146f2565b9050919050565b61471f81614704565b82525050565b600060408201905061473a6000830185614716565b6147476020830184613dcb565b9392505050565b600082825260208201905092915050565b6000819050919050565b600082825260208201905092915050565b6000601f19601f8301169050919050565b60006147978385614769565b93506147a483858461443f565b6147ad8361477a565b840190509392505050565b60006147c584848461478b565b90509392505050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126147fa576147f96147d8565b5b83810192508235915060208301925067ffffffffffffffff821115614822576148216147ce565b5b600182023603841315614838576148376147d3565b5b509250929050565b6000602082019050919050565b6000614859838561474e565b93508360208402850161486b8461475f565b8060005b878110156148b157848403895261488682846147dd565b6148918682846147b8565b955061489c84614840565b935060208b019a50505060018101905061486f565b50829750879450505050509392505050565b600060208201905081810360008301526148de81848661484d565b90509392505050565b60006bffffffffffffffffffffffff82169050919050565b614908816148e7565b811461491357600080fd5b50565b600081359050614925816148ff565b92915050565b60006020828403121561494157614940613afe565b5b600061494f84828501614916565b91505092915050565b6000614963826148e7565b915061496e836148e7565b925082821015614981576149806144ea565b5b828203905092915050565b600081905092915050565b50565b60006149a760008361498c565b91506149b282614997565b600082019050919050565b60006149c88261499a565b9150819050919050565b60006060820190506149e76000830186613c4e565b6149f46020830185613c4e565b614a016040830184613dcb565b949350505050565b600080fd5b600080fd5b60008085851115614a2757614a26614a09565b5b83861115614a3857614a37614a0e565b5b6001850283019150848603905094509492505050565b600082905092915050565b600082821b905092915050565b6000614a728383614a4e565b82614a7d8135613b08565b92506004821015614abd57614ab87fffffffff0000000000000000000000000000000000000000000000000000000083600403600802614a59565b831692505b505092915050565b600082825260208201905092915050565b6000614ae28385614ac5565b9350614aef83858461443f565b614af88361477a565b840190509392505050565b600060a082019050614b186000830189613c4e565b614b256020830188613c4e565b614b326040830187613dcb565b614b3f6060830186613dcb565b8181036080830152614b52818486614ad6565b9050979650505050505050565b6000606082019050614b746000830187613dcb565b614b816020830186613dcb565b8181036040830152614b94818486614ad6565b905095945050505050565b6000614baa826146f2565b9050919050565b614bba81614b9f565b82525050565b6000604082019050614bd56000830185613c4e565b614be26020830184614bb1565b9392505050565b600060208284031215614bff57614bfe613afe565b5b6000614c0d84828501613ffd565b91505092915050565b6000602082019050614c2b6000830184614716565b92915050565b614c3a816148e7565b82525050565b6000602082019050614c556000830184614c31565b92915050565b6000614c66826148e7565b9150614c71836148e7565b9250826bffffffffffffffffffffffff03821115614c9257614c916144ea565b5b828201905092915050565b6000604082019050614cb26000830185614c31565b614cbf6020830184614c31565b9392505050565b60008135614cd3816148ff565b80915050919050565b60008160001b9050919050565b60006bffffffffffffffffffffffff614d0184614cdc565b9350801983169250808416831791505092915050565b6000614d32614d2d614d28846148e7565b6146c6565b6148e7565b9050919050565b6000819050919050565b614d4c82614d17565b614d5f614d5882614d39565b8354614ce9565b8255505050565b60008135614d7381613fe6565b80915050919050565b60008160601b9050919050565b60007fffffffffffffffffffffffffffffffffffffffff000000000000000000000000614db584614d7c565b9350801983169250808416831791505092915050565b6000614dd6826146d0565b9050919050565b6000614de882614dcb565b9050919050565b6000819050919050565b614e0282614ddd565b614e15614e0e82614def565b8354614d89565b8255505050565b600081016000830180614e2e81614cc6565b9050614e3a8184614d43565b505050600081016020830180614e4f81614d66565b9050614e5b8184614df9565b5050505050565b614e6c8282614e1c565b5050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000614eb1601c83614e70565b9150614ebc82614e7b565b601c82019050919050565b6000819050919050565b614ee2614edd82613d26565b614ec7565b82525050565b6000614ef382614ea4565b9150614eff8284614ed1565b60208201915081905092915050565b6000604082019050614f236000830185613c4e565b614f306020830184613dcb565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000614f9c6018836143ac565b9150614fa782614f66565b602082019050919050565b60006020820190508181036000830152614fcb81614f8f565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000615008601f836143ac565b915061501382614fd2565b602082019050919050565b6000602082019050818103600083015261503781614ffb565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061509a6022836143ac565b91506150a58261503e565b604082019050919050565b600060208201905081810360008301526150c98161508d565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061512c6022836143ac565b9150615137826150d0565b604082019050919050565b6000602082019050818103600083015261515b8161511f565b9050919050565b61516b81613b8d565b811461517657600080fd5b50565b60008151905061518881615162565b92915050565b6000602082840312156151a4576151a3613afe565b5b60006151b284828501615179565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000615217602a836143ac565b9150615222826151bb565b604082019050919050565b600060208201905081810360008301526152468161520a565b9050919050565b61525681613d26565b82525050565b600060ff82169050919050565b6152728161525c565b82525050565b600060808201905061528d600083018761524d565b61529a6020830186615269565b6152a7604083018561524d565b6152b4606083018461524d565b95945050505050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006153196026836143ac565b9150615324826152bd565b604082019050919050565b600060208201905081810360008301526153488161530c565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000615385601d836143ac565b91506153908261534f565b602082019050919050565b600060208201905081810360008301526153b481615378565b9050919050565b600081519050919050565b60005b838110156153e45780820151818401526020810190506153c9565b838111156153f3576000848401525b50505050565b6000615404826153bb565b61540e818561498c565b935061541e8185602086016153c6565b80840191505092915050565b600061543682846153f9565b915081905092915050565b600081519050919050565b600061545782615441565b61546181856143ac565b93506154718185602086016153c6565b61547a8161477a565b840191505092915050565b6000602082019050818103600083015261549f818461544c565b90509291505056fea2646970667358221220b327dab1d29a343a818ba3bdb768e753ed8f13f56af54b9fc65ae59c949c566b64736f6c634300080a00330000000000000000000000004e67dff29304075a383d877f0ba760b94fe3880300000000000000000000000086a9f3e908b4658a1327952eb1ec297a4212e1bb0000000000000000000000006bb8b45a1c6ea816b70d76f83f7dc4f0f87365ff
Deployed Bytecode
0x6080604052600436106101dc5760003560e01c80639db5dbe411610102578063ddc9d30711610095578063f7fa846911610064578063f7fa8469146106d3578063f818e093146106fc578063fad34b3714610725578063ffa61ae21461073c5761026f565b8063ddc9d3071461062d578063e30c397814610656578063f2fde38b14610681578063f63720a4146106aa5761026f565b8063d598d4c9116100d1578063d598d4c914610585578063dbecc616146105b0578063dcc7b851146105d9578063dd83edc3146106045761026f565b80639db5dbe4146104ef578063ac407bbc14610518578063b83802f514610543578063c45a01551461055a5761026f565b8063570ca7351161017a5780637dc0d1d0116101495780637dc0d1d0146104575780638da5cb5b146104825780638eb9b324146104ad5780639261eda6146104c45761026f565b8063570ca735146103bf5780635d2e0470146103ea57806368447c931461041557806379ba5097146104405761026f565b80631aca6376116101b65780631aca6376146103055780631b54769e1461032e5780633a871cdd14610357578063470cc5f2146103945761026f565b806301ffc9a71461027457806306394c9b146102b1578063109e94cf146102da5761026f565b3661026f57600073ffffffffffffffffffffffffffffffffffffffff166004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561026d576040517f27438ff100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b34801561028057600080fd5b5061029b60048036038101906102969190613b60565b610765565b6040516102a89190613ba8565b60405180910390f35b3480156102bd57600080fd5b506102d860048036038101906102d39190613c21565b6107df565b005b3480156102e657600080fd5b506102ef610971565b6040516102fc9190613c5d565b60405180910390f35b34801561031157600080fd5b5061032c60048036038101906103279190613cae565b61099e565b005b34801561033a57600080fd5b5061035560048036038101906103509190613c21565b610a3a565b005b34801561036357600080fd5b5061037e60048036038101906103799190613d5c565b610b57565b60405161038b9190613dda565b60405180910390f35b3480156103a057600080fd5b506103a9610c94565b6040516103b69190613dda565b60405180910390f35b3480156103cb57600080fd5b506103d4610cc7565b6040516103e19190613c5d565b60405180910390f35b3480156103f657600080fd5b506103ff610cd6565b60405161040c9190613e04565b60405180910390f35b34801561042157600080fd5b5061042a610ce5565b6040516104379190613c5d565b60405180910390f35b34801561044c57600080fd5b50610455610d12565b005b34801561046357600080fd5b5061046c610d96565b6040516104799190613c5d565b60405180910390f35b34801561048e57600080fd5b50610497610dbe565b6040516104a49190613c5d565b60405180910390f35b3480156104b957600080fd5b506104c2610e54565b005b3480156104d057600080fd5b506104d9611050565b6040516104e69190613dda565b60405180910390f35b3480156104fb57600080fd5b5061051660048036038101906105119190613cae565b611083565b005b34801561052457600080fd5b5061052d61111f565b60405161053a9190613dda565b60405180910390f35b34801561054f57600080fd5b50610558611129565b005b34801561056657600080fd5b5061056f6111c1565b60405161057c9190613c5d565b60405180910390f35b34801561059157600080fd5b5061059a6111e9565b6040516105a79190613c5d565b60405180910390f35b3480156105bc57600080fd5b506105d760048036038101906105d29190613e84565b611211565b005b3480156105e557600080fd5b506105ee6112b3565b6040516105fb9190613c5d565b60405180910390f35b34801561061057600080fd5b5061062b60048036038101906106269190613f74565b6112e0565b005b34801561063957600080fd5b50610654600480360381019061064f9190614012565b6117ba565b005b34801561066257600080fd5b5061066b6119d9565b6040516106789190613c5d565b60405180910390f35b34801561068d57600080fd5b506106a860048036038101906106a39190613c21565b611a03565b005b3480156106b657600080fd5b506106d160048036038101906106cc91906140c2565b611ba0565b005b3480156106df57600080fd5b506106fa60048036038101906106f59190614145565b611ba3565b005b34801561070857600080fd5b50610723600480360381019061071e91906141b1565b611c7d565b005b34801561073157600080fd5b5061073a611ce6565b005b34801561074857600080fd5b50610763600480360381019061075e91906141f1565b61208b565b005b60007f9967e99b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107d857506107d782612300565b5b9050919050565b60006107e961236a565b905060006107f5610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108695781816040517f078c725900000000000000000000000000000000000000000000000000000000815260040161086092919061421e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108d0576040517f6cca850000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561096357826040517fb16f970500000000000000000000000000000000000000000000000000000000815260040161095a9190613c5d565b60405180910390fd5b61096c83612372565b505050565b60006004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006109a861236a565b905060006109b4610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a285781816040517f078c7259000000000000000000000000000000000000000000000000000000008152600401610a1f92919061421e565b60405180910390fd5b610a33858585612438565b5050505050565b6000610a44610dbe565b90506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610b0c57508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610b0b57508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b5b15610b52578281836040517ff8864219000000000000000000000000000000000000000000000000000000008152600401610b4993929190614247565b60405180910390fd5b505050565b6000735ff137d4b0fdcd49dca30c7cf57e578a026d278973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bdd57336040517f56bd3832000000000000000000000000000000000000000000000000000000008152600401610bd49190613c5d565b60405180910390fd5b610be7848461257a565b90506000610c03858060600190610bfe919061428d565b612680565b9050610c0d610cd6565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610c83576040517f28b01fc200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c8c836126e7565b509392505050565b6000600560000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b6000610cd1612783565b905090565b600063dd83edc360e01b905090565b60006005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610d1c61236a565b90508073ffffffffffffffffffffffffffffffffffffffff16610d3d6119d9565b73ffffffffffffffffffffffffffffffffffffffff1614610d8a576040517f4b5dfa7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d93816127ad565b50565b60007f0000000000000000000000004e67dff29304075a383d877f0ba760b94fe38803905090565b60007f00000000000000000000000086a9f3e908b4658a1327952eb1ec297a4212e1bb73ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4f9190614305565b905090565b610e5c610dbe565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610ec75750610e98610cc7565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80610f045750610ed5610971565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610f3a576040517f9218ea7200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000735ff137d4b0fdcd49dca30c7cf57e578a026d278973ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610f899190613c5d565b602060405180830381865afa158015610fa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fca9190614347565b9050735ff137d4b0fdcd49dca30c7cf57e578a026d278973ffffffffffffffffffffffffffffffffffffffff1663205c287830836040518363ffffffff1660e01b815260040161101b929190614383565b600060405180830381600087803b15801561103557600080fd5b505af1158015611049573d6000803e3d6000fd5b5050505050565b6000600460000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b600061108d61236a565b90506000611099610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461110d5781816040517f078c725900000000000000000000000000000000000000000000000000000000815260040161110492919061421e565b60405180910390fd5b6111188585856127de565b5050505050565b6000600654905090565b600061113361236a565b9050600061113f610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111b35781816040517f078c72590000000000000000000000000000000000000000000000000000000081526004016111aa92919061421e565b60405180910390fd5b6111bd6000612372565b5050565b60007f00000000000000000000000086a9f3e908b4658a1327952eb1ec297a4212e1bb905090565b60007f0000000000000000000000006bb8b45a1c6ea816b70d76f83f7dc4f0f87365ff905090565b600061121b61236a565b90506000611227610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461129b5781816040517f078c725900000000000000000000000000000000000000000000000000000000815260040161129292919061421e565b60405180910390fd5b6112a98888888888886128dc565b5050505050505050565b60006004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60026003541415611326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131d90614409565b60405180910390fd5b6002600381905550600073ffffffffffffffffffffffffffffffffffffffff166004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156113ba576040517f27438ff100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600047905060008114156113fa576040517f851c981300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000004e67dff29304075a383d877f0ba760b94fe3880373ffffffffffffffffffffffffffffffffffffffff166304b38ce0858530866040518563ffffffff1660e01b815260040161145994939291906144aa565b60006040518083038186803b15801561147157600080fd5b505afa158015611485573d6000803e3d6000fd5b505050506000633b9aca008361149b9190614519565b90506006548110156114d9576040517f6367839400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060065482846114ea9190614573565b6114f491906145c9565b90506000600460000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600061271082846115379190614519565b611541919061462c565b8361154c91906145c9565b9050600060028661155d919061462c565b90506000818311156115a757819050818761157891906145c9565b92508361271061158891906145c9565b612710836115969190614519565b6115a0919061462c565b94506115b6565b82876115b391906145c9565b90505b7f8f7f893f27ebf075600a1d8910a1472953cee12c959de036d85454e556eb286b6006546040516115e79190613dda565b60405180910390a1600080600073ffffffffffffffffffffffffffffffffffffffff166005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d157612710600560000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16886116859190614519565b61168f919061462c565b9050808561169d91906145c9565b94506116ce6005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826121b6565b91505b6116fb7f0000000000000000000000006bb8b45a1c6ea816b70d76f83f7dc4f0f87365ff866121b6565b806117035750815b91506117346004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846121b6565b8061173c5750815b9150811561176957888761175091906145c9565b600660008282546117619190614573565b925050819055505b7fd677f135315cde603d8fd2eb0a155980bf63fe7de2c4fd0c87107f6444aab7a185848360405161179c9392919061465d565b60405180910390a15050505050505050506001600381905550505050565b60006117c461236a565b905060006117d0610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146118445781816040517f078c725900000000000000000000000000000000000000000000000000000000815260040161183b92919061421e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156118ab576040517f5c2a09ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff1663dd83edc38686866040518463ffffffff1660e01b81526004016118e893929190614694565b600060405180830381600087803b15801561190257600080fd5b505af1158015611916573d6000803e3d6000fd5b50505050600047905060008111156119d05760006119348883612a2d565b9050801561198f578773ffffffffffffffffffffffffffffffffffffffff167f40f5306aff6a89943d2c2cdc9e8f4ce64717bf780c07d562f96eecbec8f36527836040516119829190613dda565b60405180910390a26119ce565b87826040517f1bad55a10000000000000000000000000000000000000000000000000000000081526004016119c5929190614725565b60405180910390fd5b505b50505050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611a0d61236a565b90506000611a19610dbe565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a8d5781816040517f078c7259000000000000000000000000000000000000000000000000000000008152600401611a8492919061421e565b60405180910390fd5b6000611a97610dbe565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611aff576040517f4310d9f200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350505050565b50565b60006004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611c3f5733816040517fa96b080e000000000000000000000000000000000000000000000000000000008152600401611c3692919061421e565b60405180910390fd5b7f7f88469032e5ef826f39b217188d7fb9466a77bab8f9736d77f8b509560ec8358383604051611c709291906148c3565b60405180910390a1505050565b611388826000016020810190611c93919061492b565b6bffffffffffffffffffffffff1611611cd8576040517fdb095d9c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ce28282612aa4565b5050565b60006004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611d825733816040517fa96b080e000000000000000000000000000000000000000000000000000000008152600401611d7992919061421e565b60405180910390fd5b60026003541415611dc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dbf90614409565b60405180910390fd5b600260038190555060004790506000811415611e10576040517f851c981300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600282611e1f919061462c565b9050600081905060008284611e3491906145c9565b90506000600460000160009054906101000a90046bffffffffffffffffffffffff16612710611e639190614958565b6bffffffffffffffffffffffff1661271085611e7f9190614519565b611e89919061462c565b90507f8f7f893f27ebf075600a1d8910a1472953cee12c959de036d85454e556eb286b600654604051611ebc9190613dda565b60405180910390a1600080600073ffffffffffffffffffffffffffffffffffffffff166005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611fa657612710600560000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1684611f5a9190614519565b611f64919061462c565b90508084611f7291906145c9565b9350611fa36005600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826121b6565b91505b611fd07f0000000000000000000000006bb8b45a1c6ea816b70d76f83f7dc4f0f87365ff856121b6565b80611fd85750815b91506120096004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866121b6565b806120115750815b9150811561203e57868361202591906145c9565b600660008282546120369190614573565b925050819055505b7fd677f135315cde603d8fd2eb0a155980bf63fe7de2c4fd0c87107f6444aab7a18486836040516120719392919061465d565b60405180910390a150505050505050600160038190555050565b7f00000000000000000000000086a9f3e908b4658a1327952eb1ec297a4212e1bb73ffffffffffffffffffffffffffffffffffffffff16631b54769e336040518263ffffffff1660e01b81526004016120e49190613c5d565b60006040518083038186803b1580156120fc57600080fd5b505afa158015612110573d6000803e3d6000fd5b50505050600060065414612150576040517f86947fcc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806006819055507f8f7f893f27ebf075600a1d8910a1472953cee12c959de036d85454e556eb286b816040516121869190613dda565b60405180910390a150565b600061219c836132e5565b80156121ae57506121ad8383613332565b5b905092915050565b6000808373ffffffffffffffffffffffffffffffffffffffff168360045a6121de919061462c565b906040516121eb906149bd565b600060405180830381858888f193505050503d8060008114612229576040519150601f19603f3d011682016040523d82523d6000602084013e61222e565b606091505b505090508091505092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c60405160405180910390a35050565b81600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156124a0576040517fa8cefabd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3085856040518463ffffffff1660e01b81526004016124dd939291906149d2565b600060405180830381600087803b1580156124f757600080fd5b505af115801561250b573d6000803e3d6000fd5b505050508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fcd68d836931d28b26c81fd06a68b603542d9b3a2fd1ba1c1bd30c9e2e5f4e6eb8460405161256c9190613dda565b60405180910390a350505050565b600080612586836133f1565b905060006125f08580610140019061259e919061428d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508361342190919063ffffffff16565b90506125fa610cc7565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806126655750612636610971565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156126735760009250612678565b600192505b505092915050565b600060048383905010156126c0576040517f7cc5a27c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82826000906004926126d493929190614a13565b906126df9190614a66565b905092915050565b600081146127805760003373ffffffffffffffffffffffffffffffffffffffff16827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90604051612737906149bd565b600060405180830381858888f193505050503d8060008114612775576040519150601f19603f3d011682016040523d82523d6000602084013e61277a565b606091505b50509050505b50565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556127db8161223c565b50565b81600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612846576040517fa8cefabd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61287183838673ffffffffffffffffffffffffffffffffffffffff166134489092919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fe8de91d538b06154a2c48315768c5046f47e127d7fd3f726fd85cc723f29b052846040516128ce9190613dda565b60405180910390a350505050565b84600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612944576040517fa8cefabd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8673ffffffffffffffffffffffffffffffffffffffff1663f242432a3088888888886040518763ffffffff1660e01b815260040161298796959493929190614b03565b600060405180830381600087803b1580156129a157600080fd5b505af11580156129b5573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f1c84289b4389ba8251b26974eaec89409eb21a1198ca5eb281c86388da2e778b87878787604051612a1c9493929190614b5f565b60405180910390a350505050505050565b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051612a54906149bd565b60006040518083038185875af1925050503d8060008114612a91576040519150601f19603f3d011682016040523d82523d6000602084013e612a96565b606091505b505090508091505092915050565b7f00000000000000000000000086a9f3e908b4658a1327952eb1ec297a4212e1bb73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612b5657337f00000000000000000000000086a9f3e908b4658a1327952eb1ec297a4212e1bb6040517f459bd43e000000000000000000000000000000000000000000000000000000008152600401612b4d929190614bc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16826020016020810190612b819190614be9565b73ffffffffffffffffffffffffffffffffffffffff161415612bcf576040517f3d8e75ef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000006bb8b45a1c6ea816b70d76f83f7dc4f0f87365ff73ffffffffffffffffffffffffffffffffffffffff16826020016020810190612c199190614be9565b73ffffffffffffffffffffffffffffffffffffffff161415612c8457816020016020810190612c489190614be9565b6040517faf3d5b87000000000000000000000000000000000000000000000000000000008152600401612c7b9190614c16565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612d3f576004600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040517f0ce83aa8000000000000000000000000000000000000000000000000000000008152600401612d369190614c16565b60405180910390fd5b612710826000016020810190612d55919061492b565b6bffffffffffffffffffffffff1610612db757816000016020810190612d7b919061492b565b6040517f27d66061000000000000000000000000000000000000000000000000000000008152600401612dae9190614c40565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16816020016020810190612de29190614be9565b73ffffffffffffffffffffffffffffffffffffffff1614613075577f0000000000000000000000006bb8b45a1c6ea816b70d76f83f7dc4f0f87365ff73ffffffffffffffffffffffffffffffffffffffff16816020016020810190612e479190614be9565b73ffffffffffffffffffffffffffffffffffffffff161415612eb257806020016020810190612e769190614be9565b6040517f308fa9ec000000000000000000000000000000000000000000000000000000008152600401612ea99190614c16565b60405180910390fd5b816020016020810190612ec59190614be9565b73ffffffffffffffffffffffffffffffffffffffff16816020016020810190612eee9190614be9565b73ffffffffffffffffffffffffffffffffffffffff161415612f5957806020016020810190612f1d9190614be9565b6040517fd9013c13000000000000000000000000000000000000000000000000000000008152600401612f509190614c16565b60405180910390fd5b6000816000016020810190612f6e919061492b565b6bffffffffffffffffffffffff161415612fb4576040517f7063768800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612710816000016020810190612fca919061492b565b836000016020810190612fdd919061492b565b612fe79190614c5b565b6bffffffffffffffffffffffff16111561305e5781600001602081019061300e919061492b565b816000016020810190613021919061492b565b6040517fb1de779c000000000000000000000000000000000000000000000000000000008152600401613055929190614c9d565b60405180910390fd5b806005818161306d9190614e62565b9050506130ed565b600081600001602081019061308a919061492b565b6bffffffffffffffffffffffff16146130ec578060000160208101906130b0919061492b565b6040517fc67d2aa70000000000000000000000000000000000000000000000000000000081526004016130e39190614c40565b60405180910390fd5b5b81600481816130fc9190614e62565b9050508060200160208101906131129190614be9565b73ffffffffffffffffffffffffffffffffffffffff1682602001602081019061313b9190614be9565b73ffffffffffffffffffffffffffffffffffffffff167f5f934cf4d51f6dfdde4b6af48b5f60e42020522a88e381b1bee7e52a30c70826846000016020810190613185919061492b565b846000016020810190613198919061492b565b6040516131a6929190614c9d565b60405180910390a360006131cd8360200160208101906131c69190614be9565b60006121b6565b905080613223578260200160208101906131e79190614be9565b6040517f38c42f9a00000000000000000000000000000000000000000000000000000000815260040161321a9190614c16565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1682602001602081019061324e9190614be9565b73ffffffffffffffffffffffffffffffffffffffff16146132e05760006132888360200160208101906132819190614be9565b60006121b6565b9050806132de578260200160208101906132a29190614be9565b6040517fd8a749d50000000000000000000000000000000000000000000000000000000081526004016132d59190614c16565b60405180910390fd5b505b505050565b6000613311827f01ffc9a700000000000000000000000000000000000000000000000000000000613332565b801561332b57506133298263ffffffff60e01b613332565b155b9050919050565b6000806301ffc9a760e01b8360405160240161334e9190613e04565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000806000602060008551602087018a617530fa92503d915060005190508280156133d9575060208210155b80156133e55750600081115b94505050505092915050565b6000816040516020016134049190614ee8565b604051602081830303815290604052805190602001209050919050565b600080600061343085856134ce565b9150915061343d81613551565b819250505092915050565b6134c98363a9059cbb60e01b8484604051602401613467929190614f0e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613726565b505050565b6000806041835114156135105760008060006020860151925060408601519150606086015160001a9050613504878285856137ed565b9450945050505061354a565b6040835114156135415760008060208501519150604085015190506135368683836138fa565b93509350505061354a565b60006002915091505b9250929050565b6000600481111561356557613564614f37565b5b81600481111561357857613577614f37565b5b141561358357613723565b6001600481111561359757613596614f37565b5b8160048111156135aa576135a9614f37565b5b14156135eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135e290614fb2565b60405180910390fd5b600260048111156135ff576135fe614f37565b5b81600481111561361257613611614f37565b5b1415613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161364a9061501e565b60405180910390fd5b6003600481111561366757613666614f37565b5b81600481111561367a57613679614f37565b5b14156136bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136b2906150b0565b60405180910390fd5b6004808111156136ce576136cd614f37565b5b8160048111156136e1576136e0614f37565b5b1415613722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161371990615142565b60405180910390fd5b5b50565b6000613788826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166139489092919063ffffffff16565b90506000815111156137e857808060200190518101906137a8919061518e565b6137e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137de9061522d565b60405180910390fd5b5b505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156138285760006003915091506138f1565b601b8560ff16141580156138405750601c8560ff1614155b156138525760006004915091506138f1565b6000600187878787604051600081526020016040526040516138779493929190615278565b6020604051602081039080840390855afa158015613899573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156138e8576000600192509250506138f1565b80600092509250505b94509492505050565b6000806000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85169150601b8560ff1c01905061393a878288856137ed565b935093505050935093915050565b60606139578484600085613960565b90509392505050565b6060824710156139a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161399c9061532f565b60405180910390fd5b6139ae85613a74565b6139ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139e49061539b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613a16919061542a565b60006040518083038185875af1925050503d8060008114613a53576040519150601f19603f3d011682016040523d82523d6000602084013e613a58565b606091505b5091509150613a68828286613a97565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315613aa757829050613af7565b600083511115613aba5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613aee9190615485565b60405180910390fd5b9392505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613b3d81613b08565b8114613b4857600080fd5b50565b600081359050613b5a81613b34565b92915050565b600060208284031215613b7657613b75613afe565b5b6000613b8484828501613b4b565b91505092915050565b60008115159050919050565b613ba281613b8d565b82525050565b6000602082019050613bbd6000830184613b99565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613bee82613bc3565b9050919050565b613bfe81613be3565b8114613c0957600080fd5b50565b600081359050613c1b81613bf5565b92915050565b600060208284031215613c3757613c36613afe565b5b6000613c4584828501613c0c565b91505092915050565b613c5781613be3565b82525050565b6000602082019050613c726000830184613c4e565b92915050565b6000819050919050565b613c8b81613c78565b8114613c9657600080fd5b50565b600081359050613ca881613c82565b92915050565b600080600060608486031215613cc757613cc6613afe565b5b6000613cd586828701613c0c565b9350506020613ce686828701613c0c565b9250506040613cf786828701613c99565b9150509250925092565b600080fd5b60006101608284031215613d1d57613d1c613d01565b5b81905092915050565b6000819050919050565b613d3981613d26565b8114613d4457600080fd5b50565b600081359050613d5681613d30565b92915050565b600080600060608486031215613d7557613d74613afe565b5b600084013567ffffffffffffffff811115613d9357613d92613b03565b5b613d9f86828701613d06565b9350506020613db086828701613d47565b9250506040613dc186828701613c99565b9150509250925092565b613dd481613c78565b82525050565b6000602082019050613def6000830184613dcb565b92915050565b613dfe81613b08565b82525050565b6000602082019050613e196000830184613df5565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112613e4457613e43613e1f565b5b8235905067ffffffffffffffff811115613e6157613e60613e24565b5b602083019150836001820283011115613e7d57613e7c613e29565b5b9250929050565b60008060008060008060a08789031215613ea157613ea0613afe565b5b6000613eaf89828a01613c0c565b9650506020613ec089828a01613c0c565b9550506040613ed189828a01613c99565b9450506060613ee289828a01613c99565b935050608087013567ffffffffffffffff811115613f0357613f02613b03565b5b613f0f89828a01613e2e565b92509250509295509295509295565b60008083601f840112613f3457613f33613e1f565b5b8235905067ffffffffffffffff811115613f5157613f50613e24565b5b602083019150836020820283011115613f6d57613f6c613e29565b5b9250929050565b600080600060408486031215613f8d57613f8c613afe565b5b600084013567ffffffffffffffff811115613fab57613faa613b03565b5b613fb786828701613f1e565b93509350506020613fca86828701613c99565b9150509250925092565b6000613fdf82613bc3565b9050919050565b613fef81613fd4565b8114613ffa57600080fd5b50565b60008135905061400c81613fe6565b92915050565b6000806000806060858703121561402c5761402b613afe565b5b600061403a87828801613ffd565b945050602085013567ffffffffffffffff81111561405b5761405a613b03565b5b61406787828801613f1e565b9350935050604061407a87828801613c99565b91505092959194509250565b600063ffffffff82169050919050565b61409f81614086565b81146140aa57600080fd5b50565b6000813590506140bc81614096565b92915050565b6000602082840312156140d8576140d7613afe565b5b60006140e6848285016140ad565b91505092915050565b60008083601f84011261410557614104613e1f565b5b8235905067ffffffffffffffff81111561412257614121613e24565b5b60208301915083602082028301111561413e5761413d613e29565b5b9250929050565b6000806020838503121561415c5761415b613afe565b5b600083013567ffffffffffffffff81111561417a57614179613b03565b5b614186858286016140ef565b92509250509250929050565b6000604082840312156141a8576141a7613d01565b5b81905092915050565b600080608083850312156141c8576141c7613afe565b5b60006141d685828601614192565b92505060406141e785828601614192565b9150509250929050565b60006020828403121561420757614206613afe565b5b600061421584828501613c99565b91505092915050565b60006040820190506142336000830185613c4e565b6142406020830184613c4e565b9392505050565b600060608201905061425c6000830186613c4e565b6142696020830185613c4e565b6142766040830184613c4e565b949350505050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126142aa576142a961427e565b5b80840192508235915067ffffffffffffffff8211156142cc576142cb614283565b5b6020830192506001820236038313156142e8576142e7614288565b5b509250929050565b6000815190506142ff81613bf5565b92915050565b60006020828403121561431b5761431a613afe565b5b6000614329848285016142f0565b91505092915050565b60008151905061434181613c82565b92915050565b60006020828403121561435d5761435c613afe565b5b600061436b84828501614332565b91505092915050565b61437d81613fd4565b82525050565b60006040820190506143986000830185614374565b6143a56020830184613dcb565b9392505050565b600082825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006143f3601f836143ac565b91506143fe826143bd565b602082019050919050565b60006020820190508181036000830152614422816143e6565b9050919050565b600082825260208201905092915050565b600080fd5b82818337600083830152505050565b600061445a8385614429565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561448d5761448c61443a565b5b60208302925061449e83858461443f565b82840190509392505050565b600060608201905081810360008301526144c581868861444e565b90506144d46020830185613c4e565b6144e16040830184613dcb565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061452482613c78565b915061452f83613c78565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614568576145676144ea565b5b828202905092915050565b600061457e82613c78565b915061458983613c78565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156145be576145bd6144ea565b5b828201905092915050565b60006145d482613c78565b91506145df83613c78565b9250828210156145f2576145f16144ea565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061463782613c78565b915061464283613c78565b925082614652576146516145fd565b5b828204905092915050565b60006060820190506146726000830186613dcb565b61467f6020830185613dcb565b61468c6040830184613dcb565b949350505050565b600060408201905081810360008301526146af81858761444e565b90506146be6020830184613dcb565b949350505050565b6000819050919050565b60006146eb6146e66146e184613bc3565b6146c6565b613bc3565b9050919050565b60006146fd826146d0565b9050919050565b600061470f826146f2565b9050919050565b61471f81614704565b82525050565b600060408201905061473a6000830185614716565b6147476020830184613dcb565b9392505050565b600082825260208201905092915050565b6000819050919050565b600082825260208201905092915050565b6000601f19601f8301169050919050565b60006147978385614769565b93506147a483858461443f565b6147ad8361477a565b840190509392505050565b60006147c584848461478b565b90509392505050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126147fa576147f96147d8565b5b83810192508235915060208301925067ffffffffffffffff821115614822576148216147ce565b5b600182023603841315614838576148376147d3565b5b509250929050565b6000602082019050919050565b6000614859838561474e565b93508360208402850161486b8461475f565b8060005b878110156148b157848403895261488682846147dd565b6148918682846147b8565b955061489c84614840565b935060208b019a50505060018101905061486f565b50829750879450505050509392505050565b600060208201905081810360008301526148de81848661484d565b90509392505050565b60006bffffffffffffffffffffffff82169050919050565b614908816148e7565b811461491357600080fd5b50565b600081359050614925816148ff565b92915050565b60006020828403121561494157614940613afe565b5b600061494f84828501614916565b91505092915050565b6000614963826148e7565b915061496e836148e7565b925082821015614981576149806144ea565b5b828203905092915050565b600081905092915050565b50565b60006149a760008361498c565b91506149b282614997565b600082019050919050565b60006149c88261499a565b9150819050919050565b60006060820190506149e76000830186613c4e565b6149f46020830185613c4e565b614a016040830184613dcb565b949350505050565b600080fd5b600080fd5b60008085851115614a2757614a26614a09565b5b83861115614a3857614a37614a0e565b5b6001850283019150848603905094509492505050565b600082905092915050565b600082821b905092915050565b6000614a728383614a4e565b82614a7d8135613b08565b92506004821015614abd57614ab87fffffffff0000000000000000000000000000000000000000000000000000000083600403600802614a59565b831692505b505092915050565b600082825260208201905092915050565b6000614ae28385614ac5565b9350614aef83858461443f565b614af88361477a565b840190509392505050565b600060a082019050614b186000830189613c4e565b614b256020830188613c4e565b614b326040830187613dcb565b614b3f6060830186613dcb565b8181036080830152614b52818486614ad6565b9050979650505050505050565b6000606082019050614b746000830187613dcb565b614b816020830186613dcb565b8181036040830152614b94818486614ad6565b905095945050505050565b6000614baa826146f2565b9050919050565b614bba81614b9f565b82525050565b6000604082019050614bd56000830185613c4e565b614be26020830184614bb1565b9392505050565b600060208284031215614bff57614bfe613afe565b5b6000614c0d84828501613ffd565b91505092915050565b6000602082019050614c2b6000830184614716565b92915050565b614c3a816148e7565b82525050565b6000602082019050614c556000830184614c31565b92915050565b6000614c66826148e7565b9150614c71836148e7565b9250826bffffffffffffffffffffffff03821115614c9257614c916144ea565b5b828201905092915050565b6000604082019050614cb26000830185614c31565b614cbf6020830184614c31565b9392505050565b60008135614cd3816148ff565b80915050919050565b60008160001b9050919050565b60006bffffffffffffffffffffffff614d0184614cdc565b9350801983169250808416831791505092915050565b6000614d32614d2d614d28846148e7565b6146c6565b6148e7565b9050919050565b6000819050919050565b614d4c82614d17565b614d5f614d5882614d39565b8354614ce9565b8255505050565b60008135614d7381613fe6565b80915050919050565b60008160601b9050919050565b60007fffffffffffffffffffffffffffffffffffffffff000000000000000000000000614db584614d7c565b9350801983169250808416831791505092915050565b6000614dd6826146d0565b9050919050565b6000614de882614dcb565b9050919050565b6000819050919050565b614e0282614ddd565b614e15614e0e82614def565b8354614d89565b8255505050565b600081016000830180614e2e81614cc6565b9050614e3a8184614d43565b505050600081016020830180614e4f81614d66565b9050614e5b8184614df9565b5050505050565b614e6c8282614e1c565b5050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000614eb1601c83614e70565b9150614ebc82614e7b565b601c82019050919050565b6000819050919050565b614ee2614edd82613d26565b614ec7565b82525050565b6000614ef382614ea4565b9150614eff8284614ed1565b60208201915081905092915050565b6000604082019050614f236000830185613c4e565b614f306020830184613dcb565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000614f9c6018836143ac565b9150614fa782614f66565b602082019050919050565b60006020820190508181036000830152614fcb81614f8f565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000615008601f836143ac565b915061501382614fd2565b602082019050919050565b6000602082019050818103600083015261503781614ffb565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061509a6022836143ac565b91506150a58261503e565b604082019050919050565b600060208201905081810360008301526150c98161508d565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061512c6022836143ac565b9150615137826150d0565b604082019050919050565b6000602082019050818103600083015261515b8161511f565b9050919050565b61516b81613b8d565b811461517657600080fd5b50565b60008151905061518881615162565b92915050565b6000602082840312156151a4576151a3613afe565b5b60006151b284828501615179565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000615217602a836143ac565b9150615222826151bb565b604082019050919050565b600060208201905081810360008301526152468161520a565b9050919050565b61525681613d26565b82525050565b600060ff82169050919050565b6152728161525c565b82525050565b600060808201905061528d600083018761524d565b61529a6020830186615269565b6152a7604083018561524d565b6152b4606083018461524d565b95945050505050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006153196026836143ac565b9150615324826152bd565b604082019050919050565b600060208201905081810360008301526153488161530c565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000615385601d836143ac565b91506153908261534f565b602082019050919050565b600060208201905081810360008301526153b481615378565b9050919050565b600081519050919050565b60005b838110156153e45780820151818401526020810190506153c9565b838111156153f3576000848401525b50505050565b6000615404826153bb565b61540e818561498c565b935061541e8185602086016153c6565b80840191505092915050565b600061543682846153f9565b915081905092915050565b600081519050919050565b600061545782615441565b61546181856143ac565b93506154718185602086016153c6565b61547a8161477a565b840191505092915050565b6000602082019050818103600083015261549f818461544c565b90509291505056fea2646970667358221220b327dab1d29a343a818ba3bdb768e753ed8f13f56af54b9fc65ae59c949c566b64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004e67dff29304075a383d877f0ba760b94fe3880300000000000000000000000086a9f3e908b4658a1327952eb1ec297a4212e1bb0000000000000000000000006bb8b45a1c6ea816b70d76f83f7dc4f0f87365ff
-----Decoded View---------------
Arg [0] : _oracle (address): 0x4E67DfF29304075A383D877F0BA760b94FE38803
Arg [1] : _factory (address): 0x86a9f3e908b4658A1327952Eb1eC297a4212E1bb
Arg [2] : _service (address): 0x6Bb8b45a1C6eA816B70d76f83f7dC4f0f87365Ff
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000004e67dff29304075a383d877f0ba760b94fe38803
Arg [1] : 00000000000000000000000086a9f3e908b4658a1327952eb1ec297a4212e1bb
Arg [2] : 0000000000000000000000006bb8b45a1c6ea816b70d76f83f7dc4f0f87365ff
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.