ETH Price: $3,423.08 (-1.30%)
Gas: 5 Gwei

Contract

0xAc78F1101883a68bABCfBacCCCaADc7D55e657bA
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Initialize185686082023-11-14 7:19:47231 days ago1699946387IN
0xAc78F110...D55e657bA
0 ETH0.0027696430.75540238

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To Value
183761182023-10-18 8:41:47258 days ago1697618507  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SmartAccountV2

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 27 : SmartAccountV2.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;

import "../../interfaces/IValidations.sol";
import "../base/SignatureManager.sol";
import "../base/ModuleManager.sol";
import "../base/OwnerManager.sol";
import "../base/FallbackManager.sol";
import "../base/GuardManager.sol";
import "../common/EtherPaymentFallback.sol";
import "../common/Singleton.sol";
import "../common/SignatureDecoder.sol";
import "../common/SecuredTokenTransfer.sol";

contract SmartAccountV2 is
    EtherPaymentFallback,
    Singleton,
    ModuleManager,
    OwnerManager,
    SignatureDecoder,
    SecuredTokenTransfer,
    FallbackManager,
    GuardManager,
    SignatureManager
{
    IValidations public immutable VALIDATIONS;
    address public immutable FALLBACKHANDLER;

    constructor(
        address _entryPoint,
        address _fallbackHandler,
        address _validations,
        string memory _name,
        string memory _version
    ) SignatureManager(_entryPoint, _name, _version) {
        FALLBACKHANDLER = _fallbackHandler;
        VALIDATIONS = IValidations(_validations);
    }

    modifier onlyEntryPoint() {
        require(msg.sender == address(entryPoint()), "Not from entrypoint");
        _;
    }

    modifier onlyWhiteListedBundler() {
        VALIDATIONS.validateBundlerWhiteList(tx.origin);
        _;
    }

    modifier onlyWhiteListedModule() {
        VALIDATIONS.validateModuleWhitelist(msg.sender);
        _;
    }

    function initialize(
        address creator,
        bytes memory /* place holder for future */
    ) external {
        require(getOwner() == address(0), "account: have set up");
        // set creator as owner by default.
        initializeOwners(creator);
        initializeFallbackHandler(FALLBACKHANDLER);
        initializeModules();
    }

    function nonce() public view virtual returns (uint256) {
        return ENTRYPOINT.getNonce(address(this), 0);
    }

    function validateUserOp(
        UserOperation calldata userOp,
        bytes32 userOpHash,
        uint256 missingAccountFunds
    )
        public
        override
        onlyEntryPoint
        onlyWhiteListedBundler
        returns (uint256 validationData)
    {
        validationData = super.validateUserOp(
            userOp,
            userOpHash,
            missingAccountFunds
        );
    }

    function execTransactionFromEntrypoint(
        address to,
        uint256 value,
        bytes calldata data
    ) public onlyEntryPoint {
        executeWithGuard(to, value, data);
    }

    function execTransactionFromEntrypointBatch(
        ExecuteParams[] calldata _params
    ) external onlyEntryPoint {
        executeWithGuardBatch(_params);
    }

    function execTransactionFromEntrypointBatchRevertOnFail(
        ExecuteParams[] calldata _params
    ) external onlyEntryPoint {
        execTransactionBatchRevertOnFail(_params);
    }

    function execTransactionFromModule(
        address to,
        uint256 value,
        bytes calldata data,
        Enum.Operation operation
    ) public override onlyWhiteListedModule {
        if (operation == Enum.Operation.Call) {
            ModuleManager.execTransactionFromModule(to, value, data, operation);
        } else {
            address originalFallbackHandler = getFallbackHandler();

            setFallbackHandler(msg.sender, true);
            ModuleManager.execTransactionFromModule(to, value, data, operation);
            setFallbackHandler(originalFallbackHandler, false);
        }
    }
}

File 2 of 27 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

File 3 of 27 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

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 // Deprecated in v4.8
    }

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

    /**
     * @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) {
        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.
            /// @solidity memory-safe-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 {
            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 = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 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 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 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @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 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

File 4 of 27 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 5 of 27 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 6 of 27 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 7 of 27 : BaseAccount.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;

/* solhint-disable avoid-low-level-calls */
/* solhint-disable no-empty-blocks */

import "../interfaces/IAccount.sol";
import "../interfaces/IEntryPoint.sol";
import "./Helpers.sol";

/**
 * Basic account implementation.
 * this contract provides the basic logic for implementing the IAccount interface  - validateUserOp
 * specific account implementation should inherit it and provide the account-specific logic
 */
abstract contract BaseAccount is IAccount {
    using UserOperationLib for UserOperation;

    //return value in case of signature failure, with no time-range.
    // equivalent to _packValidationData(true,0,0);
    uint256 constant internal SIG_VALIDATION_FAILED = 1;

    /**
     * Return the account nonce.
     * This method returns the next sequential nonce.
     * For a nonce of a specific key, use `entrypoint.getNonce(account, key)`
     */
    function getNonce() public view virtual returns (uint256) {
        return entryPoint().getNonce(address(this), 0);
    }

    /**
     * return the entryPoint used by this account.
     * subclass should return the current entryPoint used by this account.
     */
    function entryPoint() public view virtual returns (IEntryPoint);

    /**
     * Validate user's signature and nonce.
     * subclass doesn't need to override this method. Instead, it should override the specific internal validation methods.
     */
    function validateUserOp(UserOperation calldata userOp, bytes32 userOpHash, uint256 missingAccountFunds)
    external override virtual returns (uint256 validationData) {
        _requireFromEntryPoint();
        validationData = _validateSignature(userOp, userOpHash);
        _validateNonce(userOp.nonce);
        _payPrefund(missingAccountFunds);
    }

    /**
     * ensure the request comes from the known entrypoint.
     */
    function _requireFromEntryPoint() internal virtual view {
        require(msg.sender == address(entryPoint()), "account: not from EntryPoint");
    }

    /**
     * validate the signature is valid for this message.
     * @param userOp validate the userOp.signature field
     * @param userOpHash convenient field: the hash of the request, to check the signature against
     *          (also hashes the entrypoint and chain id)
     * @return validationData signature and time-range of this operation
     *      <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 the 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 _validateSignature(UserOperation calldata userOp, bytes32 userOpHash)
    internal virtual returns (uint256 validationData);

    /**
     * Validate the nonce of the UserOperation.
     * This method may validate the nonce requirement of this account.
     * e.g.
     * To limit the nonce to use sequenced UserOps only (no "out of order" UserOps):
     *      `require(nonce < type(uint64).max)`
     * For a hypothetical account that *requires* the nonce to be out-of-order:
     *      `require(nonce & type(uint64).max == 0)`
     *
     * The actual nonce uniqueness is managed by the EntryPoint, and thus no other
     * action is needed by the account itself.
     *
     * @param nonce to validate
     *
     * solhint-disable-next-line no-empty-blocks
     */
    function _validateNonce(uint256 nonce) internal view virtual {
    }

    /**
     * sends to the entrypoint (msg.sender) the missing funds for this transaction.
     * subclass MAY override this method for better funds management
     * (e.g. send to the entryPoint more than the minimum required, so that in future transactions
     * it will not be required to send again)
     * @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) internal virtual {
        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.)
        }
    }
}

File 8 of 27 : Helpers.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;

/* solhint-disable no-inline-assembly */

/**
 * returned data from validateUserOp.
 * validateUserOp returns a uint256, with is created by `_packedValidationData` and parsed by `_parseValidationData`
 * @param aggregator - address(0) - the account validated the signature by itself.
 *              address(1) - the account failed to validate the signature.
 *              otherwise - this is an address of a signature aggregator that must be used to validate the signature.
 * @param validAfter - this UserOp is valid only after this timestamp.
 * @param validaUntil - this UserOp is valid only up to this timestamp.
 */
    struct ValidationData {
        address aggregator;
        uint48 validAfter;
        uint48 validUntil;
    }

//extract sigFailed, validAfter, validUntil.
// also convert zero validUntil to type(uint48).max
    function _parseValidationData(uint validationData) pure returns (ValidationData memory data) {
        address aggregator = address(uint160(validationData));
        uint48 validUntil = uint48(validationData >> 160);
        if (validUntil == 0) {
            validUntil = type(uint48).max;
        }
        uint48 validAfter = uint48(validationData >> (48 + 160));
        return ValidationData(aggregator, validAfter, validUntil);
    }

// intersect account and paymaster ranges.
    function _intersectTimeRange(uint256 validationData, uint256 paymasterValidationData) pure returns (ValidationData memory) {
        ValidationData memory accountValidationData = _parseValidationData(validationData);
        ValidationData memory pmValidationData = _parseValidationData(paymasterValidationData);
        address aggregator = accountValidationData.aggregator;
        if (aggregator == address(0)) {
            aggregator = pmValidationData.aggregator;
        }
        uint48 validAfter = accountValidationData.validAfter;
        uint48 validUntil = accountValidationData.validUntil;
        uint48 pmValidAfter = pmValidationData.validAfter;
        uint48 pmValidUntil = pmValidationData.validUntil;

        if (validAfter < pmValidAfter) validAfter = pmValidAfter;
        if (validUntil > pmValidUntil) validUntil = pmValidUntil;
        return ValidationData(aggregator, validAfter, validUntil);
    }

/**
 * helper to pack the return value for validateUserOp
 * @param data - the ValidationData to pack
 */
    function _packValidationData(ValidationData memory data) pure returns (uint256) {
        return uint160(data.aggregator) | (uint256(data.validUntil) << 160) | (uint256(data.validAfter) << (160 + 48));
    }

/**
 * helper to pack the return value for validateUserOp, when not using an aggregator
 * @param sigFailed - true for signature failure, false for success
 * @param validUntil last timestamp this UserOperation is valid (or zero for infinite)
 * @param validAfter first timestamp this UserOperation is valid
 */
    function _packValidationData(bool sigFailed, uint48 validUntil, uint48 validAfter) pure returns (uint256) {
        return (sigFailed ? 1 : 0) | (uint256(validUntil) << 160) | (uint256(validAfter) << (160 + 48));
    }

/**
 * keccak function over calldata.
 * @dev copy calldata into memory, do keccak and drop allocated memory. Strangely, this is more efficient than letting solidity do it.
 */
    function calldataKeccak(bytes calldata data) pure returns (bytes32 ret) {
        assembly {
            let mem := mload(0x40)
            let len := data.length
            calldatacopy(mem, data.offset, len)
            ret := keccak256(mem, len)
        }
    }

File 9 of 27 : IAccount.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;

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

File 10 of 27 : IAggregator.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;

import "./UserOperation.sol";

/**
 * Aggregated Signatures validator.
 */
interface IAggregator {

    /**
     * validate aggregated signature.
     * revert if the aggregated signature does not match the given list of operations.
     */
    function validateSignatures(UserOperation[] calldata userOps, bytes calldata signature) external view;

    /**
     * validate signature of a single userOp
     * This method is should be called by bundler after EntryPoint.simulateValidation() returns (reverts) with ValidationResultWithAggregation
     * First it validates the signature over the userOp. Then it returns data to be used when creating the handleOps.
     * @param userOp the userOperation received from the user.
     * @return sigForUserOp the value to put into the signature field of the userOp when calling handleOps.
     *    (usually empty, unless account and aggregator support some kind of "multisig"
     */
    function validateUserOpSignature(UserOperation calldata userOp)
    external view returns (bytes memory sigForUserOp);

    /**
     * aggregate multiple signatures into a single value.
     * This method is called off-chain to calculate the signature to pass with handleOps()
     * bundler MAY use optimized custom code perform this aggregation
     * @param userOps array of UserOperations to collect the signatures from.
     * @return aggregatedSignature the aggregated signature
     */
    function aggregateSignatures(UserOperation[] calldata userOps) external view returns (bytes memory aggregatedSignature);
}

File 11 of 27 : IEntryPoint.sol
/**
 ** Account-Abstraction (EIP-4337) singleton EntryPoint implementation.
 ** Only one instance required on each chain.
 **/
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;

/* solhint-disable avoid-low-level-calls */
/* solhint-disable no-inline-assembly */
/* solhint-disable reason-string */

import "./UserOperation.sol";
import "./IStakeManager.sol";
import "./IAggregator.sol";
import "./INonceManager.sol";

interface IEntryPoint is IStakeManager, INonceManager {

    /***
     * An event emitted after each successful request
     * @param userOpHash - unique identifier for the request (hash its entire content, except signature).
     * @param sender - the account that generates this request.
     * @param paymaster - if non-null, the paymaster that pays for this request.
     * @param nonce - the nonce value from the request.
     * @param success - true if the sender transaction succeeded, false if reverted.
     * @param actualGasCost - actual amount paid (by account or paymaster) for this UserOperation.
     * @param actualGasUsed - total gas used by this UserOperation (including preVerification, creation, validation and execution).
     */
    event UserOperationEvent(bytes32 indexed userOpHash, address indexed sender, address indexed paymaster, uint256 nonce, bool success, uint256 actualGasCost, uint256 actualGasUsed);

    /**
     * account "sender" was deployed.
     * @param userOpHash the userOp that deployed this account. UserOperationEvent will follow.
     * @param sender the account that is deployed
     * @param factory the factory used to deploy this account (in the initCode)
     * @param paymaster the paymaster used by this UserOp
     */
    event AccountDeployed(bytes32 indexed userOpHash, address indexed sender, address factory, address paymaster);

    /**
     * An event emitted if the UserOperation "callData" reverted with non-zero length
     * @param userOpHash the request unique identifier.
     * @param sender the sender of this request
     * @param nonce the nonce used in the request
     * @param revertReason - the return bytes from the (reverted) call to "callData".
     */
    event UserOperationRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason);

    /**
     * an event emitted by handleOps(), before starting the execution loop.
     * any event emitted before this event, is part of the validation.
     */
    event BeforeExecution();

    /**
     * signature aggregator used by the following UserOperationEvents within this bundle.
     */
    event SignatureAggregatorChanged(address indexed aggregator);

    /**
     * a custom revert error of handleOps, to identify the offending op.
     *  NOTE: if simulateValidation passes successfully, there should be no reason for handleOps to fail on it.
     *  @param opIndex - index into the array of ops to the failed one (in simulateValidation, this is always zero)
     *  @param reason - revert reason
     *      The string starts with a unique code "AAmn", where "m" is "1" for factory, "2" for account and "3" for paymaster issues,
     *      so a failure can be attributed to the correct entity.
     *   Should be caught in off-chain handleOps simulation and not happen on-chain.
     *   Useful for mitigating DoS attempts against batchers or for troubleshooting of factory/account/paymaster reverts.
     */
    error FailedOp(uint256 opIndex, string reason);

    /**
     * error case when a signature aggregator fails to verify the aggregated signature it had created.
     */
    error SignatureValidationFailed(address aggregator);

    /**
     * Successful result from simulateValidation.
     * @param returnInfo gas and time-range returned values
     * @param senderInfo stake information about the sender
     * @param factoryInfo stake information about the factory (if any)
     * @param paymasterInfo stake information about the paymaster (if any)
     */
    error ValidationResult(ReturnInfo returnInfo,
        StakeInfo senderInfo, StakeInfo factoryInfo, StakeInfo paymasterInfo);

    /**
     * Successful result from simulateValidation, if the account returns a signature aggregator
     * @param returnInfo gas and time-range returned values
     * @param senderInfo stake information about the sender
     * @param factoryInfo stake information about the factory (if any)
     * @param paymasterInfo stake information about the paymaster (if any)
     * @param aggregatorInfo signature aggregation info (if the account requires signature aggregator)
     *      bundler MUST use it to verify the signature, or reject the UserOperation
     */
    error ValidationResultWithAggregation(ReturnInfo returnInfo,
        StakeInfo senderInfo, StakeInfo factoryInfo, StakeInfo paymasterInfo,
        AggregatorStakeInfo aggregatorInfo);

    /**
     * return value of getSenderAddress
     */
    error SenderAddressResult(address sender);

    /**
     * return value of simulateHandleOp
     */
    error ExecutionResult(uint256 preOpGas, uint256 paid, uint48 validAfter, uint48 validUntil, bool targetSuccess, bytes targetResult);

    //UserOps handled, per aggregator
    struct UserOpsPerAggregator {
        UserOperation[] userOps;

        // aggregator address
        IAggregator aggregator;
        // aggregated signature
        bytes signature;
    }

    /**
     * Execute a batch of UserOperation.
     * no signature aggregator is used.
     * if any account requires an aggregator (that is, it returned an aggregator when
     * performing simulateValidation), then handleAggregatedOps() must be used instead.
     * @param ops the operations to execute
     * @param beneficiary the address to receive the fees
     */
    function handleOps(UserOperation[] calldata ops, address payable beneficiary) external;

    /**
     * Execute a batch of UserOperation with Aggregators
     * @param opsPerAggregator the operations to execute, grouped by aggregator (or address(0) for no-aggregator accounts)
     * @param beneficiary the address to receive the fees
     */
    function handleAggregatedOps(
        UserOpsPerAggregator[] calldata opsPerAggregator,
        address payable beneficiary
    ) external;

    /**
     * generate a request Id - unique identifier for this request.
     * the request ID is a hash over the content of the userOp (except the signature), the entrypoint and the chainid.
     */
    function getUserOpHash(UserOperation calldata userOp) external view returns (bytes32);

    /**
     * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.
     * @dev this method always revert. Successful result is ValidationResult error. other errors are failures.
     * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage outside the account's data.
     * @param userOp the user operation to validate.
     */
    function simulateValidation(UserOperation calldata userOp) external;

    /**
     * gas and return values during simulation
     * @param preOpGas the gas used for validation (including preValidationGas)
     * @param prefund the required prefund for this operation
     * @param sigFailed validateUserOp's (or paymaster's) signature check failed
     * @param validAfter - first timestamp this UserOp is valid (merging account and paymaster time-range)
     * @param validUntil - last timestamp this UserOp is valid (merging account and paymaster time-range)
     * @param paymasterContext returned by validatePaymasterUserOp (to be passed into postOp)
     */
    struct ReturnInfo {
        uint256 preOpGas;
        uint256 prefund;
        bool sigFailed;
        uint48 validAfter;
        uint48 validUntil;
        bytes paymasterContext;
    }

    /**
     * returned aggregated signature info.
     * the aggregator returned by the account, and its current stake.
     */
    struct AggregatorStakeInfo {
        address aggregator;
        StakeInfo stakeInfo;
    }

    /**
     * Get counterfactual sender address.
     *  Calculate the sender contract address that will be generated by the initCode and salt in the UserOperation.
     * this method always revert, and returns the address in SenderAddressResult error
     * @param initCode the constructor code to be passed into the UserOperation.
     */
    function getSenderAddress(bytes memory initCode) external;


    /**
     * simulate full execution of a UserOperation (including both validation and target execution)
     * this method will always revert with "ExecutionResult".
     * it performs full validation of the UserOperation, but ignores signature error.
     * an optional target address is called after the userop succeeds, and its value is returned
     * (before the entire call is reverted)
     * Note that in order to collect the the success/failure of the target call, it must be executed
     * with trace enabled to track the emitted events.
     * @param op the UserOperation to simulate
     * @param target if nonzero, a target address to call after userop simulation. If called, the targetSuccess and targetResult
     *        are set to the return from that call.
     * @param targetCallData callData to pass to target address
     */
    function simulateHandleOp(UserOperation calldata op, address target, bytes calldata targetCallData) external;
}

