CELO Price: $0.12 (+2.48%)
Gas: 25 GWei

Contract

0x1Ee397850c3CA629d965453B3cF102E9A8806Ded

Overview

CELO Balance

Celo Mainnet LogoCelo Mainnet LogoCelo Mainnet Logo0 CELO

CELO Value

$0.00

More Info

Private Name Tags

Multichain Info

Transaction Hash
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SuperChainModuleUpgradeable

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
import {ISafe} from "../interfaces/ISafe.sol";
import {Enum} from "../libraries/Enum.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "../interfaces/ISuperChainModule.sol";

contract SuperChainModuleUpgradeable is
    Initializable,
    ISuperChainModule,
    OwnableUpgradeable,
    UUPSUpgradeable
{
    /// @custom:storage-location erc7201:openzeppelin.storage.superchain_module
    struct SuperChainStorage {
        mapping(address => mapping(address => bool)) _isPopulatedAddOwnerWithThreshold;
        mapping(address => address[]) populatedAddOwnersWithTreshold;
        mapping(address => Account) superChainAccount;
        mapping(address => address) userSuperChainAccount;
        mapping(address => bool) hasFirstOwnerYet;
        mapping(string => bool) superChainIDRegistered;
        address _resolver;
        uint256[] _tierTreshold;
    }
    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.superchain_module")) - 1)) & ~bytes32(uint256(0xff));
    bytes32 private constant SUPERCHAIN_MODULE_STORAGE_LOCATION =
        0x0b2be64e6582d1593e5ce87fbed66eec9268226484384723dab2b56b70de0600;

    function superChainStorage()
        private
        pure
        returns (SuperChainStorage storage $)
    {
        assembly {
            $.slot := SUPERCHAIN_MODULE_STORAGE_LOCATION
        }
    }

    function initialize(address resolver, address owner) public initializer {
        __Ownable_init(owner);
        __UUPSUpgradeable_init();
        SuperChainStorage storage s = superChainStorage();
        s._resolver = resolver;
    }

    modifier firstOwnerSet(address _safe) {
        SuperChainStorage storage s = superChainStorage();
        require(s.hasFirstOwnerYet[_safe], "Initial owner not set yet");
        _;
    }

    function addOwnerWithThreshold(
        address _safe,
        address _newOwner
    ) public firstOwnerSet(_safe) {
        SuperChainStorage storage s = superChainStorage();
        require(msg.sender == _newOwner, "Caller is not the new owner");
        require(
            s.userSuperChainAccount[_newOwner] == address(0),
            "Owner already has a SuperChainAccount"
        );
        require(
            s._isPopulatedAddOwnerWithThreshold[_newOwner][_safe],
            "Owner not populated"
        );
        for (
            uint i = 0;
            i < s.populatedAddOwnersWithTreshold[_safe].length;
            i++
        ) {
            if (s.populatedAddOwnersWithTreshold[_safe][i] == _newOwner) {
                s.populatedAddOwnersWithTreshold[_safe][i] = s
                    .populatedAddOwnersWithTreshold[_safe][
                        s.populatedAddOwnersWithTreshold[_safe].length - 1
                    ];
                s.populatedAddOwnersWithTreshold[_safe].pop();
                break;
            }
        }
        bytes memory data = abi.encodeWithSignature(
            "addOwnerWithThreshold(address,uint256)",
            _newOwner,
            1
        );
        bool success = ISafe(_safe).execTransactionFromModule(
            _safe,
            0,
            data,
            Enum.Operation.Call
        );

        require(success, "Failed to add owner");
        s.userSuperChainAccount[_newOwner] = _safe;
        emit OwnerAdded(
            _safe,
            _newOwner,
            s.superChainAccount[_safe].superChainID
        );
    }

    function removePopulateRequest(address _safe, address user) public {
        SuperChainStorage storage s = superChainStorage();
        require(
            s._isPopulatedAddOwnerWithThreshold[user][_safe],
            "Owner not populated"
        );
        require(
            ISafe(_safe).isOwner(msg.sender) ||
                s._isPopulatedAddOwnerWithThreshold[msg.sender][_safe] ||
                msg.sender == _safe,
            "The address is not an owner or the populated user"
        );
        for (
            uint i = 0;
            i < s.populatedAddOwnersWithTreshold[_safe].length;
            i++
        ) {
            if (s.populatedAddOwnersWithTreshold[_safe][i] == user) {
                Account memory _account = s.superChainAccount[_safe];
                s.populatedAddOwnersWithTreshold[_safe][i] = s
                    .populatedAddOwnersWithTreshold[_safe][
                        s.populatedAddOwnersWithTreshold[_safe].length - 1
                    ];
                s.populatedAddOwnersWithTreshold[_safe].pop();
                s._isPopulatedAddOwnerWithThreshold[user][_safe] = false;
                emit OwnerPopulationRemoved(_safe, user, _account.superChainID);
                break;
            }
        }
    }

    function setInitialOwner(
        address _safe,
        address _owner,
        NounMetadata calldata _noun,
        string calldata superChainID
    ) public {
        SuperChainStorage storage s = superChainStorage();
        require(
            s.userSuperChainAccount[_owner] == address(0),
            "Owner already has a SuperChainSmartAccount"
        );
        require(ISafe(_safe).isOwner(_owner), "The address is not an owner");
        require(
            msg.sender == _safe,
            "Caller is not the SuperChainSmartAccount"
        );
        require(
            !s.hasFirstOwnerYet[_safe],
            "SuperChainSmartAccount already has owners"
        );
        require(
            ISafe(_safe).getOwners().length == 1,
            "SuperChainSmartAccount already has owners"
        );
        require(
            !_isInvalidSuperChainId(superChainID),
            "The last 11 characters cannot be '.superchain'"
        );
        require(
            !s.superChainIDRegistered[superChainID],
            "The superchain ID was registered yet."
        );
        s.superChainAccount[_safe].smartAccount = _safe;
        s.userSuperChainAccount[_owner] = _safe;
        s.superChainAccount[_safe].superChainID = string.concat(
            superChainID,
            ".superchain"
        );
        s.superChainIDRegistered[superChainID] = true;
        s.hasFirstOwnerYet[_safe] = true;
        s.superChainAccount[_safe].noun = _noun;
        emit OwnerAdded(_safe, _owner, s.superChainAccount[_safe].superChainID);
        emit SuperChainSmartAccountCreated(
            _safe,
            _owner,
            s.superChainAccount[_safe].superChainID,
            _noun
        );
    }

    function populateAddOwner(
        address _safe,
        address _newOwner
    ) public firstOwnerSet(_safe) {
        SuperChainStorage storage s = superChainStorage();
        require(
            msg.sender == _safe,
            "Caller is not the SuperChainSmartAccount"
        );
        require(!ISafe(_safe).isOwner(_newOwner), "Owner already exists");
        require(
            !s._isPopulatedAddOwnerWithThreshold[_newOwner][_safe],
            "Owner already populated"
        );
        require(
            s.userSuperChainAccount[_newOwner] == address(0),
            "Owner already has a SuperChainSmartAccount"
        );
        require(
            s.populatedAddOwnersWithTreshold[_safe].length <= 2,
            "Max owners populated"
        );
        s.populatedAddOwnersWithTreshold[_safe].push(_newOwner);
        s._isPopulatedAddOwnerWithThreshold[_newOwner][_safe] = true;
        string memory _superChainId = s.superChainAccount[_safe].superChainID;
        emit OwnerPopulated(_safe, _newOwner, _superChainId);
    }

    function incrementSuperChainPoints(
        uint256 _points,
        address recipent
    ) public returns (bool levelUp) {
        SuperChainStorage storage s = superChainStorage();
        Account storage _account = s.superChainAccount[recipent];
        require(
            msg.sender == s._resolver,
            "Only the resolver can increment the points"
        );
        require(_account.smartAccount != address(0), "Account not found");
        _account.points += _points;
        for (uint16 i = uint16(s._tierTreshold.length); i > 0; i--) {
            uint16 index = i - 1;
            if (s._tierTreshold[index] <= _account.points) {
                if (_account.level == index + 1) {
                    break;
                }
                _account.level = index + 1;
                levelUp = true;
                break;
            }
        }
        emit PointsIncremented(recipent, _points, levelUp);
        return levelUp;
    }

    function simulateIncrementSuperChainPoints(
        uint256 _points,
        address recipent
    ) public view returns (bool levelUp) {
        SuperChainStorage storage s = superChainStorage();
        Account memory _account = s.superChainAccount[recipent];
        require(_account.smartAccount != address(0), "Account not found");
        _account.points += _points;
        for (uint16 i = uint16(s._tierTreshold.length); i > 0; i--) {
            uint16 index = i - 1;
            if (s._tierTreshold[index] <= _account.points) {
                if (_account.level == index + 1) {
                    break;
                }
                _account.level = index + 1;
                levelUp = true;
                break;
            }
        }
        return levelUp;
    }

    function _changeResolver(address resolver) public onlyOwner {
        SuperChainStorage storage s = superChainStorage();
        s._resolver = resolver;
    }
    function addTiersTreshold(uint256[] memory _tresholds)  external onlyOwner{
        for (uint256 i = 0; i < _tresholds.length; i++) {
            _addTierTreshold(_tresholds[i]);
        }
    }
    function _addTierTreshold(uint256 _treshold) internal {
        SuperChainStorage storage s = superChainStorage();
        if (s._tierTreshold.length > 0) {
            require(
                s._tierTreshold[s._tierTreshold.length - 1] < _treshold,
                "The treshold must be higher than the last one"
            );
        }
        s._tierTreshold.push(_treshold);
        emit TierTresholdAdded(_treshold);
    }
    function updateTierThreshold(
        uint256 index,
        uint256 newThreshold
    ) public onlyOwner {
        SuperChainStorage storage s = superChainStorage();
        require(index < s._tierTreshold.length, "Index out of bounds");
        require(
            (index == 0 || s._tierTreshold[index - 1] < newThreshold) &&
                (index == s._tierTreshold.length - 1 ||
                    newThreshold < s._tierTreshold[index + 1]),
            "Invalid threshold update"
        );
        s._tierTreshold[index] = newThreshold;
        emit TierTresholdUpdated(index, newThreshold);
    }

    function getNextLevelPoints(address _safe) public view returns (uint256) {
        SuperChainStorage storage s = superChainStorage();
        if (s.superChainAccount[_safe].level == s._tierTreshold.length) {
            revert MaxLvlReached();
        }
        return s._tierTreshold[s.superChainAccount[_safe].level];
    }

    function _isInvalidSuperChainId(
        string memory str
    ) internal pure returns (bool) {
        bytes memory strBytes = bytes(str);
        bytes memory suffixBytes = bytes(".superchain");

        if (strBytes.length < suffixBytes.length) {
            return false;
        }

        for (uint i = 0; i < suffixBytes.length; i++) {
            if (
                strBytes[strBytes.length - suffixBytes.length + i] !=
                suffixBytes[i]
            ) {
                return false;
            }
        }

        return true;
    }

    function getSuperChainAccount(
        address _safe
    ) public view returns (Account memory) {
        SuperChainStorage storage s = superChainStorage();
        return s.superChainAccount[_safe];
    }

    function getUserSuperChainAccount(
        address _owner
    ) public view returns (Account memory) {
        SuperChainStorage storage s = superChainStorage();
        return s.superChainAccount[s.userSuperChainAccount[_owner]];
    }

    function UpdateNounAvatar(address _safe, NounMetadata calldata _noun) public {
        SuperChainStorage storage s = superChainStorage();
        require(
            msg.sender == _safe,
            "Only the SuperChainSmartAccount can update the noun"
        );
        s.superChainAccount[_safe].noun = _noun;
        emit NounUpdated(_safe, _noun);
    }

    function populatedAddOwnersWithTreshold(
        address $
    ) public view returns (address[] memory) {
        SuperChainStorage storage s = superChainStorage();
        return s.populatedAddOwnersWithTreshold[$];
    }
    function superChainAccount(address $) public view returns (Account memory) {
        SuperChainStorage storage s = superChainStorage();
        return s.superChainAccount[$];
    }
    function userSuperChainAccount(address $) public view returns (address) {
        SuperChainStorage storage s = superChainStorage();
        return s.userSuperChainAccount[$];
    }
    function hasFirstOwnerYet(address $) public view returns (bool) {
        SuperChainStorage storage s = superChainStorage();
        return s.hasFirstOwnerYet[$];
    }
    function superChainIDRegistered(
        string memory $
    ) public view returns (bool) {
        SuperChainStorage storage s = superChainStorage();
        return s.superChainIDRegistered[$];
    }

    function _authorizeUpgrade(address) internal override onlyOwner {}
}

// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;

import {Enum} from "../libraries/Enum.sol";
import {IModuleManager} from "./IModuleManager.sol";
import {IOwnerManager} from "./IOwnerManager.sol";
import {IFallbackManager} from "./IFallbackManager.sol";
import {IGuardManager} from "./IGuardManager.sol";
/**
 * @title ISafe - A multisignature wallet interface with support for confirmations using signed messages based on EIP-712.
 * @author @safe-global/safe-protocol
 */
interface ISafe is
    IModuleManager,
    IGuardManager,
    IOwnerManager,
    IFallbackManager
{
    event SafeSetup(
        address indexed initiator,
        address[] owners,
        uint256 threshold,
        address initializer,
        address fallbackHandler
    );
    event ApproveHash(bytes32 indexed approvedHash, address indexed owner);
    event SignMsg(bytes32 indexed msgHash);
    event ExecutionFailure(bytes32 indexed txHash, uint256 payment);
    event ExecutionSuccess(bytes32 indexed txHash, uint256 payment);

    /**
     * @notice Sets an initial storage of the Safe contract.
     * @dev This method can only be called once.
     *      If a proxy was created without setting up, anyone can call setup and claim the proxy.
     * @param _owners List of Safe owners.
     * @param _threshold Number of required confirmations for a Safe transaction.
     * @param to Contract address for optional delegate call.
     * @param data Data payload for optional delegate call.
     * @param fallbackHandler Handler for fallback calls to this contract
     * @param paymentToken Token that should be used for the payment (0 is ETH)
     * @param payment Value that should be paid
     * @param paymentReceiver Address that should receive the payment (or 0 if tx.origin)
     */
    function setup(
        address[] calldata _owners,
        uint256 _threshold,
        address to,
        bytes calldata data,
        address fallbackHandler,
        address paymentToken,
        uint256 payment,
        address payable paymentReceiver
    ) external;

    /** @notice Executes a `operation` {0: Call, 1: DelegateCall}} transaction to `to` with `value` (Native Currency)
     *          and pays `gasPrice` * `gasLimit` in `gasToken` token to `refundReceiver`.
     * @dev The fees are always transferred, even if the user transaction fails.
     *      This method doesn't perform any sanity check of the transaction, such as:
     *      - if the contract at `to` address has code or not
     *      - if the `gasToken` is a contract or not
     *      It is the responsibility of the caller to perform such checks.
     * @param to Destination address of Safe transaction.
     * @param value Ether value of Safe transaction.
     * @param data Data payload of Safe transaction.
     * @param operation Operation type of Safe transaction.
     * @param safeTxGas Gas that should be used for the Safe transaction.
     * @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)
     * @param gasPrice Gas price that should be used for the payment calculation.
     * @param gasToken Token address (or 0 if ETH) that is used for the payment.
     * @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).
     * @param signatures Signature data that should be verified.
     *                   Can be packed ECDSA signature ({bytes32 r}{bytes32 s}{uint8 v}), contract signature (EIP-1271) or approved hash.
     * @return success Boolean indicating transaction's success.
     */
    function execTransaction(
        address to,
        uint256 value,
        bytes calldata data,
        Enum.Operation operation,
        uint256 safeTxGas,
        uint256 baseGas,
        uint256 gasPrice,
        address gasToken,
        address payable refundReceiver,
        bytes memory signatures
    ) external payable returns (bool success);

    /**
     * @notice Checks whether the signature provided is valid for the provided data and hash. Reverts otherwise.
     * @param dataHash Hash of the data (could be either a message hash or transaction hash)
     * @param signatures Signature data that should be verified.
     *                   Can be packed ECDSA signature ({bytes32 r}{bytes32 s}{uint8 v}), contract signature (EIP-1271) or approved hash.
     */
    function checkSignatures(
        bytes32 dataHash,
        bytes memory signatures
    ) external view;

    /**
     * @notice Checks whether the signature provided is valid for the provided data and hash. Reverts otherwise.
     * @param dataHash Hash of the data (could be either a message hash or transaction hash)
     * @param signatures Signature data that should be verified.
     *                   Can be packed ECDSA signature ({bytes32 r}{bytes32 s}{uint8 v}), contract signature (EIP-1271) or approved hash.
     * @dev This function makes it compatible with previous versions.
     */
    function checkSignatures(
        bytes32 dataHash,
        bytes memory /* IGNORED */,
        bytes memory signatures
    ) external view;

    /**
     * @notice Checks whether the signature provided is valid for the provided data and hash. Reverts otherwise.
     * @dev Since the EIP-1271 does an external call, be mindful of reentrancy attacks.
     * @param executor Address that executing the transaction.
     *        ⚠️⚠️⚠️ Make sure that the executor address is a legitmate executor.
     *        Incorrectly passed the executor might reduce the threshold by 1 signature. ⚠️⚠️⚠️
     * @param dataHash Hash of the data (could be either a message hash or transaction hash)
     * @param signatures Signature data that should be verified.
     *                   Can be packed ECDSA signature ({bytes32 r}{bytes32 s}{uint8 v}), contract signature (EIP-1271) or approved hash.
     * @param requiredSignatures Amount of required valid signatures.
     */
    function checkNSignatures(
        address executor,
        bytes32 dataHash,
        bytes memory signatures,
        uint256 requiredSignatures
    ) external view;

    /**
     * @notice Marks hash `hashToApprove` as approved.
     * @dev This can be used with a pre-approved hash transaction signature.
     *      IMPORTANT: The approved hash stays approved forever. There's no revocation mechanism, so it behaves similarly to ECDSA signatures
     * @param hashToApprove The hash to mark as approved for signatures that are verified by this contract.
     */
    function approveHash(bytes32 hashToApprove) external;

    /**
     * @dev Returns the domain separator for this contract, as defined in the EIP-712 standard.
     * @return bytes32 The domain separator hash.
     */
    function domainSeparator() external view returns (bytes32);

    /**
     * @notice Returns transaction hash to be signed by owners.
     * @param to Destination address.
     * @param value Ether value.
     * @param data Data payload.
     * @param operation Operation type.
     * @param safeTxGas Gas that should be used for the safe transaction.
     * @param baseGas Gas costs for data used to trigger the safe transaction.
     * @param gasPrice Maximum gas price that should be used for this transaction.
     * @param gasToken Token address (or 0 if ETH) that is used for the payment.
     * @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).
     * @param _nonce Transaction nonce.
     * @return Transaction hash.
     */
    function getTransactionHash(
        address to,
        uint256 value,
        bytes calldata data,
        Enum.Operation operation,
        uint256 safeTxGas,
        uint256 baseGas,
        uint256 gasPrice,
        address gasToken,
        address refundReceiver,
        uint256 _nonce
    ) external view returns (bytes32);

    /**
     * External getter function for state variables.
     */

    /**
     * @notice Returns the version of the Safe contract.
     * @return Version string.
     */
    // solhint-disable-next-line
    function VERSION() external view returns (string memory);

    /**
     * @notice Returns the nonce of the Safe contract.
     * @return Nonce.
     */
    function nonce() external view returns (uint256);

    /**
     * @notice Returns a uint if the messageHash is signed by the owner.
     * @param messageHash Hash of message that should be checked.
     * @return Number denoting if an owner signed the hash.
     */
    function signedMessages(
        bytes32 messageHash
    ) external view returns (uint256);

    /**
     * @notice Returns a uint if the messageHash is approved by the owner.
     * @param owner Owner address that should be checked.
     * @param messageHash Hash of message that should be checked.
     * @return Number denoting if an owner approved the hash.
     */
    function approvedHashes(
        address owner,
        bytes32 messageHash
    ) external view returns (uint256);
}

File 3 of 17 : Enum.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;

/**
 * @title Enum - Collection of enums used in Safe Smart Account contracts.
 * @author @safe-global/safe-protocol
 */