File 12 of 27 : INonceManager.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;

interface INonceManager {

    /**
     * Return the next nonce for this sender.
     * Within a given key, the nonce values are sequenced (starting with zero, and incremented by one on each userop)
     * But UserOp with different keys can come with arbitrary order.
     *
     * @param sender the account address
     * @param key the high 192 bit of the nonce
     * @return nonce a full nonce to pass for next UserOp with this sender.
     */
    function getNonce(address sender, uint192 key)
    external view returns (uint256 nonce);

    /**
     * Manually increment the nonce of the sender.
     * This method is exposed just for completeness..
     * Account does NOT need to call it, neither during validation, nor elsewhere,
     * as the EntryPoint will update the nonce regardless.
     * Possible use-case is call it with various keys to "initialize" their nonces to one, so that future
     * UserOperations will not pay extra for the first transaction with a given key.
     */
    function incrementNonce(uint192 key) external;
}

File 13 of 27 : IStakeManager.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.12;

/**
 * manage deposits and stakes.
 * deposit is just a balance used to pay for UserOperations (either by a paymaster or an account)
 * stake is value locked for at least "unstakeDelay" by the staked entity.
 */
interface IStakeManager {

    event Deposited(
        address indexed account,
        uint256 totalDeposit
    );

    event Withdrawn(
        address indexed account,
        address withdrawAddress,
        uint256 amount
    );

    /// Emitted when stake or unstake delay are modified
    event StakeLocked(
        address indexed account,
        uint256 totalStaked,
        uint256 unstakeDelaySec
    );

    /// Emitted once a stake is scheduled for withdrawal
    event StakeUnlocked(
        address indexed account,
        uint256 withdrawTime
    );

    event StakeWithdrawn(
        address indexed account,
        address withdrawAddress,
        uint256 amount
    );

    /**
     * @param deposit the entity's deposit
     * @param staked true if this entity is staked.
     * @param stake actual amount of ether staked for this entity.
     * @param unstakeDelaySec minimum delay to withdraw the stake.
     * @param withdrawTime - first block timestamp where 'withdrawStake' will be callable, or zero if already locked
     * @dev sizes were chosen so that (deposit,staked, stake) fit into one cell (used during handleOps)
     *    and the rest fit into a 2nd cell.
     *    112 bit allows for 10^15 eth
     *    48 bit for full timestamp
     *    32 bit allows 150 years for unstake delay
     */
    struct DepositInfo {
        uint112 deposit;
        bool staked;
        uint112 stake;
        uint32 unstakeDelaySec;
        uint48 withdrawTime;
    }

    //API struct used by getStakeInfo and simulateValidation
    struct StakeInfo {
        uint256 stake;
        uint256 unstakeDelaySec;
    }

    /// @return info - full deposit information of given account
    function getDepositInfo(address account) external view returns (DepositInfo memory info);

    /// @return the deposit (for gas payment) of the account
    function balanceOf(address account) external view returns (uint256);

    /**
     * add to the deposit of the given account
     */
    function depositTo(address account) external payable;

    /**
     * add to the account's stake - amount and delay
     * any pending unstake is first cancelled.
     * @param _unstakeDelaySec the new lock duration before the deposit can be withdrawn.
     */
    function addStake(uint32 _unstakeDelaySec) external payable;

    /**
     * attempt to unlock the stake.
     * the value can be withdrawn (using withdrawStake) after the unstake delay.
     */
    function unlockStake() external;

    /**
     * withdraw from the (unlocked) stake.
     * must first call unlockStake and wait for the unstakeDelay to pass
     * @param withdrawAddress the address to send withdrawn value.
     */
    function withdrawStake(address payable withdrawAddress) external;

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

File 14 of 27 : UserOperation.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;

/* solhint-disable no-inline-assembly */

import {calldataKeccak} from "../core/Helpers.sol";

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

/**
 * Utility functions helpful when working with UserOperation structs.
 */
library UserOperationLib {

    function getSender(UserOperation calldata userOp) internal pure returns (address) {
        address data;
        //read sender from userOp, which is first userOp member (saves 800 gas...)
        assembly {data := calldataload(userOp)}
        return address(uint160(data));
    }

    //relayer/block builder might submit the TX with higher priorityFee, but the user should not
    // pay above what he signed for.
    function gasPrice(UserOperation calldata userOp) internal view returns (uint256) {
    unchecked {
        uint256 maxFeePerGas = userOp.maxFeePerGas;
        uint256 maxPriorityFeePerGas = userOp.maxPriorityFeePerGas;
        if (maxFeePerGas == maxPriorityFeePerGas) {
            //legacy mode (for networks that don't support basefee opcode)
            return maxFeePerGas;
        }
        return min(maxFeePerGas, maxPriorityFeePerGas + block.basefee);
    }
    }

    function pack(UserOperation calldata userOp) internal pure returns (bytes memory ret) {
        address sender = getSender(userOp);
        uint256 nonce = userOp.nonce;
        bytes32 hashInitCode = calldataKeccak(userOp.initCode);
        bytes32 hashCallData = calldataKeccak(userOp.callData);
        uint256 callGasLimit = userOp.callGasLimit;
        uint256 verificationGasLimit = userOp.verificationGasLimit;
        uint256 preVerificationGas = userOp.preVerificationGas;
        uint256 maxFeePerGas = userOp.maxFeePerGas;
        uint256 maxPriorityFeePerGas = userOp.maxPriorityFeePerGas;
        bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);

        return abi.encode(
            sender, nonce,
            hashInitCode, hashCallData,
            callGasLimit, verificationGasLimit, preVerificationGas,
            maxFeePerGas, maxPriorityFeePerGas,
            hashPaymasterAndData
        );
    }