library Enum {
    enum Operation {
        Call,
        DelegateCall
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable
    struct OwnableStorage {
        address _owner;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;

    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
        assembly {
            $.slot := OwnableStorageLocation
        }
    }

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    function __Ownable_init(address initialOwner) internal onlyInitializing {
        __Ownable_init_unchained(initialOwner);
    }

    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        OwnableStorage storage $ = _getOwnableStorage();
        return $._owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        OwnableStorage storage $ = _getOwnableStorage();
        address oldOwner = $._owner;
        $._owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol)

pragma solidity ^0.8.20;

import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol";
import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol";
import {Initializable} from "./Initializable.sol";

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 */
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable
    address private immutable __self = address(this);

    /**
     * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
     * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
     * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
     * If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
     * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
     * during an upgrade.
     */
    string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";

    /**
     * @dev The call is from an unauthorized context.
     */
    error UUPSUnauthorizedCallContext();

    /**
     * @dev The storage `slot` is unsupported as a UUID.
     */
    error UUPSUnsupportedProxiableUUID(bytes32 slot);

    /**
     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is
     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
     * fail.
     */
    modifier onlyProxy() {
        _checkProxy();
        _;
    }

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        _checkNotDelegated();
        _;
    }

    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
     */
    function proxiableUUID() external view virtual notDelegated returns (bytes32) {
        return ERC1967Utils.IMPLEMENTATION_SLOT;
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     *
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data);
    }

    /**
     * @dev Reverts if the execution is not performed via delegatecall or the execution
     * context is not of a proxy with an ERC1967-compliant implementation pointing to self.
     * See {_onlyProxy}.
     */
    function _checkProxy() internal view virtual {
        if (
            address(this) == __self || // Must be called through delegatecall
            ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
        ) {
            revert UUPSUnauthorizedCallContext();
        }
    }

    /**
     * @dev Reverts if the execution is performed via delegatecall.
     * See {notDelegated}.
     */
    function _checkNotDelegated() internal view virtual {
        if (address(this) != __self) {
            // Must not be called through delegatecall
            revert UUPSUnauthorizedCallContext();
        }
    }

    /**
     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
     * {upgradeToAndCall}.
     *
     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
     *
     * ```solidity
     * function _authorizeUpgrade(address) internal onlyOwner {}
     * ```
     */
    function _authorizeUpgrade(address newImplementation) internal virtual;

    /**
     * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
     *
     * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
     * is expected to be the implementation slot in ERC1967.
     *
     * Emits an {IERC1967-Upgraded} event.
     */
    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
        try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
            if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
                revert UUPSUnsupportedProxiableUUID(slot);
            }
            ERC1967Utils.upgradeToAndCall(newImplementation, data);
        } catch {
            // The implementation is not UUPS
            revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._initialized = 1;
        if (isTopLevelCall) {
            $._initializing = true;
        }
        _;
        if (isTopLevelCall) {
            $._initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._initialized = version;
        $._initializing = true;
        _;
        $._initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint64) {
        return _getInitializableStorage()._initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _getInitializableStorage()._initializing;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;


struct NounMetadata {
    uint48 background;
    uint48 body;
    uint48 accessory;
    uint48 head;
    uint48 glasses;
}



interface ISuperChainModule {
    error MaxLvlReached();

    event SuperChainSmartAccountCreated(
        address indexed safe,
        address indexed initialOwner,
        string superChainId,
        NounMetadata noun
    );

    event OwnerPopulationRemoved(
        address indexed safe,
        address indexed owner,
        string superChainId
    );

    event OwnerPopulated(
        address indexed safe,
        address indexed newOwner,
        string superChainId
    );
    event OwnerAdded(
        address indexed safe,
        address indexed newOwner,
        string superChainId
    );
    event PointsIncremented(address indexed recipient, uint256 points, bool levelUp);
    event TierTresholdAdded(uint256 treshold);
    event TierTresholdUpdated(uint256 index, uint256 newThreshold);
    event NounUpdated(address indexed safe, NounMetadata noun);
    // Functions
    function addOwnerWithThreshold(address _safe, address _newOwner) external;

    function removePopulateRequest(address _safe, address user) external;

    function setInitialOwner(
        address _safe,
        address _owner,
        NounMetadata calldata _noun,
        string calldata superChainID
    ) external;

    function populateAddOwner(address _safe, address _newOwner) external;

    function incrementSuperChainPoints(uint256 _points, address recipient) external returns (bool levelUp);

    function simulateIncrementSuperChainPoints(uint256 _points, address recipient) external view returns (bool levelUp);

    function addTiersTreshold(uint256[] memory tresholds) external;

    function _changeResolver(address resolver) external;


    function getNextLevelPoints(address _safe) external view returns (uint256);

    function getSuperChainAccount(address _safe) external view returns (Account memory);

    function getUserSuperChainAccount(address _owner) external view returns (Account memory);


    struct AddOwnerRequest {
        address superChainAccount;
        address newOwner;
    }

    struct Account {
        address smartAccount;
        string superChainID;
        uint256 points;
        uint16 level;
        NounMetadata noun;
    }
}

// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
import {Enum} from "../libraries/Enum.sol";

/**
 * @title IModuleManager - An interface of contract managing Safe modules
 * @notice Modules are extensions with unlimited access to a Safe that can be added to a Safe by its owners.
           ⚠️ WARNING: Modules are a security risk since they can execute arbitrary transactions, 
           so only trusted and audited modules should be added to a Safe. A malicious module can
           completely takeover a Safe.
 * @author @safe-global/safe-protocol
 */
interface IModuleManager {
    event EnabledModule(address indexed module);
    event DisabledModule(address indexed module);
    event ExecutionFromModuleSuccess(address indexed module);
    event ExecutionFromModuleFailure(address indexed module);
    event ChangedModuleGuard(address indexed moduleGuard);

    /**
     * @notice Enables the module `module` for the Safe.
     * @dev This can only be done via a Safe transaction.
     * @param module Module to be whitelisted.
     */
    function enableModule(address module) external;

    /**
     * @notice Disables the module `module` for the Safe.
     * @dev This can only be done via a Safe transaction.
     * @param prevModule Previous module in the modules linked list.
     * @param module Module to be removed.
     */
    function disableModule(address prevModule, address module) external;

    /**
     * @notice Execute `operation` (0: Call, 1: DelegateCall) to `to` with `value` (Native Token)
     * @dev Function is virtual to allow overriding for L2 singleton to emit an event for indexing.
     * @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.
     * @return success Boolean flag indicating if the call succeeded.
     */
    function execTransactionFromModule(
        address to,
        uint256 value,
        bytes memory data,
        Enum.Operation operation
    ) external returns (bool success);

    /**
     * @notice Execute `operation` (0: Call, 1: DelegateCall) to `to` with `value` (Native Token) 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.
     * @return success Boolean flag indicating if the call succeeded.
     * @return returnData Data returned by the call.
     */
    function execTransactionFromModuleReturnData(
        address to,
        uint256 value,
        bytes memory data,
        Enum.Operation operation
    ) external returns (bool success, bytes memory returnData);

    /**
     * @notice Returns if an module is enabled
     * @return True if the module is enabled
     */
    function isModuleEnabled(address module) external view returns (bool);

    /**
     * @notice Returns an array of modules.
     *         If all entries fit into a single page, the next pointer will be 0x1.
     *         If another page is present, next will be the last element of the returned array.
     * @param start Start of the page. Has to be a module or start pointer (0x1 address)
     * @param pageSize Maximum number of modules that should be returned. Has to be > 0
     * @return array Array of modules.
     * @return next Start of the next page.
     */
    function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next);

    /**
     * @dev Set a module guard that checks transactions initiated by the module before execution
     *      This can only be done via a Safe transaction.
     *      ⚠️ IMPORTANT: Since a module guard has full power to block Safe transaction execution initiatied via a module,
     *        a broken module guard can cause a denial of service for the Safe modules. Make sure to carefully
     *        audit the module guard code and design recovery mechanisms.
     * @notice Set Module Guard `moduleGuard` for the Safe. Make sure you trust the module guard.
     * @param moduleGuard The address of the module guard to be used or the zero address to disable the module guard.
     */
    function setModuleGuard(address moduleGuard) external;
}

// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;

/**
 * @title IOwnerManager - Interface for contract which manages Safe owners and a threshold to authorize transactions.
 * @author @safe-global/safe-protocol
 */
interface IOwnerManager {
    event AddedOwner(address indexed owner);
    event RemovedOwner(address indexed owner);
    event ChangedThreshold(uint256 threshold);

    /**
     * @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.
     * @dev This can only be done via a Safe transaction.
     * @param owner New owner address.
     * @param _threshold New threshold.
     */
    function addOwnerWithThreshold(address owner, uint256 _threshold) external;

    /**
     * @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.
     * @dev This can only be done via a Safe transaction.
     * @param prevOwner Owner that pointed to the owner to be removed in the linked list
     * @param owner Owner address to be removed.
     * @param _threshold New threshold.
     */
    function removeOwner(address prevOwner, address owner, uint256 _threshold) external;

    /**
     * @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.
     * @dev This can only be done via a Safe transaction.
     * @param prevOwner Owner that pointed to the owner to be replaced in the linked list
     * @param oldOwner Owner address to be replaced.
     * @param newOwner New owner address.
     */
    function swapOwner(address prevOwner, address oldOwner, address newOwner) external;

    /**
     * @notice Changes the threshold of the Safe to `_threshold`.
     * @dev This can only be done via a Safe transaction.
     * @param _threshold New threshold.
     */
    function changeThreshold(uint256 _threshold) external;

    /**
     * @notice Returns the number of required confirmations for a Safe transaction aka the threshold.
     * @return Threshold number.
     */
    function getThreshold() external view returns (uint256);

    /**
     * @notice Returns if `owner` is an owner of the Safe.
     * @return Boolean if owner is an owner of the Safe.
     */
    function isOwner(address owner) external view returns (bool);

    /**
     * @notice Returns a list of Safe owners.
     * @return Array of Safe owners.
     */
    function getOwners() external view returns (address[] memory);
}

// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;

/**
 * @title IFallbackManager - A contract interface managing fallback calls made to this contract.
 * @author @safe-global/safe-protocol
 */
interface IFallbackManager {
    event ChangedFallbackHandler(address indexed handler);

    /**
     * @notice Set Fallback Handler to `handler` for the Safe.
     * @dev Only fallback calls without value and with data will be forwarded.
     *      This can only be done via a Safe transaction.
     *      Cannot be set to the Safe itself.
     * @param handler contract to handle fallback calls.
     */
    function setFallbackHandler(address handler) external;
}

// SPDX-License-Identifier: LGPL-3.0-only
/* solhint-disable one-contract-per-file */
pragma solidity >=0.7.0 <0.9.0;

/**
 * @title IGuardManager - A contract interface managing transaction guards which perform pre and post-checks on Safe transactions.
 * @author @safe-global/safe-protocol
 */
interface IGuardManager {
    event ChangedGuard(address indexed guard);

    /**
     * @dev Set a guard that checks transactions before execution
     *      This can only be done via a Safe transaction.
     *      ⚠️ IMPORTANT: Since a guard has full power to block Safe transaction execution,
     *        a broken guard can cause a denial of service for the Safe. Make sure to carefully
     *        audit the guard code and design recovery mechanisms.
     * @notice Set Transaction Guard `guard` for the Safe. Make sure you trust the guard.
     * @param guard The address of the guard to be used or the 0 address to disable the guard
     */
    function setGuard(address guard) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 13 of 17 : draft-IERC1822.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.20;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822Proxiable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol)

pragma solidity ^0.8.20;

import {IBeacon} from "../beacon/IBeacon.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 */
library ERC1967Utils {
    // We re-declare ERC-1967 events here because they can't be used directly from IERC1967.
    // This will be fixed in Solidity 0.8.21. At that point we should remove these events.
    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Emitted when the beacon is changed.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev The `implementation` of the proxy is invalid.
     */
    error ERC1967InvalidImplementation(address implementation);

    /**
     * @dev The `admin` of the proxy is invalid.
     */
    error ERC1967InvalidAdmin(address admin);

    /**
     * @dev The `beacon` of the proxy is invalid.
     */
    error ERC1967InvalidBeacon(address beacon);

    /**
     * @dev An upgrade function sees `msg.value > 0` that may be lost.
     */
    error ERC1967NonPayable();

    /**
     * @dev Returns the current implementation address.
     */
    function getImplementation() internal view returns (address) {
        return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        if (newImplementation.code.length == 0) {
            revert ERC1967InvalidImplementation(newImplementation);
        }
        StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Performs implementation upgrade with additional setup call if data is nonempty.
     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
     * to avoid stuck value in the contract.
     *
     * Emits an {IERC1967-Upgraded} event.
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);

        if (data.length > 0) {
            Address.functionDelegateCall(newImplementation, data);
        } else {
            _checkNonPayable();
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Returns the current admin.
     *
     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using
     * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
     */
    function getAdmin() internal view returns (address) {
        return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        if (newAdmin == address(0)) {
            revert ERC1967InvalidAdmin(address(0));
        }
        StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {IERC1967-AdminChanged} event.
     */
    function changeAdmin(address newAdmin) internal {
        emit AdminChanged(getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Returns the current beacon.
     */
    function getBeacon() internal view returns (address) {
        return StorageSlot.getAddressSlot(BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        if (newBeacon.code.length == 0) {
            revert ERC1967InvalidBeacon(newBeacon);
        }

        StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;

        address beaconImplementation = IBeacon(newBeacon).implementation();
        if (beaconImplementation.code.length == 0) {
            revert ERC1967InvalidImplementation(beaconImplementation);
        }
    }

    /**
     * @dev Change the beacon and trigger a setup call if data is nonempty.
     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
     * to avoid stuck value in the contract.
     *
     * Emits an {IERC1967-BeaconUpgraded} event.
     *
     * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
     * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
     * efficiency.
     */
    function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);

        if (data.length > 0) {
            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
        } else {
            _checkNonPayable();
        }
    }

    /**
     * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
     * if an upgrade doesn't perform an initialization call.
     */
    function _checkNonPayable() private {
        if (msg.value > 0) {
            revert ERC1967NonPayable();
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.20;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeacon {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {UpgradeableBeacon} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(newImplementation.code.length > 0);
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

Settings
{
  "remappings": [
    "eas-contracts/=lib/eas-contracts/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
    "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
    "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"MaxLvlReached","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"safe","type":"address"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"indexed":false,"internalType":"struct NounMetadata","name":"noun","type":"tuple"}],"name":"NounUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"safe","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"},{"indexed":false,"internalType":"string","name":"superChainId","type":"string"}],"name":"OwnerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"safe","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"},{"indexed":false,"internalType":"string","name":"superChainId","type":"string"}],"name":"OwnerPopulated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"safe","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"superChainId","type":"string"}],"name":"OwnerPopulationRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"points","type":"uint256"},{"indexed":false,"internalType":"bool","name":"levelUp","type":"bool"}],"name":"PointsIncremented","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"safe","type":"address"},{"indexed":true,"internalType":"address","name":"initialOwner","type":"address"},{"indexed":false,"internalType":"string","name":"superChainId","type":"string"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"indexed":false,"internalType":"struct NounMetadata","name":"noun","type":"tuple"}],"name":"SuperChainSmartAccountCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"treshold","type":"uint256"}],"name":"TierTresholdAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"TierTresholdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_safe","type":"address"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct NounMetadata","name":"_noun","type":"tuple"}],"name":"UpdateNounAvatar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"resolver","type":"address"}],"name":"_changeResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_safe","type":"address"},{"internalType":"address","name":"_newOwner","type":"address"}],"name":"addOwnerWithThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tresholds","type":"uint256[]"}],"name":"addTiersTreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_safe","type":"address"}],"name":"getNextLevelPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_safe","type":"address"}],"name":"getSuperChainAccount","outputs":[{"components":[{"internalType":"address","name":"smartAccount","type":"address"},{"internalType":"string","name":"superChainID","type":"string"},{"internalType":"uint256","name":"points","type":"uint256"},{"internalType":"uint16","name":"level","type":"uint16"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct NounMetadata","name":"noun","type":"tuple"}],"internalType":"struct ISuperChainModule.Account","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getUserSuperChainAccount","outputs":[{"components":[{"internalType":"address","name":"smartAccount","type":"address"},{"internalType":"string","name":"superChainID","type":"string"},{"internalType":"uint256","name":"points","type":"uint256"},{"internalType":"uint16","name":"level","type":"uint16"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct NounMetadata","name":"noun","type":"tuple"}],"internalType":"struct ISuperChainModule.Account","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"$","type":"address"}],"name":"hasFirstOwnerYet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_points","type":"uint256"},{"internalType":"address","name":"recipent","type":"address"}],"name":"incrementSuperChainPoints","outputs":[{"internalType":"bool","name":"levelUp","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"resolver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_safe","type":"address"},{"internalType":"address","name":"_newOwner","type":"address"}],"name":"populateAddOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"$","type":"address"}],"name":"populatedAddOwnersWithTreshold","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_safe","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"removePopulateRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_safe","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct NounMetadata","name":"_noun","type":"tuple"},{"internalType":"string","name":"superChainID","type":"string"}],"name":"setInitialOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_points","type":"uint256"},{"internalType":"address","name":"recipent","type":"address"}],"name":"simulateIncrementSuperChainPoints","outputs":[{"internalType":"bool","name":"levelUp","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"$","type":"address"}],"name":"superChainAccount","outputs":[{"components":[{"internalType":"address","name":"smartAccount","type":"address"},{"internalType":"string","name":"superChainID","type":"string"},{"internalType":"uint256","name":"points","type":"uint256"},{"internalType":"uint16","name":"level","type":"uint16"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct NounMetadata","name":"noun","type":"tuple"}],"internalType":"struct ISuperChainModule.Account","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"$","type":"string"}],"name":"superChainIDRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"updateTierThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"$","type":"address"}],"name":"userSuperChainAccount","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a06040523060805234801561001457600080fd5b5060805161364461003e600039600081816123d6015281816123ff015261254501526136446000f3fe6080604052600436106101665760003560e01c8063715018a6116100d1578063ad3cb1cc1161008a578063de5b649011610064578063de5b64901461045a578063df58b7141461047a578063e00a30ca1461049a578063f2fde38b146104ba57600080fd5b8063ad3cb1cc146103dc578063bb4a4d5f1461041a578063c7f5f1b21461043a57600080fd5b8063715018a614610316578063863cea311461032b5780638da5cb5b1461034b5780639071fa031461039c578063915076171461016b578063a581311a146103bc57600080fd5b806347ac32bc1161012357806347ac32bc14610250578063485cc9551461028057806349af6d21146102a05780634f1ef286146102c057806352d1902d146102d357806368902a21146102f657600080fd5b806311d4add81461016b57806314717656146101a157806329e1b4a6146101c357806329fa857b146101e3578063323e9e20146102035780633a629e3814610230575b600080fd5b34801561017757600080fd5b5061018b610186366004612a49565b6104da565b6040516101989190612ab6565b60405180910390f35b3480156101ad57600080fd5b506101c16101bc366004612b55565b61063a565b005b3480156101cf57600080fd5b506101c16101de366004612a49565b610ae6565b3480156101ef57600080fd5b506101c16101fe366004612b55565b610b1d565b34801561020f57600080fd5b5061022361021e366004612a49565b610fb2565b6040516101989190612b8e565b34801561023c57600080fd5b506101c161024b366004612bdb565b611039565b34801561025c57600080fd5b5061027061026b366004612bfd565b6111d0565b6040519015158152602001610198565b34801561028c57600080fd5b506101c161029b366004612b55565b6113c4565b3480156102ac57600080fd5b506102706102bb366004612bfd565b611504565b6101c16102ce366004612cc1565b611765565b3480156102df57600080fd5b506102e8611784565b604051908152602001610198565b34801561030257600080fd5b5061018b610311366004612a49565b6117a1565b34801561032257600080fd5b506101c1611809565b34801561033757600080fd5b50610270610346366004612a49565b61181d565b34801561035757600080fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03165b6040516001600160a01b039091168152602001610198565b3480156103a857600080fd5b506102e86103b7366004612a49565b61184d565b3480156103c857600080fd5b506103846103d7366004612a49565b6118ee565b3480156103e857600080fd5b5061040d604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516101989190612d25565b34801561042657600080fd5b506101c1610435366004612b55565b61191f565b34801561044657600080fd5b506101c1610455366004612d50565b611ccb565b34801561046657600080fd5b506101c1610475366004612d86565b611dbd565b34801561048657600080fd5b506101c1610495366004612e52565b61227e565b3480156104a657600080fd5b506102706104b5366004612ee8565b6122bc565b3480156104c657600080fd5b506101c16104d5366004612a49565b6122f5565b6104e26129e2565b60006104ec612333565b6001600160a01b038085166000908152600283016020908152604091829020825160a08101909352805490931682526001830180549495509193908401919061053490612f39565b80601f016020809104026020016040519081016040528092919081815260200182805461056090612f39565b80156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b50505091835250506002820154602080830191909152600383015461ffff16604080840191909152805160a08101825260049094015465ffffffffffff8082168652600160301b8204811693860193909352600160601b8104831691850191909152600160901b81048216606085810191909152600160c01b909104909116608084015201529392505050565b816000610645612333565b6001600160a01b038316600090815260048201602052604090205490915060ff166106b35760405162461bcd60e51b8152602060048201526019602482015278125b9a5d1a585b081bdddb995c881b9bdd081cd95d081e595d603a1b60448201526064015b60405180910390fd5b60006106bd612333565b9050336001600160a01b038516146107175760405162461bcd60e51b815260206004820152601b60248201527f43616c6c6572206973206e6f7420746865206e6577206f776e6572000000000060448201526064016106aa565b6001600160a01b038481166000908152600383016020526040902054161561078f5760405162461bcd60e51b815260206004820152602560248201527f4f776e657220616c7265616479206861732061205375706572436861696e416360448201526418dbdd5b9d60da1b60648201526084016106aa565b6001600160a01b038085166000908152602083815260408083209389168352929052205460ff166107f85760405162461bcd60e51b815260206004820152601360248201527213dddb995c881b9bdd081c1bdc1d5b185d1959606a1b60448201526064016106aa565b60005b6001600160a01b0386166000908152600183016020526040902054811015610956576001600160a01b03868116600090815260018401602052604090208054918716918390811061084e5761084e612f6d565b6000918252602090912001546001600160a01b03160361094e576001600160a01b0386166000908152600180840160205260409091208054909161089191612f99565b815481106108a1576108a1612f6d565b60009182526020808320909101546001600160a01b0389811684526001860190925260409092208054919092169190839081106108e0576108e0612f6d565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559188168152600184019091526040902080548061092757610927612fac565b600082815260209020810160001990810180546001600160a01b0319169055019055610956565b6001016107fb565b506040516001600160a01b03851660248201526001604482015260009060640160408051601f198184030181529181526020820180516001600160e01b0316630d582f1360e01b1790525163468721a760e01b81529091506000906001600160a01b0388169063468721a7906109d6908a90859087908290600401612fc2565b6020604051808303816000875af11580156109f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a199190613018565b905080610a5e5760405162461bcd60e51b81526020600482015260136024820152722330b4b632b2103a379030b2321037bbb732b960691b60448201526064016106aa565b6001600160a01b038681166000818152600386016020908152604080832080546001600160a01b031916958d169586179055848352600288019091529081902090519192917f33dc0a33e270fac4f7fedf95da9b3785804a3254ca898faf2903b0a71a44630991610ad591600191909101906130b7565b60405180910390a350505050505050565b610aee612357565b6000610af8612333565b60060180546001600160a01b0319166001600160a01b03939093169290921790915550565b6000610b27612333565b6001600160a01b038084166000908152602083815260408083209388168352929052205490915060ff16610b935760405162461bcd60e51b815260206004820152601360248201527213dddb995c881b9bdd081c1bdc1d5b185d1959606a1b60448201526064016106aa565b6040516317aa5fb760e11b81523360048201526001600160a01b03841690632f54bf6e90602401602060405180830381865afa158015610bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfb9190613018565b80610c275750336000908152602082815260408083206001600160a01b038716845290915290205460ff165b80610c3a5750336001600160a01b038416145b610ca05760405162461bcd60e51b815260206004820152603160248201527f5468652061646472657373206973206e6f7420616e206f776e6572206f7220746044820152703432903837b83ab630ba32b2103ab9b2b960791b60648201526084016106aa565b60005b6001600160a01b0384166000908152600183016020526040902054811015610fac576001600160a01b038481166000908152600184016020526040902080549185169183908110610cf657610cf6612f6d565b6000918252602090912001546001600160a01b031603610fa4576001600160a01b0380851660009081526002840160209081526040808320815160a0810190925280549094168152600184018054939491939192840191610d5690612f39565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8290612f39565b8015610dcf5780601f10610da457610100808354040283529160200191610dcf565b820191906000526020600020905b815481529060010190602001808311610db257829003601f168201915b50505091835250506002820154602080830191909152600383015461ffff16604080840191909152805160a08101825260049094015465ffffffffffff8082168652600160301b8204811686850152600160601b8204811686840152600160901b82048116606087810191909152600160c01b909204166080860152909201929092526001600160a01b0388166000908152600187810190935220805492935091610e7a9190612f99565b81548110610e8a57610e8a612f6d565b60009182526020808320909101546001600160a01b038881168452600187019092526040909220805491909216919084908110610ec957610ec9612f6d565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905591871681526001850190915260409020805480610f1057610f10612fac565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038681168084528683526040808520928a1680865292845293849020805460ff19169055918401519251919290917fd87abbd0d01d8789d03206975fc3bdec2f2a9adc804857cbf6e29fbc9228fab191610f9691612d25565b60405180910390a350610fac565b600101610ca3565b50505050565b60606000610fbe612333565b6001600160a01b0384166000908152600182016020908152604091829020805483518184028101840190945280845293945091929083018282801561102c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161100e575b5050505050915050919050565b611041612357565b600061104b612333565b600781015490915083106110975760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b60448201526064016106aa565b8215806110cc575081600782016110af600186612f99565b815481106110bf576110bf612f6d565b9060005260206000200154105b8015611119575060078101546110e490600190612f99565b8314806111195750600781016110fb8460016130ca565b8154811061110b5761110b612f6d565b906000526020600020015482105b6111655760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207468726573686f6c6420757064617465000000000000000060448201526064016106aa565b8181600701848154811061117b5761117b612f6d565b90600052602060002001819055507f6019d65ea999eded4e7791102f5334d9b285fc0b99da794d1376aff7e134897383836040516111c3929190918252602082015260400190565b60405180910390a1505050565b6000806111db612333565b6001600160a01b03848116600090815260028301602052604090206006830154929350911633146112615760405162461bcd60e51b815260206004820152602a60248201527f4f6e6c7920746865207265736f6c7665722063616e20696e6372656d656e742060448201526974686520706f696e747360b01b60648201526084016106aa565b80546001600160a01b03166112ac5760405162461bcd60e51b81526020600482015260116024820152701058d8dbdd5b9d081b9bdd08199bdd5b99607a1b60448201526064016106aa565b848160020160008282546112c091906130ca565b909155505060078201545b61ffff8116156113755760006112e26001836130dd565b90508260020154846007018261ffff168154811061130257611302612f6d565b9060005260206000200154116113625761131d8160016130ff565b600384015461ffff9182169116036113355750611375565b6113408160016130ff565b60038401805461ffff191661ffff929092169190911790555060019350611375565b508061136d8161311a565b9150506112cb565b506040805186815284151560208201526001600160a01b038616917f2d151a601709bde9ec15111d15aef75b707b25c919a69b25488e49a1ec3dda42910160405180910390a250505b92915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff1660008115801561140a5750825b905060008267ffffffffffffffff1660011480156114275750303b155b905081158015611435575080155b156114535760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561147d57845460ff60401b1916600160401b1785555b611486866123b2565b61148e6123c3565b6000611498612333565b60060180546001600160a01b0319166001600160a01b038a161790555083156114fb57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b60008061150f612333565b6001600160a01b0380851660009081526002830160209081526040808320815160a08101909252805490941681526001840180549596509294909392918401919061155990612f39565b80601f016020809104026020016040519081016040528092919081815260200182805461158590612f39565b80156115d25780601f106115a7576101008083540402835291602001916115d2565b820191906000526020600020905b8154815290600101906020018083116115b557829003601f168201915b50505091835250506002820154602080830191909152600383015461ffff16604080840191909152805160a08101825260049094015465ffffffffffff8082168652600160301b8204811693860193909352600160601b8104831691850191909152600160901b81048216606085810191909152600160c01b9091049091166080840152015280519091506001600160a01b03166116a65760405162461bcd60e51b81526020600482015260116024820152701058d8dbdd5b9d081b9bdd08199bdd5b99607a1b60448201526064016106aa565b84816040018181516116b891906130ca565b90525060078201545b61ffff81161561175c5760006116d86001836130dd565b90508260400151846007018261ffff16815481106116f8576116f8612f6d565b906000526020600020015411611749576117138160016130ff565b61ffff16836060015161ffff160361172b575061175c565b6117368160016130ff565b61ffff166060840152506001935061175c565b50806117548161311a565b9150506116c1565b50505092915050565b61176d6123cb565b61177682612470565b6117808282612478565b5050565b600061178e61253a565b506000805160206135ef83398151915290565b6117a96129e2565b60006117b3612333565b6001600160a01b0380851660009081526003830160209081526040808320548416835260028501825291829020825160a08101909352805490931682526001830180549495509193908401919061053490612f39565b611811612357565b61181b6000612583565b565b600080611828612333565b6001600160a01b03909316600090815260049093016020525050604090205460ff1690565b600080611858612333565b60078101546001600160a01b038516600090815260028301602052604090206003015491925061ffff909116036118a257604051632452cae560e21b815260040160405180910390fd5b6001600160a01b0383166000908152600282016020526040902060030154600782018054909161ffff169081106118db576118db612f6d565b9060005260206000200154915050919050565b6000806118f9612333565b6001600160a01b0393841660009081526003909101602052604090205490921692915050565b81600061192a612333565b6001600160a01b038316600090815260048201602052604090205490915060ff166119935760405162461bcd60e51b8152602060048201526019602482015278125b9a5d1a585b081bdddb995c881b9bdd081cd95d081e595d603a1b60448201526064016106aa565b600061199d612333565b9050336001600160a01b038616146119c75760405162461bcd60e51b81526004016106aa90613138565b6040516317aa5fb760e11b81526001600160a01b038581166004830152861690632f54bf6e90602401602060405180830381865afa158015611a0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a319190613018565b15611a755760405162461bcd60e51b81526020600482015260146024820152734f776e657220616c72656164792065786973747360601b60448201526064016106aa565b6001600160a01b038085166000908152602083815260408083209389168352929052205460ff1615611ae95760405162461bcd60e51b815260206004820152601760248201527f4f776e657220616c726561647920706f70756c6174656400000000000000000060448201526064016106aa565b6001600160a01b0384811660009081526003830160205260409020541615611b235760405162461bcd60e51b81526004016106aa90613180565b6001600160a01b038516600090815260018201602052604090205460021015611b855760405162461bcd60e51b815260206004820152601460248201527313585e081bdddb995c9cc81c1bdc1d5b185d195960621b60448201526064016106aa565b6001600160a01b038581166000818152600184810160209081526040808420805480850182559085528285200180546001600160a01b031916968b169687179055948352858152848320938352928352838220805460ff19168217905560028501909252918220018054611bf890612f39565b80601f0160208091040260200160405190810160405280929190818152602001828054611c2490612f39565b8015611c715780601f10611c4657610100808354040283529160200191611c71565b820191906000526020600020905b815481529060010190602001808311611c5457829003601f168201915b50505050509050846001600160a01b0316866001600160a01b03167f60131dc9f6c2c42ab3981975024a20016b34f7fe2f6f00954b76dd214269fd0483604051611cbb9190612d25565b60405180910390a3505050505050565b6000611cd5612333565b9050336001600160a01b03841614611d4b5760405162461bcd60e51b815260206004820152603360248201527f4f6e6c7920746865205375706572436861696e536d6172744163636f756e742060448201527231b0b7103ab83230ba32903a3432903737bab760691b60648201526084016106aa565b6001600160a01b038316600090815260028201602052604090208290600401611d7482826131eb565b905050826001600160a01b03167fa69d078ac3ce5a73075301b7c4a344a429ec2a4850b595d286e64bc5eba4c1bb83604051611db09190613371565b60405180910390a2505050565b6000611dc7612333565b6001600160a01b0386811660009081526003830160205260409020549192501615611e045760405162461bcd60e51b81526004016106aa90613180565b6040516317aa5fb760e11b81526001600160a01b038681166004830152871690632f54bf6e90602401602060405180830381865afa158015611e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6e9190613018565b611eba5760405162461bcd60e51b815260206004820152601b60248201527f5468652061646472657373206973206e6f7420616e206f776e6572000000000060448201526064016106aa565b336001600160a01b03871614611ee25760405162461bcd60e51b81526004016106aa90613138565b6001600160a01b038616600090815260048201602052604090205460ff1615611f1d5760405162461bcd60e51b81526004016106aa9061337f565b856001600160a01b031663a0e67e2b6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611f5b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f8391908101906133c8565b51600114611fa35760405162461bcd60e51b81526004016106aa9061337f565b611fe283838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506125f492505050565b156120465760405162461bcd60e51b815260206004820152602e60248201527f546865206c61737420313120636861726163746572732063616e6e6f7420626560448201526d20272e7375706572636861696e2760901b60648201526084016106aa565b80600501838360405161205a929190613457565b9081526040519081900360200190205460ff16156120c85760405162461bcd60e51b815260206004820152602560248201527f546865207375706572636861696e204944207761732072656769737465726564604482015264103cb2ba1760d91b60648201526084016106aa565b6001600160a01b038087166000818152600284016020908152604080832080546001600160a01b03199081168617909155948a1683526003860182529182902080549094169092179092559051612123918591859101613467565b60408051601f198184030181529181526001600160a01b038816600090815260028401602052206001019061215890826134d7565b50600181600501848460405161216f929190613457565b90815260408051918290036020908101909220805493151560ff199485161790556001600160a01b03891660009081526004808601845282822080549095166001179094556002850190925290208591016121ca82826131eb565b50506001600160a01b038681166000818152600284016020526040908190209051928816927f33dc0a33e270fac4f7fedf95da9b3785804a3254ca898faf2903b0a71a44630991612220916001909101906130b7565b60405180910390a36001600160a01b038681166000818152600284016020526040908190209051928816927f0a5d972a5244562acfb6aa8d72135ab795a59b73be0b377b8143b14b3f4d097d91611cbb916001909101908990613597565b612286612357565b60005b8151811015611780576122b48282815181106122a7576122a7612f6d565b60200260200101516126bf565b600101612289565b6000806122c7612333565b905080600501836040516122db91906135b9565b9081526040519081900360200190205460ff169392505050565b6122fd612357565b6001600160a01b03811661232757604051631e4fbdf760e01b8152600060048201526024016106aa565b61233081612583565b50565b7f0b2be64e6582d1593e5ce87fbed66eec9268226484384723dab2b56b70de060090565b336123897f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461181b5760405163118cdaa760e01b81523360048201526024016106aa565b6123ba6127b9565b61233081612802565b61181b6127b9565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061245257507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166124466000805160206135ef833981519152546001600160a01b031690565b6001600160a01b031614155b1561181b5760405163703e46dd60e11b815260040160405180910390fd5b612330612357565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156124d2575060408051601f3d908101601f191682019092526124cf918101906135d5565b60015b6124fa57604051634c9c8ce360e01b81526001600160a01b03831660048201526024016106aa565b6000805160206135ef833981519152811461252b57604051632a87526960e21b8152600481018290526024016106aa565b612535838361280a565b505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461181b5760405163703e46dd60e11b815260040160405180910390fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60408051808201909152600b8082526a1739bab832b931b430b4b760a91b60208301528251600092849290911015612630575060009392505050565b60005b81518110156126b45781818151811061264e5761264e612f6d565b602001015160f81c60f81b6001600160f81b0319168382845186516126739190612f99565b61267d91906130ca565b8151811061268d5761268d612f6d565b01602001516001600160f81b031916146126ac57506000949350505050565b600101612633565b506001949350505050565b60006126c9612333565b600781015490915015612769576007810180548391906126eb90600190612f99565b815481106126fb576126fb612f6d565b9060005260206000200154106127695760405162461bcd60e51b815260206004820152602d60248201527f5468652074726573686f6c64206d75737420626520686967686572207468616e60448201526c20746865206c617374206f6e6560981b60648201526084016106aa565b6007810180546001810182556000918252602091829020018390556040518381527fe926b64b58fc01d6d94803baecf75651107a598eb208bf395c14391d855ad356910160405180910390a15050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661181b57604051631afcd79f60e31b815260040160405180910390fd5b6122fd6127b9565b61281382612860565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156128585761253582826128c5565b61178061293b565b806001600160a01b03163b60000361289657604051634c9c8ce360e01b81526001600160a01b03821660048201526024016106aa565b6000805160206135ef83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516128e291906135b9565b600060405180830381855af49150503d806000811461291d576040519150601f19603f3d011682016040523d82523d6000602084013e612922565b606091505b509150915061293285838361295a565b95945050505050565b341561181b5760405163b398979f60e01b815260040160405180910390fd5b60608261296f5761296a826129b9565b6129b2565b815115801561298657506001600160a01b0384163b155b156129af57604051639996b31560e01b81526001600160a01b03851660048201526024016106aa565b50805b9392505050565b8051156129c95780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6040805160a08082018352600080835260606020808501829052848601839052818501839052855193840186528284528301829052938201819052928101839052608081810193909352909182015290565b6001600160a01b038116811461233057600080fd5b600060208284031215612a5b57600080fd5b81356129b281612a34565b60005b83811015612a81578181015183820152602001612a69565b50506000910152565b60008151808452612aa2816020860160208601612a66565b601f01601f19169290920160200192915050565b602080825282516001600160a01b0316828201528201516101206040830181905260009190612ae9610140850183612a8a565b91506040850151606085015261ffff6060860151166080850152608085015165ffffffffffff8082511660a08701528060208301511660c08701528060408301511660e08701528060608301511661010087015280608083015116838701525050508091505092915050565b60008060408385031215612b6857600080fd5b8235612b7381612a34565b91506020830135612b8381612a34565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612bcf5783516001600160a01b031683529284019291840191600101612baa565b50909695505050505050565b60008060408385031215612bee57600080fd5b50508035926020909101359150565b60008060408385031215612c1057600080fd5b823591506020830135612b8381612a34565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c6157612c61612c22565b604052919050565b600067ffffffffffffffff831115612c8357612c83612c22565b612c96601f8401601f1916602001612c38565b9050828152838383011115612caa57600080fd5b828260208301376000602084830101529392505050565b60008060408385031215612cd457600080fd5b8235612cdf81612a34565b9150602083013567ffffffffffffffff811115612cfb57600080fd5b8301601f81018513612d0c57600080fd5b612d1b85823560208401612c69565b9150509250929050565b6020815260006129b26020830184612a8a565b600060a08284031215612d4a57600080fd5b50919050565b60008060c08385031215612d6357600080fd5b8235612d6e81612a34565b9150612d7d8460208501612d38565b90509250929050565b60008060008060006101008688031215612d9f57600080fd5b8535612daa81612a34565b94506020860135612dba81612a34565b9350612dc98760408801612d38565b925060e086013567ffffffffffffffff80821115612de657600080fd5b818801915088601f830112612dfa57600080fd5b813581811115612e0957600080fd5b896020828501011115612e1b57600080fd5b9699959850939650602001949392505050565b600067ffffffffffffffff821115612e4857612e48612c22565b5060051b60200190565b60006020808385031215612e6557600080fd5b823567ffffffffffffffff811115612e7c57600080fd5b8301601f81018513612e8d57600080fd5b8035612ea0612e9b82612e2e565b612c38565b81815260059190911b82018301908381019087831115612ebf57600080fd5b928401925b82841015612edd57833582529284019290840190612ec4565b979650505050505050565b600060208284031215612efa57600080fd5b813567ffffffffffffffff811115612f1157600080fd5b8201601f81018413612f2257600080fd5b612f3184823560208401612c69565b949350505050565b600181811c90821680612f4d57607f821691505b602082108103612d4a57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156113be576113be612f83565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0385168152836020820152608060408201526000612fe96080830185612a8a565b90506002831061300957634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b60006020828403121561302a57600080fd5b815180151581146129b257600080fd5b6000815461304781612f39565b808552602060018381168015613064576001811461307e576130ac565b60ff1985168884015283151560051b8801830195506130ac565b866000528260002060005b858110156130a45781548a8201860152908301908401613089565b890184019650505b505050505092915050565b6020815260006129b2602083018461303a565b808201808211156113be576113be612f83565b61ffff8281168282160390808211156130f8576130f8612f83565b5092915050565b61ffff8181168382160190808211156130f8576130f8612f83565b600061ffff82168061312e5761312e612f83565b6000190192915050565b60208082526028908201527f43616c6c6572206973206e6f7420746865205375706572436861696e536d61726040820152671d1058d8dbdd5b9d60c21b606082015260800190565b6020808252602a908201527f4f776e657220616c7265616479206861732061205375706572436861696e536d604082015269185c9d1058d8dbdd5b9d60b21b606082015260800190565b65ffffffffffff8116811461233057600080fd5b600081356113be816131ca565b81356131f6816131ca565b65ffffffffffff8116905081548165ffffffffffff198216178355602084013561321f816131ca565b6bffffffffffff0000000000008160301b16905080836bffffffffffffffffffffffff198416171784556040850135613257816131ca565b65ffffffffffff60601b8160601b1690508371ffffffffffffffffffffffffffffffffffff1984161793508084831717855560608601359250613299836131ca565b65ffffffffffff60901b1993909316179190911760909190911b65ffffffffffff60901b161781556117806132d0608084016131de565b82805465ffffffffffff60c01b191660c09290921b65ffffffffffff60c01b16919091179055565b8035613303816131ca565b65ffffffffffff908116835260208201359061331e826131ca565b9081166020840152604082013590613335826131ca565b908116604084015260608201359061334c826131ca565b9081166060840152608082013590613363826131ca565b808216608085015250505050565b60a081016113be82846132f8565b60208082526029908201527f5375706572436861696e536d6172744163636f756e7420616c726561647920686040820152686173206f776e65727360b81b606082015260800190565b600060208083850312156133db57600080fd5b825167ffffffffffffffff8111156133f257600080fd5b8301601f8101851361340357600080fd5b8051613411612e9b82612e2e565b81815260059190911b8201830190838101908783111561343057600080fd5b928401925b82841015612edd57835161344881612a34565b82529284019290840190613435565b8183823760009101908152919050565b818382376a1739bab832b931b430b4b760a91b9101908152600b01919050565b601f821115612535576000816000526020600020601f850160051c810160208610156134b05750805b601f850160051c820191505b818110156134cf578281556001016134bc565b505050505050565b815167ffffffffffffffff8111156134f1576134f1612c22565b613505816134ff8454612f39565b84613487565b602080601f83116001811461353a57600084156135225750858301515b600019600386901b1c1916600185901b1785556134cf565b600085815260208120601f198616915b828110156135695788860151825594840194600190910190840161354a565b50858210156135875787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60c0815260006135aa60c083018561303a565b90506129b260208301846132f8565b600082516135cb818460208701612a66565b9190910192915050565b6000602082840312156135e757600080fd5b505191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204178c8847a133f470cd15388647ac67a00c5dcaa84552cdd1adfa6e34b68ec7b64736f6c63430008170033