    function hash(UserOperation calldata userOp) internal pure returns (bytes32) {
        return keccak256(pack(userOp));
    }

    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }
}

File 15 of 27 : IValidations.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;

interface IValidations {
    struct bundlerInformation {
        address bundler;
        uint256 registeTime;
    }
    event UnrestrictedBundlerSet(bool allowed);
    event UnrestrictedModuleSet(bool allowed);
    event WalletFactoryWhitelistSet(address walletProxyFactory);
    event BundlerWhitelistSet(address indexed bundler, bool allowed);
    event ModuleWhitelistSet(address indexed module, bool allowed);

    function officialBundlerWhiteList(
        address bundler
    ) external view returns (bool);

    function moduleWhiteList(address module) external view returns (bool);

    function setUnrestrictedBundler(bool allowed) external;

    function setUnrestrictedModule(bool allowed) external;

    function setBundlerOfficialWhitelist(
        address bundler,
        bool allowed
    ) external;

    function setWalletProxyFactoryWhitelist(address walletFactory) external;

    function setModuleWhitelist(address module, bool allowed) external;

    function validateBundlerWhiteList(address bundler) external view;

    function validateModuleWhitelist(address module) external;
}

File 16 of 27 : Executor.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;
import "../common/Enum.sol";

/// @title Executor - A contract that can execute transactions
contract Executor {
    struct ExecuteParams {
        bool allowFailed;
        address to;
        uint256 value;
        bytes data;
        bytes nestedCalls; // ExecuteParams encoded as bytes
    }

    event HandleSuccessExternalCalls();
    event HandleFailedExternalCalls(bytes revertReason);

    function execute(
        ExecuteParams memory params,
        Enum.Operation operation,
        uint256 txGas
    ) internal returns (bool success) {
        bytes memory result;

        if (operation == Enum.Operation.DelegateCall) {
            // solhint-disable-next-line no-inline-assembly
            (success, result) = params.to.delegatecall{gas: txGas}(params.data);
        } else {
            // solhint-disable-next-line no-inline-assembly
            (success, result) = payable(params.to).call{
                gas: txGas,
                value: params.value
            }(params.data);
        }

        if (!success) {
            if (!params.allowFailed) {
                assembly {
                    revert(add(result, 32), mload(result))
                }
            }
        }
    }
}

File 17 of 27 : FallbackManager.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;

import "../common/SelfAuthorized.sol";

/// @title Fallback Manager - A contract that manages fallback calls made to this contract
contract FallbackManager is SelfAuthorized {
    event ChangedFallbackHandler(address handler);

    // keccak256("fallback_manager.handler.address")
    bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT =
        0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;

    function getFallbackHandler()
        public
        view
        returns (address fallbackHandler)
    {
        bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            let encoded := sload(slot)
            fallbackHandler := shr(96, encoded)
        }
    }

    /// @dev Allows to add a contract to handle fallback calls.
    ///      Only fallback calls without value and with data will be forwarded.
    ///      This can only be done via a Safe transaction.
    /// @param handler contract to handle fallbacks calls.
    function setFallbackHandler(address handler) external authorized {
        setFallbackHandler(handler, false);
        emit ChangedFallbackHandler(handler);
    }

    function setFallbackHandler(address handler, bool delegate) internal {
        require(handler != address(this), "handler illegal");
        bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            let encoded := or(shl(96, handler), delegate)
            sstore(slot, encoded)
        }
    }

    function initializeFallbackHandler(address handler) internal {
        bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            let encoded := shl(96, handler)
            sstore(slot, encoded)
        }
    }

    // solhint-disable-next-line payable-fallback,no-complex-fallback
    fallback() external {
        assembly {
            // Load handler and delegate flag from storage
            let encoded := sload(FALLBACK_HANDLER_STORAGE_SLOT)
            let handler := shr(96, encoded)
            let delegate := and(encoded, 1)

            // Copy calldata to memory
            calldatacopy(0, 0, calldatasize())

            // If delegate flag is set, delegate the call to the handler
            switch delegate
            case 0 {
                mstore(calldatasize(), shl(96, caller()))
                let success := call(
                    gas(),
                    handler,
                    0,
                    0,
                    add(calldatasize(), 20),
                    0,
                    0
                )
                returndatacopy(0, 0, returndatasize())
                if iszero(success) {
                    revert(0, returndatasize())
                }
                return(0, returndatasize())
            }
            case 1 {
                let result := delegatecall(
                    gas(),
                    handler,
                    0,
                    calldatasize(),
                    0,
                    0
                )

                returndatacopy(0, 0, returndatasize())

                switch result
                case 0 {
                    revert(0, returndatasize())
                }
                default {
                    return(0, returndatasize())
                }
            }
        }
    }
}

File 18 of 27 : GuardManager.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;

import "../common/Enum.sol";
import "../common/SelfAuthorized.sol";
import "./Executor.sol";

interface Guard {
    function checkTransaction(
        address to,
        uint256 value,
        bytes memory data,
        Enum.Operation operation
    ) external;

    function checkAfterExecution(bool success) external;
}

/// @title Fallback Manager - A contract that manages fallback calls made to this contract
contract GuardManager is SelfAuthorized, Executor {
    event ChangedGuard(address guard);

    // keccak256("guard_manager.guard.address")
    bytes32 internal constant GUARD_STORAGE_SLOT =
        0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;

    function getGuard() public view returns (address guard) {
        bytes32 slot = GUARD_STORAGE_SLOT;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            guard := sload(slot)
        }
    }

    function setGuard(address guard) external authorized {
        bytes32 slot = GUARD_STORAGE_SLOT;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(slot, guard)
        }
        emit ChangedGuard(guard);
    }

    // execute from this contract
    function execTransactionBatch(
        bytes memory executeParamBytes
    ) external authorized {
        executeWithGuardBatch(abi.decode(executeParamBytes, (ExecuteParams[])));
    }

    function execTransactionRevertOnFail(
        bytes memory executeParamBytes
    ) external authorized {
        execTransactionBatchRevertOnFail(
            abi.decode(executeParamBytes, (ExecuteParams[]))
        );
    }

    function executeWithGuard(
        address to,
        uint256 value,
        bytes calldata data
    ) internal {
        address guard = getGuard();
        if (guard != address(0)) {
            Guard(guard).checkTransaction(to, value, data, Enum.Operation.Call);
            Guard(guard).checkAfterExecution(
                execute(
                    ExecuteParams(false, to, value, data, ""),
                    Enum.Operation.Call,
                    gasleft()
                )
            );
        } else {
            execute(
                ExecuteParams(false, to, value, data, ""),
                Enum.Operation.Call,
                gasleft()
            );
        }
    }

    function execTransactionBatchRevertOnFail(
        ExecuteParams[] memory _params
    ) internal {
        address guard = getGuard();
        uint256 length = _params.length;

        if (guard == address(0)) {
            for (uint256 i = 0; i < length; ) {
                ExecuteParams memory param = _params[i];
                execute(param, Enum.Operation.Call, gasleft());

                if (param.nestedCalls.length > 0) {
                    try
                        this.execTransactionRevertOnFail(param.nestedCalls)
                    {} catch (bytes memory returnData) {
                        revert(string(returnData));
                    }
                }

                unchecked {
                    ++i;
                }
            }
        } else {
            for (uint256 i = 0; i < length; ) {
                ExecuteParams memory param = _params[i];

                Guard(guard).checkTransaction(
                    param.to,
                    param.value,
                    param.data,
                    Enum.Operation.Call
                );

                Guard(guard).checkAfterExecution(
                    execute(param, Enum.Operation.Call, gasleft())
                );

                if (param.nestedCalls.length > 0) {
                    try
                        this.execTransactionRevertOnFail(param.nestedCalls)
                    {} catch (bytes memory returnData) {
                        revert(string(returnData));
                    }
                }

                unchecked {
                    ++i;
                }
            }
        }
    }

    function executeWithGuardBatch(ExecuteParams[] memory _params) internal {
        address guard = getGuard();
        uint256 length = _params.length;

        if (guard == address(0)) {
            for (uint256 i = 0; i < length; ) {
                ExecuteParams memory param = _params[i];
                bool success = execute(param, Enum.Operation.Call, gasleft());
                if (success) {
                    emit HandleSuccessExternalCalls();
                }

                if (param.nestedCalls.length > 0) {
                    try this.execTransactionBatch(param.nestedCalls) {} catch (
                        bytes memory returnData
                    ) {
                        emit HandleFailedExternalCalls(returnData);
                    }
                }

                unchecked {
                    ++i;
                }
            }
        } else {
            for (uint256 i = 0; i < length; ) {
                ExecuteParams memory param = _params[i];

                Guard(guard).checkTransaction(
                    param.to,
                    param.value,
                    param.data,
                    Enum.Operation.Call
                );

                bool success = execute(param, Enum.Operation.Call, gasleft());
                if (success) {
                    emit HandleSuccessExternalCalls();
                }

                Guard(guard).checkAfterExecution(success);

                if (param.nestedCalls.length > 0) {
                    try this.execTransactionBatch(param.nestedCalls) {} catch (
                        bytes memory returnData
                    ) {
                        emit HandleFailedExternalCalls(returnData);
                    }
                }

                unchecked {
                    ++i;
                }
            }
        }
    }
}

File 19 of 27 : ModuleManager.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;
import "../common/Enum.sol";
import "../common/SelfAuthorized.sol";
import "./Executor.sol";

/// @title Module Manager - A contract that manages modules that can execute transactions via this contract
contract ModuleManager is SelfAuthorized, Executor {
    event EnabledModule(address module);
    event DisabledModule(address module);
    event ExecutionFromModuleSuccess(address module);
    event ExecutionFromModuleFailure(address module);

    address internal constant SENTINEL_MODULES = address(0x1);
    mapping(address => address) internal modules;

    function initializeModules() internal {
        modules[SENTINEL_MODULES] = SENTINEL_MODULES;
    }

    function enableModule(address module) public authorized {
        // Module address cannot be null or sentinel.
        require(module != address(0) && module != SENTINEL_MODULES, "GS101");
        // Module cannot be added twice.
        require(modules[module] == address(0), "GS102");

        modules[module] = modules[SENTINEL_MODULES];
        modules[SENTINEL_MODULES] = module;
        emit EnabledModule(module);
    }

    /// @dev Allows to remove a module from the whitelist.
    ///      This can only be done via a Safe transaction.
    /// @notice Disables the module `module` for the Safe.
    /// @param prevModule Module that pointed to the module to be removed in the linked list
    /// @param module Module to be removed.
    function disableModule(
        address prevModule,
        address module
    ) public authorized {
        // Validate module address and check that it corresponds to module index.
        require(module != address(0) && module != SENTINEL_MODULES, "GS101");
        require(modules[prevModule] == module, "GS103");
        modules[prevModule] = modules[module];
        modules[module] = address(0);
        emit DisabledModule(module);
    }

    /// @dev Returns if an module is enabled
    /// @return True if the module is enabled
    function isModuleEnabled(address module) public view returns (bool) {
        return SENTINEL_MODULES != module && modules[module] != address(0);
    }

    /// @dev Allows a Module to execute a Safe transaction without any further confirmations.
    /// @param to Destination address of module transaction.
    /// @param value Ether value of module transaction.
    /// @param data Data payload of module transaction.
    /// @param operation Operation type of module transaction.
    function execTransactionFromModule(
        address to,
        uint256 value,
        bytes calldata data,
        Enum.Operation operation
    ) public virtual {
        // Only whitelisted modules are allowed.
        require(modules[msg.sender] != address(0), "GS104");
        // Execute transaction without further confirmations.
        if (
            execute(
                ExecuteParams(false, to, value, data, ""),
                operation,
                gasleft()
            )
        ) emit ExecutionFromModuleSuccess(msg.sender);
        else emit ExecutionFromModuleFailure(msg.sender);
    }

    /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data
    /// @param to Destination address of module transaction.
    /// @param value Ether value of module transaction.
    /// @param data Data payload of module transaction.
    /// @param operation Operation type of module transaction.
    function execTransactionFromModuleReturnData(
        address to,
        uint256 value,
        bytes calldata data,
        Enum.Operation operation
    ) public returns (bytes memory returnData) {
        execTransactionFromModule(to, value, data, operation);
        // solhint-disable-next-line no-inline-assembly
        assembly {
            // Load free memory location
            let ptr := mload(0x40)
            // We allocate memory for the return data by setting the free memory location to
            // current free memory location + data size + 32 bytes for data size value
            mstore(0x40, add(ptr, add(returndatasize(), 0x20)))
            // Store the size
            mstore(ptr, returndatasize())
            // Store the data
            returndatacopy(add(ptr, 0x20), 0, returndatasize())
            // Point the return data to the correct memory location
            returnData := ptr
        }
    }
}

File 20 of 27 : OwnerManager.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;

contract OwnerManager {
    event AAOwnerSet(address owner);

    address internal owner;

    uint256 private nonce;

    modifier onlyOwner() {
        require(isOwner(msg.sender), "not call by owner");
        _;
    }

    function initializeOwners(address _owner) internal {
        owner = _owner;

        emit AAOwnerSet(_owner);
    }

    function isOwner(address _owner) public view returns (bool) {
        return owner == _owner;
    }

    function getOwner() public view returns (address) {
        return owner;
    }
}

File 21 of 27 : SignatureManager.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "../../@eth-infinitism-v0.6/core/BaseAccount.sol";
import "../common/Enum.sol";
import "../common/SignatureDecoder.sol";
import "./OwnerManager.sol";

contract SignatureManager is BaseAccount, Enum, OwnerManager, SignatureDecoder {
    using UserOperationLib for UserOperation;

    IEntryPoint internal immutable ENTRYPOINT;

    bytes32 internal immutable HASH_NAME;

    bytes32 internal immutable HASH_VERSION;

    bytes32 internal immutable TYPE_HASH;

    address internal immutable ADDRESS_THIS;

    bytes32 internal immutable EIP712_ORDER_STRUCT_SCHEMA_HASH;

    struct SignMessage {
        address sender;
        uint256 nonce;
        bytes initCode;
        bytes callData;
        uint256 callGasLimit;
        uint256 verificationGasLimit;
        uint256 preVerificationGas;
        uint256 maxFeePerGas;
        uint256 maxPriorityFeePerGas;
        bytes paymasterAndData;
        address EntryPoint;
        uint256 sigTime;
    }

    /* solhint-enable var-name-mixedcase */

    constructor(address entrypoint, string memory name, string memory version) {
        ENTRYPOINT = IEntryPoint(entrypoint);

        HASH_NAME = keccak256(bytes(name));
        HASH_VERSION = keccak256(bytes(version));
        TYPE_HASH = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        ADDRESS_THIS = address(this);

        EIP712_ORDER_STRUCT_SCHEMA_HASH = keccak256(
            abi.encodePacked(
                "SignMessage(",
                "address sender,",
                "uint256 nonce,",
                "bytes initCode,",
                "bytes callData,",
                "uint256 callGasLimit,",
                "uint256 verificationGasLimit,",
                "uint256 preVerificationGas,",
                "uint256 maxFeePerGas,",
                "uint256 maxPriorityFeePerGas,",
                "bytes paymasterAndData,",
                "address EntryPoint,",
                "uint256 sigTime",
                ")"
            )
        );
    }

    function getUOPHash(
        SignatureType sigType,
        address EntryPoint,
        UserOperation calldata userOp
    ) public view returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    sigType == SignatureType.EIP712Type
                        ? EIP712_ORDER_STRUCT_SCHEMA_HASH
                        : bytes32(block.chainid),
                    userOp.getSender(),
                    userOp.nonce,
                    keccak256(userOp.initCode),
                    keccak256(userOp.callData),
                    userOp.callGasLimit,
                    userOp.verificationGasLimit,
                    userOp.preVerificationGas,
                    userOp.maxFeePerGas,
                    userOp.maxPriorityFeePerGas,
                    keccak256(userOp.paymasterAndData),
                    EntryPoint,
                    uint256(bytes32(userOp.signature[1:33]))
                )
            );
    }

    function getUOPSignedHash(
        SignatureType sigType,
        address EntryPoint,
        UserOperation calldata userOp
    ) public view returns (bytes32) {
        return
            sigType == SignatureType.EIP712Type
                ? ECDSA.toTypedDataHash(
                    keccak256(
                        abi.encode(
                            TYPE_HASH,
                            HASH_NAME,
                            HASH_VERSION,
                            block.chainid,
                            ADDRESS_THIS
                        )
                    ),
                    keccak256(
                        abi.encode(
                            EIP712_ORDER_STRUCT_SCHEMA_HASH,
                            userOp.getSender(),
                            userOp.nonce,
                            keccak256(userOp.initCode),
                            keccak256(userOp.callData),
                            userOp.callGasLimit,
                            userOp.verificationGasLimit,
                            userOp.preVerificationGas,
                            userOp.maxFeePerGas,
                            userOp.maxPriorityFeePerGas,
                            keccak256(userOp.paymasterAndData),
                            EntryPoint,
                            uint256(bytes32(userOp.signature[1:33]))
                        )
                    )
                )
                : ECDSA.toEthSignedMessageHash(
                    keccak256(
                        abi.encode(
                            bytes32(block.chainid),
                            userOp.getSender(),
                            userOp.nonce,
                            keccak256(userOp.initCode),
                            keccak256(userOp.callData),
                            userOp.callGasLimit,
                            userOp.verificationGasLimit,
                            userOp.preVerificationGas,
                            userOp.maxFeePerGas,
                            userOp.maxPriorityFeePerGas,
                            keccak256(userOp.paymasterAndData),
                            EntryPoint,
                            uint256(bytes32(userOp.signature[1:33]))
                        )
                    )
                );
    }

    function validateUserOp(
        UserOperation calldata userOp,
        bytes32,
        uint256 missingAccountFunds
    ) public virtual override returns (uint256) {
        if (missingAccountFunds != 0) {
            payable(msg.sender).call{
                value: missingAccountFunds,
                gas: type(uint256).max
            }("");
        }

        return
            _validateSignature(
                userOp,
                getUOPSignedHash(
                    SignatureType(uint8(bytes1(userOp.signature[0:1]))),
                    msg.sender,
                    userOp
                )
            );
    }

    function _validateSignature(
        UserOperation calldata userOp,
        bytes32 userOpHash
    ) internal virtual override returns (uint256 validationData) {
        uint256 sigTime = uint256(bytes32(userOp.signature[1:33]));

        uint formatSigTime = _formatSigtimeToValidationData(sigTime);
        if (ECDSA.recover(userOpHash, userOp.signature[33:]) != owner) {
            return SIG_VALIDATION_FAILED;
        } else {
            return formatSigTime;
        }
    }

    /// @dev format sigtime to validationData struct
    /// @param sigTime: 0x[address 20 bytes][after 6 bytes][until 6 bytes]
    /// @return data: ValidationData
    function _formatSigtimeToValidationData(
        uint256 sigTime
    ) private pure returns (uint256) {
        uint48 validUntil = uint48(sigTime);
        if (validUntil == 0) {
            validUntil = type(uint48).max;
        }
        uint48 validAfter = uint48(sigTime >> 48);
        address aggregator = address(uint160(sigTime >> (48 + 48)));

        return
            _packValidationData(
                ValidationData(aggregator, validAfter, validUntil)
            );
    }

    function entryPoint() public view virtual override returns (IEntryPoint) {
        return ENTRYPOINT;
    }

    function isValidSignature(
        bytes32 _hash,
        bytes calldata _signature
    ) external view returns (bytes4) {
        if (isOwner(ECDSA.recover(_hash, _signature))) {
            return 0x1626ba7e;
        } else {
            return 0xffffffff;
        }
    }
}

File 22 of 27 : Enum.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;

/// @title Enum - Collection of enums
contract Enum {
    enum Operation {
        Call,
        DelegateCall
    }
    enum SignatureType {
        EIP712Type,
        EIP191Type
    }
}

File 23 of 27 : EtherPaymentFallback.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;

/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments
/// @author Richard Meissner - <[email protected]>
contract EtherPaymentFallback {
    event SafeReceived(address indexed sender, uint256 value);

    /// @dev Fallback function accepts Ether transactions.
    receive() external payable {
        emit SafeReceived(msg.sender, msg.value);
    }
}

File 24 of 27 : SecuredTokenTransfer.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;

/// @title SecuredTokenTransfer - Secure token transfer
/// @author Richard Meissner - <[email protected]>
contract SecuredTokenTransfer {
    /// @dev Transfers a token and returns if it was a success
    /// @param token Token that should be transferred
    /// @param receiver Receiver to whom the token should be transferred
    /// @param amount The amount of tokens that should be transferred
    function transferToken(
        address token,
        address receiver,
        uint256 amount
    ) internal returns (bool transferred) {
        // 0xa9059cbb - keccack("transfer(address,uint256)")
        bytes memory data = abi.encodeWithSelector(
            0xa9059cbb,
            receiver,
            amount
        );
        // solhint-disable-next-line no-inline-assembly
        assembly {
            // We write the return value to scratch space.
            // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory
            let success := call(
                sub(gas(), 10000),
                token,
                0,
                add(data, 0x20),
                mload(data),
                0,
                0x20
            )
            switch returndatasize()
            case 0 {
                transferred := success
            }
            case 0x20 {
                transferred := iszero(or(iszero(success), iszero(mload(0))))
            }
            default {
                transferred := 0
            }
        }
    }
}

File 25 of 27 : SelfAuthorized.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;

/// @title SelfAuthorized - authorizes current contract to perform actions
/// @author Richard Meissner - <[email protected]>
contract SelfAuthorized {
    function requireSelfCall() private view {
        require(msg.sender == address(this), "GS031");
    }

    modifier authorized() {
        // This is a function call as it minimized the bytecode size
        requireSelfCall();
        _;
    }
}

File 26 of 27 : SignatureDecoder.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;

/// @title SignatureDecoder - Decodes signatures that a encoded as bytes
/// @author Richard Meissner - <[email protected]>
contract SignatureDecoder {
    /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.
    /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures
    /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access
    /// @param signatures concatenated rsv signatures
    function signatureSplit(
        bytes memory signatures,
        uint256 pos
    ) internal pure returns (uint8 v, bytes32 r, bytes32 s) {
        // The signature format is a compact form of:
        //   {bytes32 r}{bytes32 s}{uint8 v}
        // Compact means, uint8 is not padded to 32 bytes.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            let signaturePos := mul(0x41, pos)
            r := mload(add(signatures, add(signaturePos, 0x20)))
            s := mload(add(signatures, add(signaturePos, 0x40)))
            // Here we are loading the last 32 bytes, including 31 bytes
            // of 's'. There is no 'mload8' to do this.
            //
            // 'byte' is not working due to the Solidity parser, so lets
            // use the second best option, 'and'
            v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)
        }
    }
}

File 27 of 27 : Singleton.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.12;
import "./SelfAuthorized.sol";

/// @title Singleton - Base for singleton contracts (should always be first super contract)
///         This contract is tightly coupled to our proxy contract
contract Singleton is SelfAuthorized {
    event ImplementUpdated(address indexed implement);
    address internal singleton;

    function updateImplement(address implement) external authorized {
        singleton = implement;
        emit ImplementUpdated(implement);
    }

    function updateImplementAndCall(
        address implement,
        bytes calldata data
    ) external authorized {
        singleton = implement;
        emit ImplementUpdated(implement);
        (bool success, ) = implement.delegatecall(data);
        require(success, "Update implementation failed");
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_entryPoint","type":"address"},{"internalType":"address","name":"_fallbackHandler","type":"address"},{"internalType":"address","name":"_validations","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_version","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"AAOwnerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"handler","type":"address"}],"name":"ChangedFallbackHandler","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"guard","type":"address"}],"name":"ChangedGuard","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"}],"name":"DisabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"}],"name":"EnabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"revertReason","type":"bytes"}],"name":"HandleFailedExternalCalls","type":"event"},{"anonymous":false,"inputs":[],"name":"HandleSuccessExternalCalls","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implement","type":"address"}],"name":"ImplementUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeReceived","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"FALLBACKHANDLER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VALIDATIONS","outputs":[{"internalType":"contract IValidations","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"prevModule","type":"address"},{"internalType":"address","name":"module","type":"address"}],"name":"disableModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"enableModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entryPoint","outputs":[{"internalType":"contract IEntryPoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"executeParamBytes","type":"bytes"}],"name":"execTransactionBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"execTransactionFromEntrypoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"allowFailed","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"nestedCalls","type":"bytes"}],"internalType":"struct Executor.ExecuteParams[]","name":"_params","type":"tuple[]"}],"name":"execTransactionFromEntrypointBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"allowFailed","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"nestedCalls","type":"bytes"}],"internalType":"struct Executor.ExecuteParams[]","name":"_params","type":"tuple[]"}],"name":"execTransactionFromEntrypointBatchRevertOnFail","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModuleReturnData","outputs":[{"internalType":"bytes","name":"returnData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"executeParamBytes","type":"bytes"}],"name":"execTransactionRevertOnFail","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getFallbackHandler","outputs":[{"internalType":"address","name":"fallbackHandler","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGuard","outputs":[{"internalType":"address","name":"guard","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum Enum.SignatureType","name":"sigType","type":"uint8"},{"internalType":"address","name":"EntryPoint","type":"address"},{"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"}],"name":"getUOPHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum Enum.SignatureType","name":"sigType","type":"uint8"},{"internalType":"address","name":"EntryPoint","type":"address"},{"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"}],"name":"getUOPSignedHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"isModuleEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"handler","type":"address"}],"name":"setFallbackHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"guard","type":"address"}],"name":"setGuard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"implement","type":"address"}],"name":"updateImplement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"implement","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"updateImplementAndCall","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"},{"stateMutability":"payable","type":"receive"}]