Deployed Bytecode

0x6080604052600436106101665760003560e01c8063715018a6116100d1578063ad3cb1cc1161008a578063de5b649011610064578063de5b64901461045a578063df58b7141461047a578063e00a30ca1461049a578063f2fde38b146104ba57600080fd5b8063ad3cb1cc146103dc578063bb4a4d5f1461041a578063c7f5f1b21461043a57600080fd5b8063715018a614610316578063863cea311461032b5780638da5cb5b1461034b5780639071fa031461039c578063915076171461016b578063a581311a146103bc57600080fd5b806347ac32bc1161012357806347ac32bc14610250578063485cc9551461028057806349af6d21146102a05780634f1ef286146102c057806352d1902d146102d357806368902a21146102f657600080fd5b806311d4add81461016b57806314717656146101a157806329e1b4a6146101c357806329fa857b146101e3578063323e9e20146102035780633a629e3814610230575b600080fd5b34801561017757600080fd5b5061018b610186366004612a49565b6104da565b6040516101989190612ab6565b60405180910390f35b3480156101ad57600080fd5b506101c16101bc366004612b55565b61063a565b005b3480156101cf57600080fd5b506101c16101de366004612a49565b610ae6565b3480156101ef57600080fd5b506101c16101fe366004612b55565b610b1d565b34801561020f57600080fd5b5061022361021e366004612a49565b610fb2565b6040516101989190612b8e565b34801561023c57600080fd5b506101c161024b366004612bdb565b611039565b34801561025c57600080fd5b5061027061026b366004612bfd565b6111d0565b6040519015158152602001610198565b34801561028c57600080fd5b506101c161029b366004612b55565b6113c4565b3480156102ac57600080fd5b506102706102bb366004612bfd565b611504565b6101c16102ce366004612cc1565b611765565b3480156102df57600080fd5b506102e8611784565b604051908152602001610198565b34801561030257600080fd5b5061018b610311366004612a49565b6117a1565b34801561032257600080fd5b506101c1611809565b34801561033757600080fd5b50610270610346366004612a49565b61181d565b34801561035757600080fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03165b6040516001600160a01b039091168152602001610198565b3480156103a857600080fd5b506102e86103b7366004612a49565b61184d565b3480156103c857600080fd5b506103846103d7366004612a49565b6118ee565b3480156103e857600080fd5b5061040d604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516101989190612d25565b34801561042657600080fd5b506101c1610435366004612b55565b61191f565b34801561044657600080fd5b506101c1610455366004612d50565b611ccb565b34801561046657600080fd5b506101c1610475366004612d86565b611dbd565b34801561048657600080fd5b506101c1610495366004612e52565b61227e565b3480156104a657600080fd5b506102706104b5366004612ee8565b6122bc565b3480156104c657600080fd5b506101c16104d5366004612a49565b6122f5565b6104e26129e2565b60006104ec612333565b6001600160a01b038085166000908152600283016020908152604091829020825160a08101909352805490931682526001830180549495509193908401919061053490612f39565b80601f016020809104026020016040519081016040528092919081815260200182805461056090612f39565b80156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b50505091835250506002820154602080830191909152600383015461ffff16604080840191909152805160a08101825260049094015465ffffffffffff8082168652600160301b8204811693860193909352600160601b8104831691850191909152600160901b81048216606085810191909152600160c01b909104909116608084015201529392505050565b816000610645612333565b6001600160a01b038316600090815260048201602052604090205490915060ff166106b35760405162461bcd60e51b8152602060048201526019602482015278125b9a5d1a585b081bdddb995c881b9bdd081cd95d081e595d603a1b60448201526064015b60405180910390fd5b60006106bd612333565b9050336001600160a01b038516146107175760405162461bcd60e51b815260206004820152601b60248201527f43616c6c6572206973206e6f7420746865206e6577206f776e6572000000000060448201526064016106aa565b6001600160a01b038481166000908152600383016020526040902054161561078f5760405162461bcd60e51b815260206004820152602560248201527f4f776e657220616c7265616479206861732061205375706572436861696e416360448201526418dbdd5b9d60da1b60648201526084016106aa565b6001600160a01b038085166000908152602083815260408083209389168352929052205460ff166107f85760405162461bcd60e51b815260206004820152601360248201527213dddb995c881b9bdd081c1bdc1d5b185d1959606a1b60448201526064016106aa565b60005b6001600160a01b0386166000908152600183016020526040902054811015610956576001600160a01b03868116600090815260018401602052604090208054918716918390811061084e5761084e612f6d565b6000918252602090912001546001600160a01b03160361094e576001600160a01b0386166000908152600180840160205260409091208054909161089191612f99565b815481106108a1576108a1612f6d565b60009182526020808320909101546001600160a01b0389811684526001860190925260409092208054919092169190839081106108e0576108e0612f6d565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559188168152600184019091526040902080548061092757610927612fac565b600082815260209020810160001990810180546001600160a01b0319169055019055610956565b6001016107fb565b506040516001600160a01b03851660248201526001604482015260009060640160408051601f198184030181529181526020820180516001600160e01b0316630d582f1360e01b1790525163468721a760e01b81529091506000906001600160a01b0388169063468721a7906109d6908a90859087908290600401612fc2565b6020604051808303816000875af11580156109f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a199190613018565b905080610a5e5760405162461bcd60e51b81526020600482015260136024820152722330b4b632b2103a379030b2321037bbb732b960691b60448201526064016106aa565b6001600160a01b038681166000818152600386016020908152604080832080546001600160a01b031916958d169586179055848352600288019091529081902090519192917f33dc0a33e270fac4f7fedf95da9b3785804a3254ca898faf2903b0a71a44630991610ad591600191909101906130b7565b60405180910390a350505050505050565b610aee612357565b6000610af8612333565b60060180546001600160a01b0319166001600160a01b03939093169290921790915550565b6000610b27612333565b6001600160a01b038084166000908152602083815260408083209388168352929052205490915060ff16610b935760405162461bcd60e51b815260206004820152601360248201527213dddb995c881b9bdd081c1bdc1d5b185d1959606a1b60448201526064016106aa565b6040516317aa5fb760e11b81523360048201526001600160a01b03841690632f54bf6e90602401602060405180830381865afa158015610bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfb9190613018565b80610c275750336000908152602082815260408083206001600160a01b038716845290915290205460ff165b80610c3a5750336001600160a01b038416145b610ca05760405162461bcd60e51b815260206004820152603160248201527f5468652061646472657373206973206e6f7420616e206f776e6572206f7220746044820152703432903837b83ab630ba32b2103ab9b2b960791b60648201526084016106aa565b60005b6001600160a01b0384166000908152600183016020526040902054811015610fac576001600160a01b038481166000908152600184016020526040902080549185169183908110610cf657610cf6612f6d565b6000918252602090912001546001600160a01b031603610fa4576001600160a01b0380851660009081526002840160209081526040808320815160a0810190925280549094168152600184018054939491939192840191610d5690612f39565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8290612f39565b8015610dcf5780601f10610da457610100808354040283529160200191610dcf565b820191906000526020600020905b815481529060010190602001808311610db257829003601f168201915b50505091835250506002820154602080830191909152600383015461ffff16604080840191909152805160a08101825260049094015465ffffffffffff8082168652600160301b8204811686850152600160601b8204811686840152600160901b82048116606087810191909152600160c01b909204166080860152909201929092526001600160a01b0388166000908152600187810190935220805492935091610e7a9190612f99565b81548110610e8a57610e8a612f6d565b60009182526020808320909101546001600160a01b038881168452600187019092526040909220805491909216919084908110610ec957610ec9612f6d565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905591871681526001850190915260409020805480610f1057610f10612fac565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038681168084528683526040808520928a1680865292845293849020805460ff19169055918401519251919290917fd87abbd0d01d8789d03206975fc3bdec2f2a9adc804857cbf6e29fbc9228fab191610f9691612d25565b60405180910390a350610fac565b600101610ca3565b50505050565b60606000610fbe612333565b6001600160a01b0384166000908152600182016020908152604091829020805483518184028101840190945280845293945091929083018282801561102c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161100e575b5050505050915050919050565b611041612357565b600061104b612333565b600781015490915083106110975760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b60448201526064016106aa565b8215806110cc575081600782016110af600186612f99565b815481106110bf576110bf612f6d565b9060005260206000200154105b8015611119575060078101546110e490600190612f99565b8314806111195750600781016110fb8460016130ca565b8154811061110b5761110b612f6d565b906000526020600020015482105b6111655760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207468726573686f6c6420757064617465000000000000000060448201526064016106aa565b8181600701848154811061117b5761117b612f6d565b90600052602060002001819055507f6019d65ea999eded4e7791102f5334d9b285fc0b99da794d1376aff7e134897383836040516111c3929190918252602082015260400190565b60405180910390a1505050565b6000806111db612333565b6001600160a01b03848116600090815260028301602052604090206006830154929350911633146112615760405162461bcd60e51b815260206004820152602a60248201527f4f6e6c7920746865207265736f6c7665722063616e20696e6372656d656e742060448201526974686520706f696e747360b01b60648201526084016106aa565b80546001600160a01b03166112ac5760405162461bcd60e51b81526020600482015260116024820152701058d8dbdd5b9d081b9bdd08199bdd5b99607a1b60448201526064016106aa565b848160020160008282546112c091906130ca565b909155505060078201545b61ffff8116156113755760006112e26001836130dd565b90508260020154846007018261ffff168154811061130257611302612f6d565b9060005260206000200154116113625761131d8160016130ff565b600384015461ffff9182169116036113355750611375565b6113408160016130ff565b60038401805461ffff191661ffff929092169190911790555060019350611375565b508061136d8161311a565b9150506112cb565b506040805186815284151560208201526001600160a01b038616917f2d151a601709bde9ec15111d15aef75b707b25c919a69b25488e49a1ec3dda42910160405180910390a250505b92915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff1660008115801561140a5750825b905060008267ffffffffffffffff1660011480156114275750303b155b905081158015611435575080155b156114535760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561147d57845460ff60401b1916600160401b1785555b611486866123b2565b61148e6123c3565b6000611498612333565b60060180546001600160a01b0319166001600160a01b038a161790555083156114fb57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b60008061150f612333565b6001600160a01b0380851660009081526002830160209081526040808320815160a08101909252805490941681526001840180549596509294909392918401919061155990612f39565b80601f016020809104026020016040519081016040528092919081815260200182805461158590612f39565b80156115d25780601f106115a7576101008083540402835291602001916115d2565b820191906000526020600020905b8154815290600101906020018083116115b557829003601f168201915b50505091835250506002820154602080830191909152600383015461ffff16604080840191909152805160a08101825260049094015465ffffffffffff8082168652600160301b8204811693860193909352600160601b8104831691850191909152600160901b81048216606085810191909152600160c01b9091049091166080840152015280519091506001600160a01b03166116a65760405162461bcd60e51b81526020600482015260116024820152701058d8dbdd5b9d081b9bdd08199bdd5b99607a1b60448201526064016106aa565b84816040018181516116b891906130ca565b90525060078201545b61ffff81161561175c5760006116d86001836130dd565b90508260400151846007018261ffff16815481106116f8576116f8612f6d565b906000526020600020015411611749576117138160016130ff565b61ffff16836060015161ffff160361172b575061175c565b6117368160016130ff565b61ffff166060840152506001935061175c565b50806117548161311a565b9150506116c1565b50505092915050565b61176d6123cb565b61177682612470565b6117808282612478565b5050565b600061178e61253a565b506000805160206135ef83398151915290565b6117a96129e2565b60006117b3612333565b6001600160a01b0380851660009081526003830160209081526040808320548416835260028501825291829020825160a08101909352805490931682526001830180549495509193908401919061053490612f39565b611811612357565b61181b6000612583565b565b600080611828612333565b6001600160a01b03909316600090815260049093016020525050604090205460ff1690565b600080611858612333565b60078101546001600160a01b038516600090815260028301602052604090206003015491925061ffff909116036118a257604051632452cae560e21b815260040160405180910390fd5b6001600160a01b0383166000908152600282016020526040902060030154600782018054909161ffff169081106118db576118db612f6d565b9060005260206000200154915050919050565b6000806118f9612333565b6001600160a01b0393841660009081526003909101602052604090205490921692915050565b81600061192a612333565b6001600160a01b038316600090815260048201602052604090205490915060ff166119935760405162461bcd60e51b8152602060048201526019602482015278125b9a5d1a585b081bdddb995c881b9bdd081cd95d081e595d603a1b60448201526064016106aa565b600061199d612333565b9050336001600160a01b038616146119c75760405162461bcd60e51b81526004016106aa90613138565b6040516317aa5fb760e11b81526001600160a01b038581166004830152861690632f54bf6e90602401602060405180830381865afa158015611a0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a319190613018565b15611a755760405162461bcd60e51b81526020600482015260146024820152734f776e657220616c72656164792065786973747360601b60448201526064016106aa565b6001600160a01b038085166000908152602083815260408083209389168352929052205460ff1615611ae95760405162461bcd60e51b815260206004820152601760248201527f4f776e657220616c726561647920706f70756c6174656400000000000000000060448201526064016106aa565b6001600160a01b0384811660009081526003830160205260409020541615611b235760405162461bcd60e51b81526004016106aa90613180565b6001600160a01b038516600090815260018201602052604090205460021015611b855760405162461bcd60e51b815260206004820152601460248201527313585e081bdddb995c9cc81c1bdc1d5b185d195960621b60448201526064016106aa565b6001600160a01b038581166000818152600184810160209081526040808420805480850182559085528285200180546001600160a01b031916968b169687179055948352858152848320938352928352838220805460ff19168217905560028501909252918220018054611bf890612f39565b80601f0160208091040260200160405190810160405280929190818152602001828054611c2490612f39565b8015611c715780601f10611c4657610100808354040283529160200191611c71565b820191906000526020600020905b815481529060010190602001808311611c5457829003601f168201915b50505050509050846001600160a01b0316866001600160a01b03167f60131dc9f6c2c42ab3981975024a20016b34f7fe2f6f00954b76dd214269fd0483604051611cbb9190612d25565b60405180910390a3505050505050565b6000611cd5612333565b9050336001600160a01b03841614611d4b5760405162461bcd60e51b815260206004820152603360248201527f4f6e6c7920746865205375706572436861696e536d6172744163636f756e742060448201527231b0b7103ab83230ba32903a3432903737bab760691b60648201526084016106aa565b6001600160a01b038316600090815260028201602052604090208290600401611d7482826131eb565b905050826001600160a01b03167fa69d078ac3ce5a73075301b7c4a344a429ec2a4850b595d286e64bc5eba4c1bb83604051611db09190613371565b60405180910390a2505050565b6000611dc7612333565b6001600160a01b0386811660009081526003830160205260409020549192501615611e045760405162461bcd60e51b81526004016106aa90613180565b6040516317aa5fb760e11b81526001600160a01b038681166004830152871690632f54bf6e90602401602060405180830381865afa158015611e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6e9190613018565b611eba5760405162461bcd60e51b815260206004820152601b60248201527f5468652061646472657373206973206e6f7420616e206f776e6572000000000060448201526064016106aa565b336001600160a01b03871614611ee25760405162461bcd60e51b81526004016106aa90613138565b6001600160a01b038616600090815260048201602052604090205460ff1615611f1d5760405162461bcd60e51b81526004016106aa9061337f565b856001600160a01b031663a0e67e2b6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611f5b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f8391908101906133c8565b51600114611fa35760405162461bcd60e51b81526004016106aa9061337f565b611fe283838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506125f492505050565b156120465760405162461bcd60e51b815260206004820152602e60248201527f546865206c61737420313120636861726163746572732063616e6e6f7420626560448201526d20272e7375706572636861696e2760901b60648201526084016106aa565b80600501838360405161205a929190613457565b9081526040519081900360200190205460ff16156120c85760405162461bcd60e51b815260206004820152602560248201527f546865207375706572636861696e204944207761732072656769737465726564604482015264103cb2ba1760d91b60648201526084016106aa565b6001600160a01b038087166000818152600284016020908152604080832080546001600160a01b03199081168617909155948a1683526003860182529182902080549094169092179092559051612123918591859101613467565b60408051601f198184030181529181526001600160a01b038816600090815260028401602052206001019061215890826134d7565b50600181600501848460405161216f929190613457565b90815260408051918290036020908101909220805493151560ff199485161790556001600160a01b03891660009081526004808601845282822080549095166001179094556002850190925290208591016121ca82826131eb565b50506001600160a01b038681166000818152600284016020526040908190209051928816927f33dc0a33e270fac4f7fedf95da9b3785804a3254ca898faf2903b0a71a44630991612220916001909101906130b7565b60405180910390a36001600160a01b038681166000818152600284016020526040908190209051928816927f0a5d972a5244562acfb6aa8d72135ab795a59b73be0b377b8143b14b3f4d097d91611cbb916001909101908990613597565b612286612357565b60005b8151811015611780576122b48282815181106122a7576122a7612f6d565b60200260200101516126bf565b600101612289565b6000806122c7612333565b905080600501836040516122db91906135b9565b9081526040519081900360200190205460ff169392505050565b6122fd612357565b6001600160a01b03811661232757604051631e4fbdf760e01b8152600060048201526024016106aa565b61233081612583565b50565b7f0b2be64e6582d1593e5ce87fbed66eec9268226484384723dab2b56b70de060090565b336123897f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461181b5760405163118cdaa760e01b81523360048201526024016106aa565b6123ba6127b9565b61233081612802565b61181b6127b9565b306001600160a01b037f0000000000000000000000001ee397850c3ca629d965453b3cf102e9a8806ded16148061245257507f0000000000000000000000001ee397850c3ca629d965453b3cf102e9a8806ded6001600160a01b03166124466000805160206135ef833981519152546001600160a01b031690565b6001600160a01b031614155b1561181b5760405163703e46dd60e11b815260040160405180910390fd5b612330612357565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156124d2575060408051601f3d908101601f191682019092526124cf918101906135d5565b60015b6124fa57604051634c9c8ce360e01b81526001600160a01b03831660048201526024016106aa565b6000805160206135ef833981519152811461252b57604051632a87526960e21b8152600481018290526024016106aa565b612535838361280a565b505050565b306001600160a01b037f0000000000000000000000001ee397850c3ca629d965453b3cf102e9a8806ded161461181b5760405163703e46dd60e11b815260040160405180910390fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60408051808201909152600b8082526a1739bab832b931b430b4b760a91b60208301528251600092849290911015612630575060009392505050565b60005b81518110156126b45781818151811061264e5761264e612f6d565b602001015160f81c60f81b6001600160f81b0319168382845186516126739190612f99565b61267d91906130ca565b8151811061268d5761268d612f6d565b01602001516001600160f81b031916146126ac57506000949350505050565b600101612633565b506001949350505050565b60006126c9612333565b600781015490915015612769576007810180548391906126eb90600190612f99565b815481106126fb576126fb612f6d565b9060005260206000200154106127695760405162461bcd60e51b815260206004820152602d60248201527f5468652074726573686f6c64206d75737420626520686967686572207468616e60448201526c20746865206c617374206f6e6560981b60648201526084016106aa565b6007810180546001810182556000918252602091829020018390556040518381527fe926b64b58fc01d6d94803baecf75651107a598eb208bf395c14391d855ad356910160405180910390a15050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661181b57604051631afcd79f60e31b815260040160405180910390fd5b6122fd6127b9565b61281382612860565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156128585761253582826128c5565b61178061293b565b806001600160a01b03163b60000361289657604051634c9c8ce360e01b81526001600160a01b03821660048201526024016106aa565b6000805160206135ef83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516128e291906135b9565b600060405180830381855af49150503d806000811461291d576040519150601f19603f3d011682016040523d82523d6000602084013e612922565b606091505b509150915061293285838361295a565b95945050505050565b341561181b5760405163b398979f60e01b815260040160405180910390fd5b60608261296f5761296a826129b9565b6129b2565b815115801561298657506001600160a01b0384163b155b156129af57604051639996b31560e01b81526001600160a01b03851660048201526024016106aa565b50805b9392505050565b8051156129c95780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6040805160a08082018352600080835260606020808501829052848601839052818501839052855193840186528284528301829052938201819052928101839052608081810193909352909182015290565b6001600160a01b038116811461233057600080fd5b600060208284031215612a5b57600080fd5b81356129b281612a34565b60005b83811015612a81578181015183820152602001612a69565b50506000910152565b60008151808452612aa2816020860160208601612a66565b601f01601f19169290920160200192915050565b602080825282516001600160a01b0316828201528201516101206040830181905260009190612ae9610140850183612a8a565b91506040850151606085015261ffff6060860151166080850152608085015165ffffffffffff8082511660a08701528060208301511660c08701528060408301511660e08701528060608301511661010087015280608083015116838701525050508091505092915050565b60008060408385031215612b6857600080fd5b8235612b7381612a34565b91506020830135612b8381612a34565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612bcf5783516001600160a01b031683529284019291840191600101612baa565b50909695505050505050565b60008060408385031215612bee57600080fd5b50508035926020909101359150565b60008060408385031215612c1057600080fd5b823591506020830135612b8381612a34565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c6157612c61612c22565b604052919050565b600067ffffffffffffffff831115612c8357612c83612c22565b612c96601f8401601f1916602001612c38565b9050828152838383011115612caa57600080fd5b828260208301376000602084830101529392505050565b60008060408385031215612cd457600080fd5b8235612cdf81612a34565b9150602083013567ffffffffffffffff811115612cfb57600080fd5b8301601f81018513612d0c57600080fd5b612d1b85823560208401612c69565b9150509250929050565b6020815260006129b26020830184612a8a565b600060a08284031215612d4a57600080fd5b50919050565b60008060c08385031215612d6357600080fd5b8235612d6e81612a34565b9150612d7d8460208501612d38565b90509250929050565b60008060008060006101008688031215612d9f57600080fd5b8535612daa81612a34565b94506020860135612dba81612a34565b9350612dc98760408801612d38565b925060e086013567ffffffffffffffff80821115612de657600080fd5b818801915088601f830112612dfa57600080fd5b813581811115612e0957600080fd5b896020828501011115612e1b57600080fd5b9699959850939650602001949392505050565b600067ffffffffffffffff821115612e4857612e48612c22565b5060051b60200190565b60006020808385031215612e6557600080fd5b823567ffffffffffffffff811115612e7c57600080fd5b8301601f81018513612e8d57600080fd5b8035612ea0612e9b82612e2e565b612c38565b81815260059190911b82018301908381019087831115612ebf57600080fd5b928401925b82841015612edd57833582529284019290840190612ec4565b979650505050505050565b600060208284031215612efa57600080fd5b813567ffffffffffffffff811115612f1157600080fd5b8201601f81018413612f2257600080fd5b612f3184823560208401612c69565b949350505050565b600181811c90821680612f4d57607f821691505b602082108103612d4a57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156113be576113be612f83565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0385168152836020820152608060408201526000612fe96080830185612a8a565b90506002831061300957634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b60006020828403121561302a57600080fd5b815180151581146129b257600080fd5b6000815461304781612f39565b808552602060018381168015613064576001811461307e576130ac565b60ff1985168884015283151560051b8801830195506130ac565b866000528260002060005b858110156130a45781548a8201860152908301908401613089565b890184019650505b505050505092915050565b6020815260006129b2602083018461303a565b808201808211156113be576113be612f83565b61ffff8281168282160390808211156130f8576130f8612f83565b5092915050565b61ffff8181168382160190808211156130f8576130f8612f83565b600061ffff82168061312e5761312e612f83565b6000190192915050565b60208082526028908201527f43616c6c6572206973206e6f7420746865205375706572436861696e536d61726040820152671d1058d8dbdd5b9d60c21b606082015260800190565b6020808252602a908201527f4f776e657220616c7265616479206861732061205375706572436861696e536d604082015269185c9d1058d8dbdd5b9d60b21b606082015260800190565b65ffffffffffff8116811461233057600080fd5b600081356113be816131ca565b81356131f6816131ca565b65ffffffffffff8116905081548165ffffffffffff198216178355602084013561321f816131ca565b6bffffffffffff0000000000008160301b16905080836bffffffffffffffffffffffff198416171784556040850135613257816131ca565b65ffffffffffff60601b8160601b1690508371ffffffffffffffffffffffffffffffffffff1984161793508084831717855560608601359250613299836131ca565b65ffffffffffff60901b1993909316179190911760909190911b65ffffffffffff60901b161781556117806132d0608084016131de565b82805465ffffffffffff60c01b191660c09290921b65ffffffffffff60c01b16919091179055565b8035613303816131ca565b65ffffffffffff908116835260208201359061331e826131ca565b9081166020840152604082013590613335826131ca565b908116604084015260608201359061334c826131ca565b9081166060840152608082013590613363826131ca565b808216608085015250505050565b60a081016113be82846132f8565b60208082526029908201527f5375706572436861696e536d6172744163636f756e7420616c726561647920686040820152686173206f776e65727360b81b606082015260800190565b600060208083850312156133db57600080fd5b825167ffffffffffffffff8111156133f257600080fd5b8301601f8101851361340357600080fd5b8051613411612e9b82612e2e565b81815260059190911b8201830190838101908783111561343057600080fd5b928401925b82841015612edd57835161344881612a34565b82529284019290840190613435565b8183823760009101908152919050565b818382376a1739bab832b931b430b4b760a91b9101908152600b01919050565b601f821115612535576000816000526020600020601f850160051c810160208610156134b05750805b601f850160051c820191505b818110156134cf578281556001016134bc565b505050505050565b815167ffffffffffffffff8111156134f1576134f1612c22565b613505816134ff8454612f39565b84613487565b602080601f83116001811461353a57600084156135225750858301515b600019600386901b1c1916600185901b1785556134cf565b600085815260208120601f198616915b828110156135695788860151825594840194600190910190840161354a565b50858210156135875787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60c0815260006135aa60c083018561303a565b90506129b260208301846132f8565b600082516135cb818460208701612a66565b9190910192915050565b6000602082840312156135e757600080fd5b505191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204178c8847a133f470cd15388647ac67a00c5dcaa84552cdd1adfa6e34b68ec7b64736f6c63430008170033

Block Transaction Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
0x1Ee397850c3CA629d965453B3cF102E9A8806Ded
Loading...
Loading
Loading...
Loading
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.