6101806040523480156200001257600080fd5b506040516200342338038062003423833981016040819052620000359162000353565b6001600160a01b038516608052815160208084019190912060a05281518183012060c0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e05230610100526040518691849184916200023591016b0a6d2cedc9acae6e6c2ceca560a31b81526e1859191c995cdcc81cd95b99195c8b608a1b600c8201526d1d5a5b9d0c8d4d881b9bdb98d94b60921b601b8201526e189e5d195cc81a5b9a5d10dbd9194b608a1b60298201526e189e5d195cc818d85b1b11185d184b608a1b60388201527f75696e743235362063616c6c4761734c696d69742c000000000000000000000060478201527f75696e7432353620766572696669636174696f6e4761734c696d69742c000000605c8201527f75696e7432353620707265566572696669636174696f6e4761732c000000000060798201527f75696e74323536206d61784665655065724761732c000000000000000000000060948201527f75696e74323536206d61785072696f726974794665655065724761732c00000060a98201527f6279746573207061796d6173746572416e64446174612c00000000000000000060c68201527f6164647265737320456e747279506f696e742c0000000000000000000000000060dd8201526e75696e743235362073696754696d6560881b60f0820152602960f81b60ff8201526101000190565b60408051601f198184030181529190528051602090910120610120525050506001600160a01b03938416610160525050166101405250620003f6565b80516001600160a01b03811681146200028957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002b657600080fd5b81516001600160401b0380821115620002d357620002d36200028e565b604051601f8301601f19908116603f01168101908282118183101715620002fe57620002fe6200028e565b816040528381526020925086838588010111156200031b57600080fd5b600091505b838210156200033f578582018301518183018401529082019062000320565b600093810190920192909252949350505050565b600080600080600060a086880312156200036c57600080fd5b620003778662000271565b9450620003876020870162000271565b9350620003976040870162000271565b60608701519093506001600160401b0380821115620003b557600080fd5b620003c389838a01620002a4565b93506080880151915080821115620003da57600080fd5b50620003e988828901620002a4565b9150509295509295909350565b60805160a05160c05160e05161010051610120516101405161016051612f81620004a2600039600081816105f301526112dd015260008181610445015281816108ee0152610cb0015260008181610b6e0152610de101526000610b2a01526000610aa801526000610af601526000610ace0152600081816105460152818161089c0152818161103e015281816110920152818161112b015281816111ce015261123f0152612f816000f3fe6080604052600436106101bb5760003560e01c8063856dfd99116100ec578063c91063891161008a578063d1f5789411610064578063d1f5789414610615578063e009cfde14610635578063e19a9dd914610655578063f08a032314610675576101f7565b8063c9106389146105aa578063d087d288146105cc578063d08dc09d146105e1576101f7565b8063affed0e0116100c6578063affed0e014610522578063b0d691fe14610537578063bfceb0e71461056a578063bfefafc61461058a576101f7565b8063856dfd99146104bf578063893d20e8146104e4578063ae93dfbc14610502576101f7565b8063468721a711610159578063610b592511610133578063610b5925146104135780636e3775fa1461043357806370641a221461047f57806383aa7c9e1461049f576101f7565b8063468721a7146103a65780635229073f146103c6578063583d554b146103f3576101f7565b80632d9ad53d116101955780632d9ad53d146102f95780632f54bf6e146103295780633a871cdd146103585780633e728f8414610386576101f7565b806306c4bacc1461027b5780631626ba7e1461029b578063217180e2146102d9576101f7565b366101f75760405134815233907f3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d9060200160405180910390a2005b34801561020357600080fd5b50600080516020612f2c83398151915254600181169060601c3660008037818015610232576001811461025a57005b3360601b365260008060143601600080865af13d6000803e80610254573d6000fd5b503d6000f35b600080366000855af43d6000803e808015610274573d6000f35b3d6000fd5b005b34801561028757600080fd5b506102796102963660046124e0565b610695565b3480156102a757600080fd5b506102bb6102b636600461253e565b6106e5565b6040516001600160e01b031990911681526020015b60405180910390f35b3480156102e557600080fd5b506102796102f4366004612589565b61074f565b34801561030557600080fd5b506103196103143660046124e0565b610854565b60405190151581526020016102d0565b34801561033557600080fd5b506103196103443660046124e0565b6002546001600160a01b0390811691161490565b34801561036457600080fd5b506103786103733660046125dd565b61088f565b6040519081526020016102d0565b34801561039257600080fd5b506103786103a1366004612637565b610963565b3480156103b257600080fd5b506102796103c1366004612698565b610c9b565b3480156103d257600080fd5b506103e66103e1366004612698565b610d8f565b6040516102d0919061275b565b3480156103ff57600080fd5b5061037861040e366004612637565b610dbf565b34801561041f57600080fd5b5061027961042e3660046124e0565b610ef1565b34801561043f57600080fd5b506104677f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102d0565b34801561048b57600080fd5b5061027961049a36600461276e565b611033565b3480156104ab57600080fd5b506102796104ba3660046127c9565b611087565b3480156104cb57600080fd5b50600080516020612f2c8339815191525460601c610467565b3480156104f057600080fd5b506002546001600160a01b0316610467565b34801561050e57600080fd5b5061027961051d366004612928565b6110e5565b34801561052e57600080fd5b5061037861110c565b34801561054357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610467565b34801561057657600080fd5b50610279610585366004612928565b6111a4565b34801561059657600080fd5b506102796105a53660046127c9565b6111c3565b3480156105b657600080fd5b50600080516020612f0c83398151915254610467565b3480156105d857600080fd5b50610378611218565b3480156105ed57600080fd5b506104677f000000000000000000000000000000000000000000000000000000000000000081565b34801561062157600080fd5b5061027961063036600461295c565b61126e565b34801561064157600080fd5b506102796106503660046129ab565b611354565b34801561066157600080fd5b506102796106703660046124e0565b611483565b34801561068157600080fd5b506102796106903660046124e0565b6114d6565b61069d611522565b600080546001600160a01b0319166001600160a01b038316908117825560405190917fef0d964da7bed19ca04a94b064e2d9bf4dd0ec695ffa9b18ed34c756889b330b91a250565b600061072a6103448585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061155b92505050565b1561073d5750630b135d3f60e11b610748565b506001600160e01b03195b9392505050565b610757611522565b600080546001600160a01b0319166001600160a01b038516908117825560405190917fef0d964da7bed19ca04a94b064e2d9bf4dd0ec695ffa9b18ed34c756889b330b91a26000836001600160a01b031683836040516107b89291906129e4565b600060405180830381855af49150503d80600081146107f3576040519150601f19603f3d011682016040523d82523d6000602084013e6107f8565b606091505b505090508061084e5760405162461bcd60e51b815260206004820152601c60248201527f55706461746520696d706c656d656e746174696f6e206661696c65640000000060448201526064015b60405180910390fd5b50505050565b600060016001600160a01b0383161480159061088957506001600160a01b038281166000908152600160205260409020541615155b92915050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108d95760405162461bcd60e51b8152600401610845906129f4565b60405163adb6624960e01b81523260048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063adb662499060240160006040518083038186803b15801561093857600080fd5b505afa15801561094c573d6000803e3d6000fd5b5050505061095b84848461157f565b949350505050565b60008084600181111561097857610978612a21565b14610aa257610a9d46833560208501356109956040870187612a37565b6040516109a39291906129e4565b6040519081900390206109b96060880188612a37565b6040516109c79291906129e4565b604051908190039020608088013560a089013560c08a013560e08b01356101008c01356109f86101208e018e612a37565b604051610a069291906129e4565b60405180910390208e8e806101400190610a209190612a37565b610a2f91602191600191612a7d565b610a3891612aa7565b604051610a549d9c9b9a99989796959493929190602001612ac5565b604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b61095b565b604080517f000000000000000000000000000000000000000000000000000000000000000060208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660a082015261095b9060c001604051602081830303815290604052805190602001207f0000000000000000000000000000000000000000000000000000000000000000610b95853590565b6020860135610ba76040880188612a37565b604051610bb59291906129e4565b604051908190039020610bcb6060890189612a37565b604051610bd99291906129e4565b604051908190039020608089013560a08a013560c08b013560e08c01356101008d0135610c0a6101208f018f612a37565b604051610c189291906129e4565b60405180910390208f8f806101400190610c329190612a37565b610c4191602191600191612a7d565b610c4a91612aa7565b604051610c669d9c9b9a99989796959493929190602001612ac5565b6040516020818303038152906040528051906020012060405161190160f01b8152600281019290925260228201526042902090565b604051630930492360e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630930492390602401600060405180830381600087803b158015610cfc57600080fd5b505af1158015610d10573d6000803e3d6000fd5b5060009250610d1d915050565b816001811115610d2f57610d2f612a21565b03610d4657610d418585858585611622565b610d88565b6000610d61600080516020612f2c8339815191525460601c90565b9050610d6e336001611764565b610d7b8686868686611622565b610d86816000611764565b505b5050505050565b6060610d9e8686868686610c9b565b60405160203d0181016040523d81523d6000602083013e9695505050505050565b600080846001811115610dd457610dd4612a21565b14610ddf5746610e01565b7f00000000000000000000000000000000000000000000000000000000000000005b82356020840135610e156040860186612a37565b604051610e239291906129e4565b604051908190039020610e396060870187612a37565b604051610e479291906129e4565b604051908190039020608087013560a088013560c089013560e08a01356101008b0135610e786101208d018d612a37565b604051610e869291906129e4565b6040519081900390208d610e9e6101408f018f612a37565b610ead91602191600191612a7d565b610eb691612aa7565b604051610ed29d9c9b9a99989796959493929190602001612ac5565b6040516020818303038152906040528051906020012090509392505050565b610ef9611522565b6001600160a01b03811615801590610f1b57506001600160a01b038116600114155b610f4f5760405162461bcd60e51b8152602060048201526005602482015264475331303160d81b6044820152606401610845565b6001600160a01b038181166000908152600160205260409020541615610f9f5760405162461bcd60e51b815260206004820152600560248201526423a998981960d91b6044820152606401610845565b600160208181527fcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f80546001600160a01b03858116600081815260408082208054949095166001600160a01b031994851617909455959095528254168417909155519182527fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f844091015b60405180910390a150565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461107b5760405162461bcd60e51b8152600401610845906129f4565b61084e848484846117c7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110cf5760405162461bcd60e51b8152600401610845906129f4565b6110e16110dc8284612b5e565b6119bd565b5050565b6110ed611522565b611109818060200190518101906111049190612ca0565b611d2e565b50565b604051631aab3f0d60e11b8152306004820152600060248201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906335567e1a906044015b602060405180830381865afa15801561117b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119f9190612de1565b905090565b6111ac611522565b611109818060200190518101906110dc9190612ca0565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461120b5760405162461bcd60e51b8152600401610845906129f4565b6110e16111048284612b5e565b604051631aab3f0d60e11b8152306004820152600060248201819052906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906335567e1a9060440161115e565b60006112826002546001600160a01b031690565b6001600160a01b0316146112cf5760405162461bcd60e51b815260206004820152601460248201527306163636f756e743a2068617665207365742075760641b6044820152606401610845565b6112d882611fde565b6113117f000000000000000000000000000000000000000000000000000000000000000060601b600080516020612f2c83398151915255565b6110e16001600081905260208190527fcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f80546001600160a01b0319169091179055565b61135c611522565b6001600160a01b0381161580159061137e57506001600160a01b038116600114155b6113b25760405162461bcd60e51b8152602060048201526005602482015264475331303160d81b6044820152606401610845565b6001600160a01b038281166000908152600160205260409020548116908216146114065760405162461bcd60e51b8152602060048201526005602482015264475331303360d81b6044820152606401610845565b6001600160a01b038181166000818152600160209081526040808320805488871685528285208054919097166001600160a01b03199182161790965592849052825490941690915591519081527faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace405427691015b60405180910390a15050565b61148b611522565b600080516020612f0c8339815191528181556040516001600160a01b03831681527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa290602001611477565b6114de611522565b6114e9816000611764565b6040516001600160a01b03821681527f5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b090602001611028565b3330146115595760405162461bcd60e51b8152602060048201526005602482015264475330333160d81b6044820152606401610845565b565b600080600061156a858561202c565b9150915061157781612071565b509392505050565b600081156115d55760405133906000199084906000818181858888f193505050503d80600081146115cc576040519150601f19603f3d011682016040523d82523d6000602084013e6115d1565b606091505b5050505b61095b8461161d6115ea610140830183612a37565b6115f991600191600091612a7d565b61160291612dfa565b60f81c600181111561161657611616612a21565b3388610963565b6121bb565b336000908152600160205260409020546001600160a01b031661166f5760405162461bcd60e51b815260206004820152600560248201526411d4cc4c0d60da1b6044820152606401610845565b6116ed6040518060a00160405280600015158152602001876001600160a01b0316815260200186815260200185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250506040805160208181019092529283529092015250825a612284565b1561172a576040513381527f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb89060200160405180910390a1610d88565b6040513381527facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd3759060200160405180910390a15050505050565b306001600160a01b038316036117ae5760405162461bcd60e51b815260206004820152600f60248201526e1a185b991b195c881a5b1b1959d85b608a1b6044820152606401610845565b60609190911b17600080516020612f2c83398151915255565b60006117df600080516020612f0c8339815191525490565b90506001600160a01b0381161561193d5760405163c5caf0cd60e01b81526001600160a01b0382169063c5caf0cd90611825908890889088908890600090600401612e4a565b600060405180830381600087803b15801561183f57600080fd5b505af1158015611853573d6000803e3d6000fd5b50505050806001600160a01b03166330adc7da6118e66040518060a00160405280600015158152602001896001600160a01b0316815260200188815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505060408051602081810190925283815293019290925290505a612284565b6040518263ffffffff1660e01b8152600401611906911515815260200190565b600060405180830381600087803b15801561192057600080fd5b505af1158015611934573d6000803e3d6000fd5b50505050610d88565b610d866040518060a00160405280600015158152602001876001600160a01b0316815260200186815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505060408051602081810190925283815293019290925290505a612284565b60006119d5600080516020612f0c8339815191525490565b82519091506001600160a01b038216611b255760005b8181101561084e576000848281518110611a0757611a07612ea3565b602002602001015190506000611a1f8260005a612284565b90508015611a51576040517fc097c092d69b13be4f5c2d2dcbf6eae66db75cd0e53233be524a1f410bc0deb790600090a15b60808201515115611b1b57608082015160405163bfceb0e760e01b8152309163bfceb0e791611a83919060040161275b565b600060405180830381600087803b158015611a9d57600080fd5b505af1925050508015611aae575060015b611b1b573d808015611adc576040519150601f19603f3d011682016040523d82523d6000602084013e611ae1565b606091505b507fe968f91e027886fe8437e0c77b159f7b2bf0f88cf967bc8c1ca3c4f5c294057981604051611b11919061275b565b60405180910390a1505b50506001016119eb565b60005b8181101561084e576000848281518110611b4457611b44612ea3565b60200260200101519050836001600160a01b031663c5caf0cd82602001518360400151846060015160006040518563ffffffff1660e01b8152600401611b8d9493929190612eb9565b600060405180830381600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050506000611bcd8260005a612284565b90508015611bff576040517fc097c092d69b13be4f5c2d2dcbf6eae66db75cd0e53233be524a1f410bc0deb790600090a15b604051631856e3ed60e11b815281151560048201526001600160a01b038616906330adc7da90602401600060405180830381600087803b158015611c4257600080fd5b505af1158015611c56573d6000803e3d6000fd5b5050505060808201515115611d2457608082015160405163bfceb0e760e01b8152309163bfceb0e791611c8c919060040161275b565b600060405180830381600087803b158015611ca657600080fd5b505af1925050508015611cb7575060015b611d24573d808015611ce5576040519150601f19603f3d011682016040523d82523d6000602084013e611cea565b606091505b507fe968f91e027886fe8437e0c77b159f7b2bf0f88cf967bc8c1ca3c4f5c294057981604051611d1a919061275b565b60405180910390a1505b5050600101611b28565b6000611d46600080516020612f0c8339815191525490565b82519091506001600160a01b038216611e435760005b8181101561084e576000848281518110611d7857611d78612ea3565b60200260200101519050611d8e8160005a612284565b5060808101515115611e3a576080810151604051632ba4f7ef60e21b8152309163ae93dfbc91611dc1919060040161275b565b600060405180830381600087803b158015611ddb57600080fd5b505af1925050508015611dec575060015b611e3a573d808015611e1a576040519150601f19603f3d011682016040523d82523d6000602084013e611e1f565b606091505b508060405162461bcd60e51b8152600401610845919061275b565b50600101611d5c565b60005b8181101561084e576000848281518110611e6257611e62612ea3565b60200260200101519050836001600160a01b031663c5caf0cd82602001518360400151846060015160006040518563ffffffff1660e01b8152600401611eab9493929190612eb9565b600060405180830381600087803b158015611ec557600080fd5b505af1158015611ed9573d6000803e3d6000fd5b50505050836001600160a01b03166330adc7da611ef88360005a612284565b6040518263ffffffff1660e01b8152600401611f18911515815260200190565b600060405180830381600087803b158015611f3257600080fd5b505af1158015611f46573d6000803e3d6000fd5b5050505060808101515115611fd5576080810151604051632ba4f7ef60e21b8152309163ae93dfbc91611f7c919060040161275b565b600060405180830381600087803b158015611f9657600080fd5b505af1925050508015611fa7575060015b611fd5573d808015611e1a576040519150601f19603f3d011682016040523d82523d6000602084013e611e1f565b50600101611e46565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f9ac05916ca838710da05c0dcb6ae31d326eeb2be76a734f9c9ca713ee2a28af090602001611028565b60008082516041036120625760208301516040840151606085015160001a61205687828585612391565b9450945050505061206a565b506000905060025b9250929050565b600081600481111561208557612085612a21565b0361208d5750565b60018160048111156120a1576120a1612a21565b036120ee5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610845565b600281600481111561210257612102612a21565b0361214f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610845565b600381600481111561216357612163612a21565b036111095760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610845565b6000806121cc610140850185612a37565b6121db91602191600191612a7d565b6121e491612aa7565b905060006121f182612455565b6002549091506001600160a01b031661225a85612212610140890189612a37565b612220916021908290612a7d565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061155b92505050565b6001600160a01b03161461227357600192505050610889565b91506108899050565b505092915050565b60006060600184600181111561229c5761229c612a21565b0361230e5784602001516001600160a01b03168386606001516040516122c29190612eef565b6000604051808303818686f4925050503d80600081146122fe576040519150601f19603f3d011682016040523d82523d6000602084013e612303565b606091505b50909250905061237e565b84602001516001600160a01b031683866040015187606001516040516123349190612eef565b600060405180830381858888f193505050503d8060008114612372576040519150601f19603f3d011682016040523d82523d6000602084013e612377565b606091505b5090925090505b8161157757845161157757805160208201fd5b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123c8575060009050600361244c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561241c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166124455760006001925092505061244c565b9150600090505b94509492505050565b60008165ffffffffffff81168203612470575065ffffffffffff5b604080516060808201835285901c80825265ffffffffffff603087901c8181166020850152908516929093019190915260a085811b6001600160d01b0319169084901b65ffffffffffff60a01b168217175b95945050505050565b6001600160a01b038116811461110957600080fd5b6000602082840312156124f257600080fd5b8135610748816124cb565b60008083601f84011261250f57600080fd5b5081356001600160401b0381111561252657600080fd5b60208301915083602082850101111561206a57600080fd5b60008060006040848603121561255357600080fd5b8335925060208401356001600160401b0381111561257057600080fd5b61257c868287016124fd565b9497909650939450505050565b60008060006040848603121561259e57600080fd5b83356125a9816124cb565b925060208401356001600160401b0381111561257057600080fd5b600061016082840312156125d757600080fd5b50919050565b6000806000606084860312156125f257600080fd5b83356001600160401b0381111561260857600080fd5b612614868287016125c4565b9660208601359650604090950135949350505050565b6002811061110957600080fd5b60008060006060848603121561264c57600080fd5b83356126578161262a565b92506020840135612667816124cb565b915060408401356001600160401b0381111561268257600080fd5b61268e868287016125c4565b9150509250925092565b6000806000806000608086880312156126b057600080fd5b85356126bb816124cb565b94506020860135935060408601356001600160401b038111156126dd57600080fd5b6126e9888289016124fd565b90945092505060608601356126fd8161262a565b809150509295509295909350565b60005b8381101561272657818101518382015260200161270e565b50506000910152565b6000815180845261274781602086016020860161270b565b601f01601f19169290920160200192915050565b602081526000610748602083018461272f565b6000806000806060858703121561278457600080fd5b843561278f816124cb565b93506020850135925060408501356001600160401b038111156127b157600080fd5b6127bd878288016124fd565b95989497509550505050565b600080602083850312156127dc57600080fd5b82356001600160401b03808211156127f357600080fd5b818501915085601f83011261280757600080fd5b81358181111561281657600080fd5b8660208260051b850101111561282b57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156128755761287561283d565b60405290565b604051601f8201601f191681016001600160401b03811182821017156128a3576128a361283d565b604052919050565b60006001600160401b038211156128c4576128c461283d565b50601f01601f191660200190565b600082601f8301126128e357600080fd5b81356128f66128f1826128ab565b61287b565b81815284602083860101111561290b57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561293a57600080fd5b81356001600160401b0381111561295057600080fd5b61095b848285016128d2565b6000806040838503121561296f57600080fd5b823561297a816124cb565b915060208301356001600160401b0381111561299557600080fd5b6129a1858286016128d2565b9150509250929050565b600080604083850312156129be57600080fd5b82356129c9816124cb565b915060208301356129d9816124cb565b809150509250929050565b8183823760009101908152919050565b602080825260139082015272139bdd08199c9bdb48195b9d1c9e5c1bda5b9d606a1b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b6000808335601e19843603018112612a4e57600080fd5b8301803591506001600160401b03821115612a6857600080fd5b60200191503681900382131561206a57600080fd5b60008085851115612a8d57600080fd5b83861115612a9a57600080fd5b5050820193919092039150565b8035602083101561088957600019602084900360031b1b1692915050565b9c8d526001600160a01b039b8c1660208e015260408d019a909a5260608c019890985260808b019690965260a08a019490945260c089019290925260e08801526101008701526101208601526101408501529091166101608301526101808201526101a00190565b60006001600160401b03821115612b4657612b4661283d565b5060051b60200190565b801515811461110957600080fd5b6000612b6c6128f184612b2d565b80848252602080830192508560051b850136811115612b8a57600080fd5b855b81811015612c4f5780356001600160401b0380821115612bac5760008081fd5b818901915060a08236031215612bc25760008081fd5b612bca612853565b8235612bd581612b50565b815282860135612be4816124cb565b818701526040838101359082015260608084013583811115612c065760008081fd5b612c12368287016128d2565b82840152505060808084013583811115612c2c5760008081fd5b612c38368287016128d2565b918301919091525087525050938201938201612b8c565b50919695505050505050565b600082601f830112612c6c57600080fd5b8151612c7a6128f1826128ab565b818152846020838601011115612c8f57600080fd5b61095b82602083016020870161270b565b60006020808385031215612cb357600080fd5b82516001600160401b0380821115612cca57600080fd5b818501915085601f830112612cde57600080fd5b8151612cec6128f182612b2d565b81815260059190911b83018401908481019088831115612d0b57600080fd5b8585015b83811015612dd457805185811115612d2657600080fd5b860160a0818c03601f19011215612d3d5760008081fd5b612d45612853565b88820151612d5281612b50565b8152604082810151612d63816124cb565b808b8401525060608084015182840152608091508184015189811115612d895760008081fd5b612d978f8d83880101612c5b565b82850152505060a083015188811115612db05760008081fd5b612dbe8e8c83870101612c5b565b9183019190915250845250918601918601612d0f565b5098975050505050505050565b600060208284031215612df357600080fd5b5051919050565b6001600160f81b0319813581811691600185101561227c5760019490940360031b84901b1690921692915050565b60028110612e4657634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b0386168152602081018590526080604082018190528101839052828460a0830137600060a08483010152600060a0601f19601f8601168301019050612e996060830184612e28565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b60018060a01b0385168152836020820152608060408201526000612ee0608083018561272f565b90506124c26060830184612e28565b60008251612f0181846020870161270b565b919091019291505056fe4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c86c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5a2646970667358221220eb6c8f0a1e576f10b436888293b119a094534cf4436d80f3ac730c209cae902964736f6c634300081100330000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d2789000000000000000000000000a0be66c8d60a3ca53e83b5f376c6259b8de02586000000000000000000000000228e505d1f21948968fb52794ea823f65053a29400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000253410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005322e302e30000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101bb5760003560e01c8063856dfd99116100ec578063c91063891161008a578063d1f5789411610064578063d1f5789414610615578063e009cfde14610635578063e19a9dd914610655578063f08a032314610675576101f7565b8063c9106389146105aa578063d087d288146105cc578063d08dc09d146105e1576101f7565b8063affed0e0116100c6578063affed0e014610522578063b0d691fe14610537578063bfceb0e71461056a578063bfefafc61461058a576101f7565b8063856dfd99146104bf578063893d20e8146104e4578063ae93dfbc14610502576101f7565b8063468721a711610159578063610b592511610133578063610b5925146104135780636e3775fa1461043357806370641a221461047f57806383aa7c9e1461049f576101f7565b8063468721a7146103a65780635229073f146103c6578063583d554b146103f3576101f7565b80632d9ad53d116101955780632d9ad53d146102f95780632f54bf6e146103295780633a871cdd146103585780633e728f8414610386576101f7565b806306c4bacc1461027b5780631626ba7e1461029b578063217180e2146102d9576101f7565b366101f75760405134815233907f3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d9060200160405180910390a2005b34801561020357600080fd5b50600080516020612f2c83398151915254600181169060601c3660008037818015610232576001811461025a57005b3360601b365260008060143601600080865af13d6000803e80610254573d6000fd5b503d6000f35b600080366000855af43d6000803e808015610274573d6000f35b3d6000fd5b005b34801561028757600080fd5b506102796102963660046124e0565b610695565b3480156102a757600080fd5b506102bb6102b636600461253e565b6106e5565b6040516001600160e01b031990911681526020015b60405180910390f35b3480156102e557600080fd5b506102796102f4366004612589565b61074f565b34801561030557600080fd5b506103196103143660046124e0565b610854565b60405190151581526020016102d0565b34801561033557600080fd5b506103196103443660046124e0565b6002546001600160a01b0390811691161490565b34801561036457600080fd5b506103786103733660046125dd565b61088f565b6040519081526020016102d0565b34801561039257600080fd5b506103786103a1366004612637565b610963565b3480156103b257600080fd5b506102796103c1366004612698565b610c9b565b3480156103d257600080fd5b506103e66103e1366004612698565b610d8f565b6040516102d0919061275b565b3480156103ff57600080fd5b5061037861040e366004612637565b610dbf565b34801561041f57600080fd5b5061027961042e3660046124e0565b610ef1565b34801561043f57600080fd5b506104677f000000000000000000000000228e505d1f21948968fb52794ea823f65053a29481565b6040516001600160a01b0390911681526020016102d0565b34801561048b57600080fd5b5061027961049a36600461276e565b611033565b3480156104ab57600080fd5b506102796104ba3660046127c9565b611087565b3480156104cb57600080fd5b50600080516020612f2c8339815191525460601c610467565b3480156104f057600080fd5b506002546001600160a01b0316610467565b34801561050e57600080fd5b5061027961051d366004612928565b6110e5565b34801561052e57600080fd5b5061037861110c565b34801561054357600080fd5b507f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d2789610467565b34801561057657600080fd5b50610279610585366004612928565b6111a4565b34801561059657600080fd5b506102796105a53660046127c9565b6111c3565b3480156105b657600080fd5b50600080516020612f0c83398151915254610467565b3480156105d857600080fd5b50610378611218565b3480156105ed57600080fd5b506104677f000000000000000000000000a0be66c8d60a3ca53e83b5f376c6259b8de0258681565b34801561062157600080fd5b5061027961063036600461295c565b61126e565b34801561064157600080fd5b506102796106503660046129ab565b611354565b34801561066157600080fd5b506102796106703660046124e0565b611483565b34801561068157600080fd5b506102796106903660046124e0565b6114d6565b61069d611522565b600080546001600160a01b0319166001600160a01b038316908117825560405190917fef0d964da7bed19ca04a94b064e2d9bf4dd0ec695ffa9b18ed34c756889b330b91a250565b600061072a6103448585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061155b92505050565b1561073d5750630b135d3f60e11b610748565b506001600160e01b03195b9392505050565b610757611522565b600080546001600160a01b0319166001600160a01b038516908117825560405190917fef0d964da7bed19ca04a94b064e2d9bf4dd0ec695ffa9b18ed34c756889b330b91a26000836001600160a01b031683836040516107b89291906129e4565b600060405180830381855af49150503d80600081146107f3576040519150601f19603f3d011682016040523d82523d6000602084013e6107f8565b606091505b505090508061084e5760405162461bcd60e51b815260206004820152601c60248201527f55706461746520696d706c656d656e746174696f6e206661696c65640000000060448201526064015b60405180910390fd5b50505050565b600060016001600160a01b0383161480159061088957506001600160a01b038281166000908152600160205260409020541615155b92915050565b6000336001600160a01b037f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d278916146108d95760405162461bcd60e51b8152600401610845906129f4565b60405163adb6624960e01b81523260048201527f000000000000000000000000228e505d1f21948968fb52794ea823f65053a2946001600160a01b03169063adb662499060240160006040518083038186803b15801561093857600080fd5b505afa15801561094c573d6000803e3d6000fd5b5050505061095b84848461157f565b949350505050565b60008084600181111561097857610978612a21565b14610aa257610a9d46833560208501356109956040870187612a37565b6040516109a39291906129e4565b6040519081900390206109b96060880188612a37565b6040516109c79291906129e4565b604051908190039020608088013560a089013560c08a013560e08b01356101008c01356109f86101208e018e612a37565b604051610a069291906129e4565b60405180910390208e8e806101400190610a209190612a37565b610a2f91602191600191612a7d565b610a3891612aa7565b604051610a549d9c9b9a99989796959493929190602001612ac5565b604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b61095b565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0c382912095e7706ed01a66755a50c713445aceaf5a9168954498b03dd381faa918101919091527fb4bcb154e38601c389396fa918314da42d4626f13ef6d0ceb07e5f5d26b2fbc360608201524660808201526001600160a01b037f000000000000000000000000ac78f1101883a68babcfbaccccaadc7d55e657ba1660a082015261095b9060c001604051602081830303815290604052805190602001207f7a4b0f35f3c0d8dcb98866e1af96ac3a41a9ff5cdbae7b831d0cd27b6faa4899610b95853590565b6020860135610ba76040880188612a37565b604051610bb59291906129e4565b604051908190039020610bcb6060890189612a37565b604051610bd99291906129e4565b604051908190039020608089013560a08a013560c08b013560e08c01356101008d0135610c0a6101208f018f612a37565b604051610c189291906129e4565b60405180910390208f8f806101400190610c329190612a37565b610c4191602191600191612a7d565b610c4a91612aa7565b604051610c669d9c9b9a99989796959493929190602001612ac5565b6040516020818303038152906040528051906020012060405161190160f01b8152600281019290925260228201526042902090565b604051630930492360e01b81523360048201527f000000000000000000000000228e505d1f21948968fb52794ea823f65053a2946001600160a01b031690630930492390602401600060405180830381600087803b158015610cfc57600080fd5b505af1158015610d10573d6000803e3d6000fd5b5060009250610d1d915050565b816001811115610d2f57610d2f612a21565b03610d4657610d418585858585611622565b610d88565b6000610d61600080516020612f2c8339815191525460601c90565b9050610d6e336001611764565b610d7b8686868686611622565b610d86816000611764565b505b5050505050565b6060610d9e8686868686610c9b565b60405160203d0181016040523d81523d6000602083013e9695505050505050565b600080846001811115610dd457610dd4612a21565b14610ddf5746610e01565b7f7a4b0f35f3c0d8dcb98866e1af96ac3a41a9ff5cdbae7b831d0cd27b6faa48995b82356020840135610e156040860186612a37565b604051610e239291906129e4565b604051908190039020610e396060870187612a37565b604051610e479291906129e4565b604051908190039020608087013560a088013560c089013560e08a01356101008b0135610e786101208d018d612a37565b604051610e869291906129e4565b6040519081900390208d610e9e6101408f018f612a37565b610ead91602191600191612a7d565b610eb691612aa7565b604051610ed29d9c9b9a99989796959493929190602001612ac5565b6040516020818303038152906040528051906020012090509392505050565b610ef9611522565b6001600160a01b03811615801590610f1b57506001600160a01b038116600114155b610f4f5760405162461bcd60e51b8152602060048201526005602482015264475331303160d81b6044820152606401610845565b6001600160a01b038181166000908152600160205260409020541615610f9f5760405162461bcd60e51b815260206004820152600560248201526423a998981960d91b6044820152606401610845565b600160208181527fcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f80546001600160a01b03858116600081815260408082208054949095166001600160a01b031994851617909455959095528254168417909155519182527fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f844091015b60405180910390a150565b336001600160a01b037f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d2789161461107b5760405162461bcd60e51b8152600401610845906129f4565b61084e848484846117c7565b336001600160a01b037f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d278916146110cf5760405162461bcd60e51b8152600401610845906129f4565b6110e16110dc8284612b5e565b6119bd565b5050565b6110ed611522565b611109818060200190518101906111049190612ca0565b611d2e565b50565b604051631aab3f0d60e11b8152306004820152600060248201819052907f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d27896001600160a01b0316906335567e1a906044015b602060405180830381865afa15801561117b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119f9190612de1565b905090565b6111ac611522565b611109818060200190518101906110dc9190612ca0565b336001600160a01b037f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d2789161461120b5760405162461bcd60e51b8152600401610845906129f4565b6110e16111048284612b5e565b604051631aab3f0d60e11b8152306004820152600060248201819052906001600160a01b037f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d278916906335567e1a9060440161115e565b60006112826002546001600160a01b031690565b6001600160a01b0316146112cf5760405162461bcd60e51b815260206004820152601460248201527306163636f756e743a2068617665207365742075760641b6044820152606401610845565b6112d882611fde565b6113117f000000000000000000000000a0be66c8d60a3ca53e83b5f376c6259b8de0258660601b600080516020612f2c83398151915255565b6110e16001600081905260208190527fcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f80546001600160a01b0319169091179055565b61135c611522565b6001600160a01b0381161580159061137e57506001600160a01b038116600114155b6113b25760405162461bcd60e51b8152602060048201526005602482015264475331303160d81b6044820152606401610845565b6001600160a01b038281166000908152600160205260409020548116908216146114065760405162461bcd60e51b8152602060048201526005602482015264475331303360d81b6044820152606401610845565b6001600160a01b038181166000818152600160209081526040808320805488871685528285208054919097166001600160a01b03199182161790965592849052825490941690915591519081527faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace405427691015b60405180910390a15050565b61148b611522565b600080516020612f0c8339815191528181556040516001600160a01b03831681527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa290602001611477565b6114de611522565b6114e9816000611764565b6040516001600160a01b03821681527f5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b090602001611028565b3330146115595760405162461bcd60e51b8152602060048201526005602482015264475330333160d81b6044820152606401610845565b565b600080600061156a858561202c565b9150915061157781612071565b509392505050565b600081156115d55760405133906000199084906000818181858888f193505050503d80600081146115cc576040519150601f19603f3d011682016040523d82523d6000602084013e6115d1565b606091505b5050505b61095b8461161d6115ea610140830183612a37565b6115f991600191600091612a7d565b61160291612dfa565b60f81c600181111561161657611616612a21565b3388610963565b6121bb565b336000908152600160205260409020546001600160a01b031661166f5760405162461bcd60e51b815260206004820152600560248201526411d4cc4c0d60da1b6044820152606401610845565b6116ed6040518060a00160405280600015158152602001876001600160a01b0316815260200186815260200185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250506040805160208181019092529283529092015250825a612284565b1561172a576040513381527f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb89060200160405180910390a1610d88565b6040513381527facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd3759060200160405180910390a15050505050565b306001600160a01b038316036117ae5760405162461bcd60e51b815260206004820152600f60248201526e1a185b991b195c881a5b1b1959d85b608a1b6044820152606401610845565b60609190911b17600080516020612f2c83398151915255565b60006117df600080516020612f0c8339815191525490565b90506001600160a01b0381161561193d5760405163c5caf0cd60e01b81526001600160a01b0382169063c5caf0cd90611825908890889088908890600090600401612e4a565b600060405180830381600087803b15801561183f57600080fd5b505af1158015611853573d6000803e3d6000fd5b50505050806001600160a01b03166330adc7da6118e66040518060a00160405280600015158152602001896001600160a01b0316815260200188815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505060408051602081810190925283815293019290925290505a612284565b6040518263ffffffff1660e01b8152600401611906911515815260200190565b600060405180830381600087803b15801561192057600080fd5b505af1158015611934573d6000803e3d6000fd5b50505050610d88565b610d866040518060a00160405280600015158152602001876001600160a01b0316815260200186815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505060408051602081810190925283815293019290925290505a612284565b60006119d5600080516020612f0c8339815191525490565b82519091506001600160a01b038216611b255760005b8181101561084e576000848281518110611a0757611a07612ea3565b602002602001015190506000611a1f8260005a612284565b90508015611a51576040517fc097c092d69b13be4f5c2d2dcbf6eae66db75cd0e53233be524a1f410bc0deb790600090a15b60808201515115611b1b57608082015160405163bfceb0e760e01b8152309163bfceb0e791611a83919060040161275b565b600060405180830381600087803b158015611a9d57600080fd5b505af1925050508015611aae575060015b611b1b573d808015611adc576040519150601f19603f3d011682016040523d82523d6000602084013e611ae1565b606091505b507fe968f91e027886fe8437e0c77b159f7b2bf0f88cf967bc8c1ca3c4f5c294057981604051611b11919061275b565b60405180910390a1505b50506001016119eb565b60005b8181101561084e576000848281518110611b4457611b44612ea3565b60200260200101519050836001600160a01b031663c5caf0cd82602001518360400151846060015160006040518563ffffffff1660e01b8152600401611b8d9493929190612eb9565b600060405180830381600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050506000611bcd8260005a612284565b90508015611bff576040517fc097c092d69b13be4f5c2d2dcbf6eae66db75cd0e53233be524a1f410bc0deb790600090a15b604051631856e3ed60e11b815281151560048201526001600160a01b038616906330adc7da90602401600060405180830381600087803b158015611c4257600080fd5b505af1158015611c56573d6000803e3d6000fd5b5050505060808201515115611d2457608082015160405163bfceb0e760e01b8152309163bfceb0e791611c8c919060040161275b565b600060405180830381600087803b158015611ca657600080fd5b505af1925050508015611cb7575060015b611d24573d808015611ce5576040519150601f19603f3d011682016040523d82523d6000602084013e611cea565b606091505b507fe968f91e027886fe8437e0c77b159f7b2bf0f88cf967bc8c1ca3c4f5c294057981604051611d1a919061275b565b60405180910390a1505b5050600101611b28565b6000611d46600080516020612f0c8339815191525490565b82519091506001600160a01b038216611e435760005b8181101561084e576000848281518110611d7857611d78612ea3565b60200260200101519050611d8e8160005a612284565b5060808101515115611e3a576080810151604051632ba4f7ef60e21b8152309163ae93dfbc91611dc1919060040161275b565b600060405180830381600087803b158015611ddb57600080fd5b505af1925050508015611dec575060015b611e3a573d808015611e1a576040519150601f19603f3d011682016040523d82523d6000602084013e611e1f565b606091505b508060405162461bcd60e51b8152600401610845919061275b565b50600101611d5c565b60005b8181101561084e576000848281518110611e6257611e62612ea3565b60200260200101519050836001600160a01b031663c5caf0cd82602001518360400151846060015160006040518563ffffffff1660e01b8152600401611eab9493929190612eb9565b600060405180830381600087803b158015611ec557600080fd5b505af1158015611ed9573d6000803e3d6000fd5b50505050836001600160a01b03166330adc7da611ef88360005a612284565b6040518263ffffffff1660e01b8152600401611f18911515815260200190565b600060405180830381600087803b158015611f3257600080fd5b505af1158015611f46573d6000803e3d6000fd5b5050505060808101515115611fd5576080810151604051632ba4f7ef60e21b8152309163ae93dfbc91611f7c919060040161275b565b600060405180830381600087803b158015611f9657600080fd5b505af1925050508015611fa7575060015b611fd5573d808015611e1a576040519150601f19603f3d011682016040523d82523d6000602084013e611e1f565b50600101611e46565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f9ac05916ca838710da05c0dcb6ae31d326eeb2be76a734f9c9ca713ee2a28af090602001611028565b60008082516041036120625760208301516040840151606085015160001a61205687828585612391565b9450945050505061206a565b506000905060025b9250929050565b600081600481111561208557612085612a21565b0361208d5750565b60018160048111156120a1576120a1612a21565b036120ee5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610845565b600281600481111561210257612102612a21565b0361214f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610845565b600381600481111561216357612163612a21565b036111095760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610845565b6000806121cc610140850185612a37565b6121db91602191600191612a7d565b6121e491612aa7565b905060006121f182612455565b6002549091506001600160a01b031661225a85612212610140890189612a37565b612220916021908290612a7d565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061155b92505050565b6001600160a01b03161461227357600192505050610889565b91506108899050565b505092915050565b60006060600184600181111561229c5761229c612a21565b0361230e5784602001516001600160a01b03168386606001516040516122c29190612eef565b6000604051808303818686f4925050503d80600081146122fe576040519150601f19603f3d011682016040523d82523d6000602084013e612303565b606091505b50909250905061237e565b84602001516001600160a01b031683866040015187606001516040516123349190612eef565b600060405180830381858888f193505050503d8060008114612372576040519150601f19603f3d011682016040523d82523d6000602084013e612377565b606091505b5090925090505b8161157757845161157757805160208201fd5b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123c8575060009050600361244c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561241c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166124455760006001925092505061244c565b9150600090505b94509492505050565b60008165ffffffffffff81168203612470575065ffffffffffff5b604080516060808201835285901c80825265ffffffffffff603087901c8181166020850152908516929093019190915260a085811b6001600160d01b0319169084901b65ffffffffffff60a01b168217175b95945050505050565b6001600160a01b038116811461110957600080fd5b6000602082840312156124f257600080fd5b8135610748816124cb565b60008083601f84011261250f57600080fd5b5081356001600160401b0381111561252657600080fd5b60208301915083602082850101111561206a57600080fd5b60008060006040848603121561255357600080fd5b8335925060208401356001600160401b0381111561257057600080fd5b61257c868287016124fd565b9497909650939450505050565b60008060006040848603121561259e57600080fd5b83356125a9816124cb565b925060208401356001600160401b0381111561257057600080fd5b600061016082840312156125d757600080fd5b50919050565b6000806000606084860312156125f257600080fd5b83356001600160401b0381111561260857600080fd5b612614868287016125c4565b9660208601359650604090950135949350505050565b6002811061110957600080fd5b60008060006060848603121561264c57600080fd5b83356126578161262a565b92506020840135612667816124cb565b915060408401356001600160401b0381111561268257600080fd5b61268e868287016125c4565b9150509250925092565b6000806000806000608086880312156126b057600080fd5b85356126bb816124cb565b94506020860135935060408601356001600160401b038111156126dd57600080fd5b6126e9888289016124fd565b90945092505060608601356126fd8161262a565b809150509295509295909350565b60005b8381101561272657818101518382015260200161270e565b50506000910152565b6000815180845261274781602086016020860161270b565b601f01601f19169290920160200192915050565b602081526000610748602083018461272f565b6000806000806060858703121561278457600080fd5b843561278f816124cb565b93506020850135925060408501356001600160401b038111156127b157600080fd5b6127bd878288016124fd565b95989497509550505050565b600080602083850312156127dc57600080fd5b82356001600160401b03808211156127f357600080fd5b818501915085601f83011261280757600080fd5b81358181111561281657600080fd5b8660208260051b850101111561282b57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156128755761287561283d565b60405290565b604051601f8201601f191681016001600160401b03811182821017156128a3576128a361283d565b604052919050565b60006001600160401b038211156128c4576128c461283d565b50601f01601f191660200190565b600082601f8301126128e357600080fd5b81356128f66128f1826128ab565b61287b565b81815284602083860101111561290b57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561293a57600080fd5b81356001600160401b0381111561295057600080fd5b61095b848285016128d2565b6000806040838503121561296f57600080fd5b823561297a816124cb565b915060208301356001600160401b0381111561299557600080fd5b6129a1858286016128d2565b9150509250929050565b600080604083850312156129be57600080fd5b82356129c9816124cb565b915060208301356129d9816124cb565b809150509250929050565b8183823760009101908152919050565b602080825260139082015272139bdd08199c9bdb48195b9d1c9e5c1bda5b9d606a1b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b6000808335601e19843603018112612a4e57600080fd5b8301803591506001600160401b03821115612a6857600080fd5b60200191503681900382131561206a57600080fd5b60008085851115612a8d57600080fd5b83861115612a9a57600080fd5b5050820193919092039150565b8035602083101561088957600019602084900360031b1b1692915050565b9c8d526001600160a01b039b8c1660208e015260408d019a909a5260608c019890985260808b019690965260a08a019490945260c089019290925260e08801526101008701526101208601526101408501529091166101608301526101808201526101a00190565b60006001600160401b03821115612b4657612b4661283d565b5060051b60200190565b801515811461110957600080fd5b6000612b6c6128f184612b2d565b80848252602080830192508560051b850136811115612b8a57600080fd5b855b81811015612c4f5780356001600160401b0380821115612bac5760008081fd5b818901915060a08236031215612bc25760008081fd5b612bca612853565b8235612bd581612b50565b815282860135612be4816124cb565b818701526040838101359082015260608084013583811115612c065760008081fd5b612c12368287016128d2565b82840152505060808084013583811115612c2c5760008081fd5b612c38368287016128d2565b918301919091525087525050938201938201612b8c565b50919695505050505050565b600082601f830112612c6c57600080fd5b8151612c7a6128f1826128ab565b818152846020838601011115612c8f57600080fd5b61095b82602083016020870161270b565b60006020808385031215612cb357600080fd5b82516001600160401b0380821115612cca57600080fd5b818501915085601f830112612cde57600080fd5b8151612cec6128f182612b2d565b81815260059190911b83018401908481019088831115612d0b57600080fd5b8585015b83811015612dd457805185811115612d2657600080fd5b860160a0818c03601f19011215612d3d5760008081fd5b612d45612853565b88820151612d5281612b50565b8152604082810151612d63816124cb565b808b8401525060608084015182840152608091508184015189811115612d895760008081fd5b612d978f8d83880101612c5b565b82850152505060a083015188811115612db05760008081fd5b612dbe8e8c83870101612c5b565b9183019190915250845250918601918601612d0f565b5098975050505050505050565b600060208284031215612df357600080fd5b5051919050565b6001600160f81b0319813581811691600185101561227c5760019490940360031b84901b1690921692915050565b60028110612e4657634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b0386168152602081018590526080604082018190528101839052828460a0830137600060a08483010152600060a0601f19601f8601168301019050612e996060830184612e28565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b60018060a01b0385168152836020820152608060408201526000612ee0608083018561272f565b90506124c26060830184612e28565b60008251612f0181846020870161270b565b919091019291505056fe4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c86c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5a2646970667358221220eb6c8f0a1e576f10b436888293b119a094534cf4436d80f3ac730c209cae902964736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d2789000000000000000000000000a0be66c8d60a3ca53e83b5f376c6259b8de02586000000000000000000000000228e505d1f21948968fb52794ea823f65053a29400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000253410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005322e302e30000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _entryPoint (address): 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789
Arg [1] : _fallbackHandler (address): 0xA0be66C8d60A3ca53E83b5f376C6259b8de02586
Arg [2] : _validations (address): 0x228E505D1F21948968fB52794ea823f65053A294
Arg [3] : _name (string): SA
Arg [4] : _version (string): 2.0.0

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d2789
Arg [1] : 000000000000000000000000a0be66c8d60a3ca53e83b5f376c6259b8de02586
Arg [2] : 000000000000000000000000228e505d1f21948968fb52794ea823f65053a294
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [6] : 5341000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 322e302e30000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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.