S Price: $0.81329 (-4.37%)

Contract

0x1216103901ecC19A174825F2400fbB0D2DFd3E80

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UTSFactory

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 99999 runs

Other Settings:
paris EvmVersion
File 1 of 25 : UTSFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";
import "@openzeppelin/contracts/utils/Create2.sol";

import "../libraries/UTSERC20DataTypes.sol";
import "../libraries/AddressConverter.sol";

import "./interfaces/IUTSToken.sol";
import "./interfaces/IUTSFactory.sol";
import "./interfaces/IUTSConnector.sol";
import "./interfaces/IUTSCodeStorage.sol";
import "../interfaces/IUTSRegistry.sol";
import "../interfaces/IUTSMasterRouter.sol";

/**
 * @notice A contract allows to deploy UTSToken and UTSConnector contracts with various settings.
 *
 * @dev It is an implementation of {UTSFactory} for UUPS.
 * The {UTSFactory} only deploys the specified bytecode, which stores in external code storage contracts.
 */
contract UTSFactory is IUTSFactory, AccessControlUpgradeable, PausableUpgradeable, UUPSUpgradeable {
    using Create2 for *;
    using AddressConverter for *;

    /// @notice {AccessControl} role identifier for pauser addresses.
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    address public constant NATIVE_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    /// @notice Address of the {UTSMasterRouter} contract.
    address public immutable MASTER_ROUTER;

    /// @notice Address of the {UTSRegistry} contract.
    address public immutable REGISTRY;

    /**
     * @notice Enum defines the types (blueprints) of deployments supported by the {UTSFactory}.
     * @dev Various {UTSToken} or {UTSConnector} blueprints containing:
     *      Standard: basic {UTSToken} using mint/burn mechanism or {UTSConnector} using lock/unlock mechanism for bridging ERC20 token
     *      MintableToken: free-mintable by owner {UTSToken} using mint/burn mechanism for bridging
     *      TokenWithFee: {UTSToken} using mint/burn mechanism for bridging and supporting fee deducting
     *      MintableTokenWithFee: free-mintable by owner {UTSToken} using mint/burn mechanism for bridging and supporting fee deducting
     *      PureToken: non-mintable {UTSToken} using lock/unlock mechanism for bridging
     *      ConnectorWithFee: {UTSConnector} using lock/unlock mechanism for bridging and supporting fee deducting
     *      ConnectorNative: {UTSConnector} using lock/unlock mechanism for bridging native currency
     */
    enum DeploymentType {
        Standard,
        MintableToken,
        TokenWithFee,
        MintableTokenWithFee,
        PureToken,
        ConnectorWithFee,
        ConnectorNative
    }

    /// @custom:storage-location erc7201:UTSProtocol.storage.UTSFactory.Main
    struct Main {
        address _router;
        mapping(uint8 blueprintId => address codeStorageAddress) _codeStorage;
    }

    /// @dev keccak256(abi.encode(uint256(keccak256("UTSProtocol.storage.UTSFactory.Main")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant MAIN_STORAGE_LOCATION = 0xcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc500;
    
    /// @notice Indicates an error that the function caller is not the {_router}.
    error UTSFactory__E0();
    
    /// @notice Indicates an error that the precalculated {deployment} address has a deployed bytecode.
    error UTSFactory__E1();
    
    /// @notice Indicates an error that the provided {DeployTokenData} contains unsupported {UTSToken} configuration to deploy.
    error UTSFactory__E2();
    
    /// @notice Indicates an error that lengths of provided arrays do not match.
    error UTSFactory__E3();
    
    /// @notice Indicates an error that the provided {DeployTokenData.mintedAmountToOwner} exceeds the {DeployTokenData.initialSupply}.
    error UTSFactory__E4();

    /// @notice Indicates an error that the provided {DeployTokenData.feeModule} temporarily unsupported.
    error UTSFactory__E5();

    /**
     * @notice Emitted when the {_router} address is updated.
     * @param newRouter new {_router} address.
     * @param caller the caller address who set the new {_router} address.
     */
    event DeploymentRouterSet(address newRouter, address indexed caller);

    /**
     * @notice Emitted when the {_codeStorage} address for corresponding {blueprintId} is updated.
     * @param blueprintId {DeploymentType} blueprint Id.
     * @param newCodeStorage new {_codeStorage} address.
     * @param caller the caller address who set the new {_codeStorage} address.
     * @dev See the {DeploymentType} for details.
     */
    event CodeStorageSet(uint8 indexed blueprintId, address newCodeStorage, address indexed caller);

    /**
     * @notice Emitted when a new {UTSToken} or {UTSConnector} is deployed.
     * @param deployment newly {UTSToken} or {UTSConnector} deployed contract address.
     * @param deployerIndexed indexed source chain {msg.sender} address.
     * @param deployer source chain {msg.sender} address.
     * @param owner initial owner of deployed contract.
     * @param underlyingToken underlying ERC20 token address.
     * @param salt value used for precalculation of new deployment contract address.
     * @param name the name of the {UTSToken} token (in the case of token deployment).
     * @param symbol the symbol of the {UTSToken} token (in the case of token deployment).
     * @param decimals the decimals of the {UTSToken} token (in the case of token deployment).
     */
    event Deployed(
        address deployment, 
        bytes indexed deployerIndexed, 
        bytes deployer,
        address indexed owner, 
        address indexed underlyingToken,
        bytes32 salt,
        string name, 
        string symbol,
        uint8 decimals
    );

    /**
     * @notice Initializes immutable variables.
     * @param masterRouter address of the {UTSMasterRouter} contract.
     * @param registry address of the {UTSRegistry} contract.
     *
     * @custom:oz-upgrades-unsafe-allow constructor
     */
    constructor(address masterRouter, address registry) {
        _disableInitializers();

        MASTER_ROUTER = masterRouter;
        REGISTRY = registry;
    }

    /**
     * @notice Initializes basic settings with provided parameters.
     * @param defaultAdmin initial {DEFAULT_ADMIN_ROLE} address.
     */
    function initialize(address defaultAdmin) external initializer() {
        __UUPSUpgradeable_init();
        __AccessControl_init();
        __Pausable_init();

        _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);
    }

    /**
     * @notice Deploys a new {UTSToken} using the provided deployment parameters.
     * @param deployData the {DeployTokenData} struct containing deployment parameters.
     * @dev See the {UTSERC20DataTypes.DeployTokenData} for details.
     *
     * @return success call result.
     * @return newToken a newly deployed {UTSToken} contract address.
     */
    function deployToken(DeployTokenData calldata deployData) external returns(bool success, address newToken) {

        return _deployToken(deployData, msg.sender.toBytes());
    }

    /**
     * @notice Deploys a new {UTSConnector} using the provided deployment parameters.
     * @param deployData the {DeployConnectorData} struct containing deployment parameters.
     * @dev See the {UTSERC20DataTypes.DeployConnectorData} for details.
     *
     * @return success call result.
     * @return newConnector a newly deployed {UTSConnector} contract address.
     */
    function deployConnector(DeployConnectorData calldata deployData) external returns(bool success, address newConnector) {

        return _deployConnector(deployData, msg.sender.toBytes());
    }

    /**
     * @notice Deploys a new {UTSToken} or {UTSConnector} by crosschain deploy message.
     * @param isConnector flag indicating whether is connector(true) or token(false) deployment.
     * @param deployer source chain {msg.sender} address.
     * @param deployParams abi.encoded {DeployTokenData} struct or abi.encoded {DeployConnectorData} struct.
     * @dev See the {UTSERC20DataTypes.DeployTokenData} and {UTSERC20DataTypes.DeployConnectorData} for details.
     *
     * @return success call result.
     * @return newDeployment a newly deployed {UTSToken} or {UTSConnector} contract address.
     * 
     * @dev Only authorized {UTSDeploymentRouter} can execute this function.
     */
    function deployByRouter(
        bool isConnector, 
        bytes calldata deployer,
        bytes calldata deployParams
    ) external returns(bool success, address newDeployment) {
        if (!IUTSMasterRouter(MASTER_ROUTER).validateRouter(msg.sender)) revert UTSFactory__E0();

        if (isConnector) {
            return _deployConnector(abi.decode(deployParams, (DeployConnectorData)), deployer);
        } else {
            return _deployToken(abi.decode(deployParams, (DeployTokenData)), deployer);
        }
    }

    /**
     * @notice Pauses the {deployToken}, {deployConnector}, and {deployByRouter} functions.
     * @dev Only addresses with the {PAUSER_ROLE} can execute this function.
     */
    function pause() external onlyRole(PAUSER_ROLE) {
        _pause();
    }

    /**
     * @notice Unpauses the {deployToken}, {deployConnector}, and {deployByRouter} functions.
     * @dev Only addresses with the {PAUSER_ROLE} can execute this function.
     */
    function unpause() external onlyRole(PAUSER_ROLE) {
        _unpause();
    }

    /**
     * @notice Sets the {_router} address.
     * @param newRouter new {_router} address of the {UTSDeploymentRouter} contract.
     * @dev Only addresses with the {DEFAULT_ADMIN_ROLE} can execute this function.
     */
    function setRouter(address newRouter) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _setRouter(newRouter);
    } 

    /**
     * @notice Sets the code storage addresses for corresponding blueprint Ids.
     * @param blueprintIds array of {DeploymentType} blueprints.
     * @param newCodeStorage array of {_codeStorage} addresses for corresponding {blueprintIds}.
     * @dev Only addresses with the {DEFAULT_ADMIN_ROLE} can execute this function.
     */
    function setCodeStorage(
        uint8[] calldata blueprintIds, 
        address[] calldata newCodeStorage
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (blueprintIds.length != newCodeStorage.length) revert UTSFactory__E3();
        for (uint256 i; blueprintIds.length > i; ++i) _setCodeStorage(blueprintIds[i], newCodeStorage[i]);
    }

    /**
     * @notice Returns the UTSFactory protocol version.
     * @return UTS protocol version.
     */
    function protocolVersion() public pure returns(bytes2) {
        return 0x0101;
    }

    /**
     * @notice Precalculates the address of a {UTSToken} or {UTSConnector} contract.
     * @param blueprintId {DeploymentType} blueprint to be deployed.
     * @param deployer source chain {msg.sender} address.
     * @param salt value used for precalculation of deployment address.
     * @param isConnector flag indicating whether is connector(true) or token(false) deployment.
     * @return deployment precalculated {UTSToken} or {UTSConnector} contract address.
     * @return hasCode flag indicating whether the {deployment} address has a deployed bytecode.
     */
    function getPrecomputedAddress(
        uint8 blueprintId,
        bytes calldata deployer, 
        bytes32 salt, 
        bool isConnector
    ) external view returns(address deployment, bool hasCode) {
        bytes32 _salt = keccak256(abi.encode(deployer, salt));
        bytes32 _bytecodeHash = keccak256(IUTSCodeStorage(codeStorage(blueprintId)).getCode(isConnector));

        deployment = _salt.computeAddress(_bytecodeHash);
        if (deployment.code.length > 0) hasCode = true;
    }

    /**
     * @notice Returns true if this contract implements the interface defined by `interfaceId`.
     * See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified
     * to learn more about how these ids are created.
     */
    function supportsInterface(bytes4 interfaceId) public view override returns(bool) {
        return interfaceId == type(IUTSFactory).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @notice Returns the {UTSDeploymentRouter} address.
     * @return {UTSDeploymentRouter} {_router} address.
     */
    function router() external view returns(address) {
        Main storage $ = _getMainStorage();
        return $._router;
    }

    /**
     * @notice Returns the {_codeStorage} address for corresponding {DeploymentType} blueprint.
     * @param blueprintId {DeploymentType} blueprint.
     * @return {_codeStorage} address.
     */
    function codeStorage(uint8 blueprintId) public view returns(address) {
        Main storage $ = _getMainStorage();
        return $._codeStorage[blueprintId];
    }

    function _deployToken(
        DeployTokenData memory deployData, 
        bytes memory deployer
    ) internal returns(bool success, address newToken) {
        if (deployData.feeModule) revert UTSFactory__E5();

        if (deployData.pureToken) {
            if (deployData.mintable || deployData.globalBurnable || deployData.onlyRoleBurnable || deployData.feeModule) {
                revert UTSFactory__E2();
            }

            if (deployData.mintedAmountToOwner > deployData.initialSupply) revert UTSFactory__E4();
        } else {
            if (deployData.mintedAmountToOwner != deployData.initialSupply) revert UTSFactory__E4();
        }

        DeploymentType _blueprintId = DeploymentType.Standard;

        if (deployData.mintable) _blueprintId = DeploymentType.MintableToken;
        if (deployData.feeModule) _blueprintId = DeploymentType.TokenWithFee;
        if (deployData.mintable && deployData.feeModule) _blueprintId = DeploymentType.MintableTokenWithFee;
        if (deployData.pureToken) _blueprintId = DeploymentType.PureToken;

        newToken = _deployAndRegister(
            uint8(_blueprintId),
            deployer,
            keccak256(abi.encode(deployer, deployData.salt)), 
            address(0)
        );

        IUTSToken(newToken).initializeToken(deployData);

        emit Deployed(
            newToken, 
            deployer,
            deployer, 
            deployData.owner.toAddress(), 
            newToken,
            deployData.salt,
            deployData.name, 
            deployData.symbol,
            deployData.decimals
        );

        return (true, newToken);
    }

    function _deployConnector(
        DeployConnectorData memory deployData,
        bytes memory deployer
    ) internal returns(bool success, address newConnector) {
        if (deployData.feeModule) revert UTSFactory__E5();
        
        address _underlyingToken = deployData.underlyingToken.toAddress();
        DeploymentType _blueprintId = DeploymentType.Standard;

        if (deployData.feeModule) _blueprintId = DeploymentType.ConnectorWithFee;
        if (_underlyingToken == NATIVE_ADDRESS) _blueprintId = DeploymentType.ConnectorNative;
        
        newConnector = _deployAndRegister(
            uint8(_blueprintId), 
            deployer,
            keccak256(abi.encode(deployer, deployData.salt)),
            _underlyingToken
        );

        IUTSConnector(newConnector).initializeConnector(
            deployData.owner.toAddress(),
            _underlyingToken,
            deployData.router.toAddress(),  
            deployData.allowedChainIds,
            deployData.chainConfigs
        );

        emit Deployed(
            newConnector, 
            deployer, 
            deployer,
            deployData.owner.toAddress(), 
            _underlyingToken,
            deployData.salt,
            "", 
            "",
            0
        );

        return (true, newConnector);
    }

    function _deployAndRegister(
        uint8 blueprintId,
        bytes memory deployer, 
        bytes32 salt,  
        address underlyingToken
    ) internal whenNotPaused() returns(address deployment) {
        bytes memory _bytecode = IUTSCodeStorage(codeStorage(blueprintId)).getCode(underlyingToken != address(0));

        deployment = salt.computeAddress(keccak256(_bytecode));
        
        if (deployment.code.length > 0) revert UTSFactory__E1();

        deployment = Create2.deploy(0, salt, _bytecode);

        IUTSRegistry(REGISTRY).registerDeployment(
            deployment,
            deployer,
            underlyingToken == address(0) ? deployment : underlyingToken,
            protocolVersion()
        );
    }

    function _authorizeUpgrade(address /* newImplementation */) internal override onlyRole(DEFAULT_ADMIN_ROLE) {

    }

    function _setRouter(address newRouter) internal {
        Main storage $ = _getMainStorage();
        $._router = newRouter;

        emit DeploymentRouterSet(newRouter, msg.sender);
    }

    function _setCodeStorage(uint8 blueprintId, address newCodeStorage) internal {
        Main storage $ = _getMainStorage();
        $._codeStorage[blueprintId] = newCodeStorage;

        emit CodeStorageSet(blueprintId, newCodeStorage, msg.sender);
    }

    function _getMainStorage() private pure returns(Main storage $) {
        assembly {
            $.slot := MAIN_STORAGE_LOCATION
        }
    }
}

File 2 of 25 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;


    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl
    struct AccessControlStorage {
        mapping(bytes32 role => RoleData) _roles;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;

    function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {
        assembly {
            $.slot := AccessControlStorageLocation
        }
    }

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    function __AccessControl_init() internal onlyInitializing {
    }

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        return $._roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        return $._roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        AccessControlStorage storage $ = _getAccessControlStorage();
        bytes32 previousAdminRole = getRoleAdmin(role);
        $._roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        if (!hasRole(role, account)) {
            $._roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        if (hasRole(role, account)) {
            $._roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 3 of 25 : Initializable.sol
// 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
        }
    }
}

File 4 of 25 : UUPSUpgradeable.sol
// 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);
        }
    }
}

File 5 of 25 : ContextUpgradeable.sol
// 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 6 of 25 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {Initializable} from "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165Upgradeable is Initializable, IERC165 {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 7 of 25 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Pausable
    struct PausableStorage {
        bool _paused;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;

    function _getPausableStorage() private pure returns (PausableStorage storage $) {
        assembly {
            $.slot := PausableStorageLocation
        }
    }

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        PausableStorage storage $ = _getPausableStorage();
        $._paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        PausableStorage storage $ = _getPausableStorage();
        return $._paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        PausableStorage storage $ = _getPausableStorage();
        $._paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        PausableStorage storage $ = _getPausableStorage();
        $._paused = false;
        emit Unpaused(_msgSender());
    }
}

File 8 of 25 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

File 9 of 25 : 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);
}

File 10 of 25 : IBeacon.sol
// 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);
}

File 11 of 25 : ERC1967Utils.sol
// 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();
        }
    }
}

File 12 of 25 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

File 13 of 25 : Address.sol
// 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();
        }
    }
}

File 14 of 25 : Create2.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Create2.sol)

pragma solidity ^0.8.20;

/**
 * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.
 * `CREATE2` can be used to compute in advance the address where a smart
 * contract will be deployed, which allows for interesting new mechanisms known
 * as 'counterfactual interactions'.
 *
 * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
 * information.
 */
library Create2 {
    /**
     * @dev Not enough balance for performing a CREATE2 deploy.
     */
    error Create2InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev There's no code to deploy.
     */
    error Create2EmptyBytecode();

    /**
     * @dev The deployment failed.
     */
    error Create2FailedDeployment();

    /**
     * @dev Deploys a contract using `CREATE2`. The address where the contract
     * will be deployed can be known in advance via {computeAddress}.
     *
     * The bytecode for a contract can be obtained from Solidity with
     * `type(contractName).creationCode`.
     *
     * Requirements:
     *
     * - `bytecode` must not be empty.
     * - `salt` must have not been used for `bytecode` already.
     * - the factory must have a balance of at least `amount`.
     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
     */
    function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) {
        if (address(this).balance < amount) {
            revert Create2InsufficientBalance(address(this).balance, amount);
        }
        if (bytecode.length == 0) {
            revert Create2EmptyBytecode();
        }
        /// @solidity memory-safe-assembly
        assembly {
            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)
        }
        if (addr == address(0)) {
            revert Create2FailedDeployment();
        }
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the
     * `bytecodeHash` or `salt` will result in a new destination address.
     */
    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {
        return computeAddress(salt, bytecodeHash, address(this));
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
     */
    function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40) // Get free memory pointer

            // |                   | ↓ ptr ...  ↓ ptr + 0x0B (start) ...  ↓ ptr + 0x20 ...  ↓ ptr + 0x40 ...   |
            // |-------------------|---------------------------------------------------------------------------|
            // | bytecodeHash      |                                                        CCCCCCCCCCCCC...CC |
            // | salt              |                                      BBBBBBBBBBBBB...BB                   |
            // | deployer          | 000000...0000AAAAAAAAAAAAAAAAAAA...AA                                     |
            // | 0xFF              |            FF                                                             |
            // |-------------------|---------------------------------------------------------------------------|
            // | memory            | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |
            // | keccak(start, 85) |            ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |

            mstore(add(ptr, 0x40), bytecodeHash)
            mstore(add(ptr, 0x20), salt)
            mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes
            let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff
            mstore8(start, 0xff)
            addr := keccak256(start, 85)
        }
    }
}

File 15 of 25 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 16 of 25 : StorageSlot.sol
// 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
        }
    }
}

File 17 of 25 : IUTSCodeStorage.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

interface IUTSCodeStorage {

    function getCode(bool isConnector) external pure returns(bytes memory);

}

File 18 of 25 : IUTSConnector.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import "contracts/libraries/UTSERC20DataTypes.sol";

interface IUTSConnector {

    function underlyingDecimals() external view returns(uint8);

    function underlyingBalance() external view returns(uint256);

    function underlyingName() external view returns(string memory);

    function underlyingSymbol() external view returns(string memory);

    function initializeConnector(
        address owner,
        address underlyingToken,
        address router,
        uint256[] calldata allowedChainIds,
        ChainConfig[] calldata chainConfigs
    ) external;

}

File 19 of 25 : IUTSFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import "contracts/libraries/UTSERC20DataTypes.sol";

interface IUTSFactory {

    function MASTER_ROUTER() external view returns(address);

    function REGISTRY() external view returns(address);

    function router() external view returns(address);

    function codeStorage(uint8 blueprintId) external view returns(address);

    function protocolVersion() external pure returns(bytes2);

    function getPrecomputedAddress(
        uint8 blueprintId,
        bytes calldata deployer, 
        bytes32 salt, 
        bool isConnector
    ) external view returns(address deployment, bool hasCode);

    function deployToken(DeployTokenData calldata deployData) external returns(bool success, address newToken);

    function deployConnector(DeployConnectorData calldata deployData) external returns(bool success, address newConnector);

    function deployByRouter(
        bool isConnector, 
        bytes calldata deployer, 
        bytes calldata deployParams
    ) external returns(bool success, address newDeployment);

    function pause() external;

    function unpause() external;

    function setRouter(address newRouter) external;

    function setCodeStorage(uint8[] calldata blueprintIds, address[] calldata newCodeStorage) external;
    
}

File 20 of 25 : IUTSToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "contracts/libraries/UTSERC20DataTypes.sol";

interface IUTSToken is IERC20 {

    function globalBurnable() external view returns(bool);
    
    function onlyRoleBurnable() external view returns(bool);

    function initializeToken(DeployTokenData calldata params) external;

}

File 21 of 25 : IUTSMasterRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

interface IUTSMasterRouter {

    function feeCollector() external view returns(address);

    function PAYLOAD_SIZE_LIMIT() external view returns(uint16);

    function validateRouter(address target) external view returns(bool);

    function dstMasterRouter(uint256 dstChainId) external view returns(bytes memory);

    function sendProposal(uint256 payloadLength, uint256 dstChainId, bytes calldata params) external payable;

    function executeProposal(bytes calldata data) external payable;

    function setFeeCollector(address newFeeCollector) external;

    function setDstMasterRouter(uint256[] calldata dstChainIds, bytes[] calldata newDstMasterRouter) external;

    function pause() external;

    function unpause() external;

}

File 22 of 25 : IUTSRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import "../libraries/UTSCoreDataTypes.sol";
import "../libraries/UTSERC20DataTypes.sol";

interface IUTSRegistry {

    function validateUnderlyingRegistered(address underlyingToken) external view returns(bool);

    function validateDeploymentRegistered(address deployment) external view returns(bool);

    function validateFactory(address target) external view returns(bool);
    
    function deploymentData(address deployment) external view returns(DeploymentData memory);

    function totalDeployments() external view returns(uint256);

    function underlyingTokens() external view returns(address[] memory);

    function deployments() external view returns(address[] memory);

    function deploymentsByIndex(uint256[] calldata indexes) external view returns(address[] memory);

    function deploymentsByUnderlying(address underlyingToken) external view returns(address[] memory);

    function deploymentsByDeployer(bytes calldata deployer) external view returns(address[] memory);
    
    function registerDeployment(
        address deployment,
        bytes calldata deployer,
        address underlyingToken,
        bytes2 protocolVersion
    ) external;

    function approveRequestBatch(ApproveRequestData[] calldata requests) external returns(bool);

    function updateChainConfigs(uint256[] calldata allowedChainIds, ChainConfig[] calldata chainConfigs) external;

    function updateRouter(address newRouter) external;

}

File 23 of 25 : AddressConverter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

library AddressConverter {

    function toBytes(address _address) internal pure returns(bytes memory) {
        return abi.encodePacked(_address);
    }

    function toAddress(bytes memory _params) internal pure returns(address) {
        return address(uint160(bytes20(_params)));
    }

    function toAddressPadded(bytes memory _params) internal pure returns(address addressPadded) {
        if (32 > _params.length) return address(0);

        assembly {
            addressPadded := div(mload(add(add(_params, 0x20), 12)), 0x1000000000000000000000000)
        }
    }

}

File 24 of 25 : UTSCoreDataTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

    struct DeploymentData {
        bytes   deployer;
        address underlyingToken;
        bytes2  initProtocolVersion;
    }

    struct ApproveRequestData {
        address deployment;
        bytes   deployer;
        address underlyingToken;
        bytes2  protocolVersion;
    }

    enum OperationResult {
        Success,
        FailedAndStored,
        Failed,
        RouterPaused,
        UnauthorizedRouter,
        InvalidDstPeerAddress,
        InvalidSrcChainId,
        InvalidToAddress,
        InvalidSrcPeerAddress,
        DeployFailed,
        IncompatibleRouter,
        MasterRouterPaused,
        InvalidMessageType
    }

File 25 of 25 : UTSERC20DataTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

    struct ChainConfig {
        bytes   peerAddress;
        uint64  minGasLimit;
        uint8   decimals;
        bool    paused;
    }

    struct ChainConfigUpdate {
        uint256[] allowedChainIds;
        ChainConfig[] chainConfigs;
    }

    struct Origin {
        bytes   sender;
        uint256 chainId;
        bytes   peerAddress;
        uint8   decimals;
    }

    struct DeployTokenData {
        bytes     owner;
        string    name;
        string    symbol;
        uint8     decimals;
        uint256   initialSupply;
        uint256   mintedAmountToOwner;
        bool      pureToken;
        bool      mintable;
        bool      globalBurnable;
        bool      onlyRoleBurnable;
        bool      feeModule;
        bytes     router;
        uint256[] allowedChainIds;
        ChainConfig[] chainConfigs;
        bytes32   salt;
    }

    struct DeployConnectorData {
        bytes     owner;
        bytes     underlyingToken;
        bool      feeModule;
        bytes     router;
        uint256[] allowedChainIds;
        ChainConfig[] chainConfigs;
        bytes32   salt;
    }

    struct DeployMetadata {
        uint256 dstChainId;
        bool    isConnector;
        bytes   params;
    }

    struct DstDeployConfig {
        bytes   factory;
        uint64  tokenDeployGas;
        uint64  connectorDeployGas;
        uint16  protocolFee;
    }

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"masterRouter","type":"address"},{"internalType":"address","name":"registry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"Create2EmptyBytecode","type":"error"},{"inputs":[],"name":"Create2FailedDeployment","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"Create2InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"UTSFactory__E0","type":"error"},{"inputs":[],"name":"UTSFactory__E1","type":"error"},{"inputs":[],"name":"UTSFactory__E2","type":"error"},{"inputs":[],"name":"UTSFactory__E3","type":"error"},{"inputs":[],"name":"UTSFactory__E4","type":"error"},{"inputs":[],"name":"UTSFactory__E5","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"blueprintId","type":"uint8"},{"indexed":false,"internalType":"address","name":"newCodeStorage","type":"address"},{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"CodeStorageSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"deployment","type":"address"},{"indexed":true,"internalType":"bytes","name":"deployerIndexed","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"deployer","type":"bytes"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"underlyingToken","type":"address"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"Deployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRouter","type":"address"},{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"DeploymentRouterSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MASTER_ROUTER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NATIVE_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REGISTRY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"blueprintId","type":"uint8"}],"name":"codeStorage","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"isConnector","type":"bool"},{"internalType":"bytes","name":"deployer","type":"bytes"},{"internalType":"bytes","name":"deployParams","type":"bytes"}],"name":"deployByRouter","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"address","name":"newDeployment","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"owner","type":"bytes"},{"internalType":"bytes","name":"underlyingToken","type":"bytes"},{"internalType":"bool","name":"feeModule","type":"bool"},{"internalType":"bytes","name":"router","type":"bytes"},{"internalType":"uint256[]","name":"allowedChainIds","type":"uint256[]"},{"components":[{"internalType":"bytes","name":"peerAddress","type":"bytes"},{"internalType":"uint64","name":"minGasLimit","type":"uint64"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"bool","name":"paused","type":"bool"}],"internalType":"struct ChainConfig[]","name":"chainConfigs","type":"tuple[]"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct DeployConnectorData","name":"deployData","type":"tuple"}],"name":"deployConnector","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"address","name":"newConnector","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"owner","type":"bytes"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"uint256","name":"mintedAmountToOwner","type":"uint256"},{"internalType":"bool","name":"pureToken","type":"bool"},{"internalType":"bool","name":"mintable","type":"bool"},{"internalType":"bool","name":"globalBurnable","type":"bool"},{"internalType":"bool","name":"onlyRoleBurnable","type":"bool"},{"internalType":"bool","name":"feeModule","type":"bool"},{"internalType":"bytes","name":"router","type":"bytes"},{"internalType":"uint256[]","name":"allowedChainIds","type":"uint256[]"},{"components":[{"internalType":"bytes","name":"peerAddress","type":"bytes"},{"internalType":"uint64","name":"minGasLimit","type":"uint64"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"bool","name":"paused","type":"bool"}],"internalType":"struct ChainConfig[]","name":"chainConfigs","type":"tuple[]"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct DeployTokenData","name":"deployData","type":"tuple"}],"name":"deployToken","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"address","name":"newToken","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"blueprintId","type":"uint8"},{"internalType":"bytes","name":"deployer","type":"bytes"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bool","name":"isConnector","type":"bool"}],"name":"getPrecomputedAddress","outputs":[{"internalType":"address","name":"deployment","type":"address"},{"internalType":"bool","name":"hasCode","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"defaultAdmin","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolVersion","outputs":[{"internalType":"bytes2","name":"","type":"bytes2"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"blueprintIds","type":"uint8[]"},{"internalType":"address[]","name":"newCodeStorage","type":"address[]"}],"name":"setCodeStorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRouter","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","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"}]

60e03462000143576200325d906001600160401b0390601f38849003908101601f19168201908382118383101762000148578083916040968794855283398101031262000143576200005f602062000057836200015e565b92016200015e565b91306080527ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009081549060ff82871c1662000132578080831603620000ed575b50505060a05260c052516130e99081620001748239608051818181610eb50152610f95015260a051818181610b5e0152611c9e015260c0518181816114e7015281816124890152612ac70152f35b6001600160401b0319909116811790915583519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a13880806200009f565b855163f92ee8a960e01b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620001435756fe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a71461150b5750806306433b1b1461149c578063248a9ca3146114355780632ae9c600146113dc5780632f2ff15d1461139557806336568abe1461130a5780633f4ba83a1461122c5780634f1ef28614610f2a57806352d1902d14610e6d5780635c975abb14610e0c5780638456cb5914610d5657806391d1485414610cc7578063a17f0e9114610c36578063a217fddf14610bfd578063ad3cb1cc14610b82578063bd6ec01914610b13578063c0d7865514610a45578063c4d66de81461083d578063c51ddb1214610658578063cbc89a2c14610492578063cca5b0d11461041e578063d547741f146103a2578063d5bcb61014610355578063e63ab1e9146102fc578063ef69c0381461026d578063f887ea40146101fb5763fd0fb7911461014c57600080fd5b346101f7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc926020843601126101f05781359367ffffffffffffffff85116101f35760e09085360301126101f057506101ec926101b96101be926101b033612ed4565b92369101611b79565b612939565b9151901515815273ffffffffffffffffffffffffffffffffffffffff90911660208201529081906040820190565b0390f35b80fd5b5080fd5b8280fd5b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35760209073ffffffffffffffffffffffffffffffffffffffff7fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc50054169051908152f35b5050346101f35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35760209073ffffffffffffffffffffffffffffffffffffffff6102f36102c1611847565b60ff166000527fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc501602052604060002090565b54169051908152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f357602090517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f3576020905173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8152f35b5090346101f757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f75761041a913561041560016103e46115fb565b938387527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205286200154611f27565b612114565b5080f35b50346101f7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc926020843601126101f05781359367ffffffffffffffff85116101f3576101e09085360301126101f057506101ec9261048d6101be9261048433612ed4565b92369101611a14565b6122da565b50346101f75760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f7576104ca611847565b60243567ffffffffffffffff8111610654576104e99036908401611782565b919092856064358015158091036101f35760246105b196839661056360808b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8251958693816020860199828b52816060880152878701378b86838701015260443590850152011681010360608101845201826116a5565b5190209473ffffffffffffffffffffffffffffffffffffffff97889160ff166000527fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc501602052604060002090565b541693885194859384927fb514681e0000000000000000000000000000000000000000000000000000000084528301525afa90811561064a57866106079495969792610627575b50506020815191012090612eb4565b91823b61061e575b83519216825215156020820152f35b6001915061060f565b61064392503d8091833e61063b81836116a5565b810190611dfb565b38806105f8565b85513d88823e3d90fd5b8480fd5b5090346101f757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f75767ffffffffffffffff918035838111610654576106a89036908301611816565b602493919394602435908111610839576106c59036908501611816565b9290916106d0611eed565b83810361081157875b8082116106e4578880f35b6106ef818389611dbc565b3560ff811680820361080d57610706838888611dbc565b359173ffffffffffffffffffffffffffffffffffffffff83168093036108095761075c9060ff166000527fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc501602052604060002090565b827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905584519182527ff075814462165e43a77d77233ab92ee620d638022269a24fd995bc3f557bf67f60203393a37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107de576001016106d9565b87896011887f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8b80fd5b8a80fd5b8482517f8d4a74cb000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b50346101f75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757610875611623565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0091825460ff81861c16159267ffffffffffffffff821680159081610a3d575b6001149081610a33575b159081610a2a575b50610a03575090818360017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000061096e95161786556109ce575b5061090a612fba565b610912612fba565b61091a612fba565b610922612fba565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008154169055611f6c565b50610977578280f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d291817fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff602093541690555160018152a138808280f35b7fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000166801000000000000000117845538610901565b85517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b905015386108c8565b303b1591506108c0565b8591506108b6565b5050346101f35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35773ffffffffffffffffffffffffffffffffffffffff610a93611623565b610a9b611eed565b16907fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc500827fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055519081527f49120cf551759f073b2b5fbc79147e47ce15da72a2e6abf8b28e38eec83985ee60203392a280f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f3576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35780516101ec91610bc182611689565b600582527f352e302e300000000000000000000000000000000000000000000000000000006020830152519182916020835260208301906117d3565b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35751908152602090f35b50346101f75760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f7578035908115158203610cc35767ffffffffffffffff90602435828111610cbf57610c939036908301611782565b9290956044359182116101f0575091610cb76101be94926101ec9794369101611782565b939092611c4e565b8580fd5b8380fd5b50346101f757817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f7578160209360ff92610d056115fb565b903582527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800865273ffffffffffffffffffffffffffffffffffffffff83832091168252855220541690519015158152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35760207f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25891610db2611e5a565b610dba612f0f565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905551338152a180f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35760209060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541690519015158152f35b5091346101f057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f0575073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610f0457602090517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b5090807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757610f5d611623565b9060243567ffffffffffffffff811161065457610f7d9036908501611757565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000168030149081156111fe575b506111d657610fcd611eed565b8316928251907f52d1902d00000000000000000000000000000000000000000000000000000000825260209182818881895afa8891816111a3575b5061103c57602487878751917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc969295919396908181036111745750833b156111455780547fffffffffffffffffffffffff0000000000000000000000000000000000000000168217905583518792917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a286511561110f57505080858561041a97519101845af4913d15611105573d6110f76110ee826116e6565b925192836116a5565b81528581943d92013e613013565b5060609250613013565b945094505050503461112057505080f35b7fb398979f000000000000000000000000000000000000000000000000000000008152fd5b602483838751917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b836024918751917faa1d49a4000000000000000000000000000000000000000000000000000000008352820152fd5b9091508381813d83116111cf575b6111bb81836116a5565b810103126111cb57519038611008565b8880fd5b503d6111b1565b8483517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538610fc0565b50346101f757827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757611263611e5a565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009081549060ff8216156112e357507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a180f35b83517f8dfc202b000000000000000000000000000000000000000000000000000000008152fd5b509190346101f357807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f3576113436115fb565b903373ffffffffffffffffffffffffffffffffffffffff83160361136d575061041a919235612114565b8390517f6697b232000000000000000000000000000000000000000000000000000000008152fd5b5090346101f757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f75761041a91356113d760016103e46115fb565b612049565b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f357602090517f01010000000000000000000000000000000000000000000000000000000000008152f35b50346101f75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757816020936001923581527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680085522001549051908152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f3576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b925050346101f75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757357fffffffff0000000000000000000000000000000000000000000000000000000081168091036101f757602092507f63e0baa300000000000000000000000000000000000000000000000000000000811490811561159e575b5015158152f35b7f7965db0b000000000000000000000000000000000000000000000000000000008114915081156115d1575b5038611597565b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386115ca565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361161e57565b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361161e57565b67ffffffffffffffff811161165a57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761165a57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761165a57604052565b67ffffffffffffffff811161165a57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261172c826116e6565b9161173a60405193846116a5565b82948184528183011161161e578281602093846000960137010152565b9080601f8301121561161e5781602061177293359101611720565b90565b3590811515820361161e57565b9181601f8401121561161e5782359167ffffffffffffffff831161161e576020838186019501011161161e57565b60005b8381106117c35750506000910152565b81810151838201526020016117b3565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361180f815180928187528780880191016117b0565b0116010190565b9181601f8401121561161e5782359167ffffffffffffffff831161161e576020808501948460051b01011161161e57565b6004359060ff8216820361161e57565b359060ff8216820361161e57565b67ffffffffffffffff811161165a5760051b60200190565b9080601f8301121561161e57602090823561189781611865565b936118a560405195866116a5565b81855260208086019260051b82010192831161161e57602001905b8282106118ce575050505090565b813581529083019083016118c0565b81601f8201121561161e578035916020916118f784611865565b9360409261190860405196876116a5565b818652848087019260051b8401019381851161161e57858401925b858410611934575050505050505090565b67ffffffffffffffff90843582811161161e57860190608091827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0828803011261161e57845190838201828110868211176119e65786528a81013585811161161e57878c6119a492840101611757565b825285810135948516850361161e576119d78b95948695868501526060926119cd848201611857565b8986015201611775565b90820152815201930192611923565b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b9190916101e090818185031261161e576040519182019367ffffffffffffffff948381108682111761165a576040528294823581811161161e5782611a5a918501611757565b8452602083013581811161161e5782611a74918501611757565b6020850152604083013581811161161e5782611a91918501611757565b6040850152611aa260608401611857565b60608501526080830135608085015260a083013560a0850152611ac760c08401611775565b60c0850152611ad860e08401611775565b60e0850152610100611aeb818501611775565b90850152610120611afd818501611775565b90850152610140611b0f818501611775565b908501526101608084013582811161161e5783611b2d918601611757565b908501526101808084013582811161161e5783611b4b91860161187d565b908501526101a0918284013591821161161e57611b699184016118dd565b908301526101c080910135910152565b919060e08382031261161e576040519067ffffffffffffffff9060e083018281118482101761165a576040528294803583811161161e5782611bbc918301611757565b8452602081013583811161161e5782611bd6918301611757565b6020850152611be760408201611775565b6040850152606081013583811161161e5782611c04918301611757565b6060850152608081013583811161161e5782611c2191830161187d565b608085015260a081013592831161161e57611c4260c09392849383016118dd565b60a08501520135910152565b93929192604051947fcae94c94000000000000000000000000000000000000000000000000000000008652336004870152602095868160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611db057600091611d7a575b5015611d505715611d1b578201938285031261161e5781359167ffffffffffffffff831161161e57611d1794611d1193611d099201611b79565b923691611720565b90612939565b9091565b8201938285031261161e5781359167ffffffffffffffff831161161e57611d1794611d4a93611d099201611a14565b906122da565b60046040517f05188bfc000000000000000000000000000000000000000000000000000000008152fd5b8781813d8311611da9575b611d8f81836116a5565b810103126101f357519081151582036101f0575038611ccf565b503d611d85565b6040513d6000823e3d90fd5b9190811015611dcc5760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60208183031261161e5780519067ffffffffffffffff821161161e570181601f8201121561161e578051611e2e816116e6565b92611e3c60405194856116a5565b8184526020828401011161161e5761177291602080850191016117b0565b3360009081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b60205260409020547f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9060ff1615611eb65750565b604490604051907fe2517d3f0000000000000000000000000000000000000000000000000000000082523360048301526024820152fd5b3360009081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604081205460ff1615611eb65750565b806000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260406000203360005260205260ff6040600020541615611eb65750565b73ffffffffffffffffffffffffffffffffffffffff1660008181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d60205260408120549091907f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268009060ff1661204457828052602052604082208183526020526040822060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505090565b906000918083527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268008060205273ffffffffffffffffffffffffffffffffffffffff6040852093169283855260205260ff6040852054161560001461210e57818452602052604083208284526020526040832060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339380a4600190565b50505090565b906000918083527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268008060205273ffffffffffffffffffffffffffffffffffffffff6040852093169283855260205260ff60408520541660001461210e5781845260205260408320828452602052604083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4600190565b90815180825260208080930193019160005b8281106121f5575050505090565b8351855293810193928101926001016121e7565b908082519081815260208091019281808460051b8301019501936000915b8483106122375750505050505090565b9091929394958480827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0856001950301865289519061227f60808351908084528301906117d3565b9167ffffffffffffffff848201511684830152604060ff81830151169083015260608091015115159101529801930193019194939290612227565b6122d2906020604051928284809451938492016117b0565b810103902090565b91906101408301805161290f5760c084018051156128d65760e0850151158015906128c8575b80156128ba575b80156128b0575b6128865760a085015160808601511061285c575b60009260e08601918251151580612853575b845115158061284a575b81612842575b50612839575b8051612830575b600785101561280157600094612413916101c089019182519060248960409384516123bd81602081019388855261238c8d60608401906117d3565b9089830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018352826116a5565b519020926123c9612f0f565b73ffffffffffffffffffffffffffffffffffffffff97889160ff166000527fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc501602052604060002090565b54168451928380927fb514681e00000000000000000000000000000000000000000000000000000000825260049e8f8301525afa90811561274c576000916127e8575b5080519061246a6020820192832084612eb4565b3b6127c0578051156127985751906000f599848b1698891561277157857f000000000000000000000000000000000000000000000000000000000000000016803b1561161e5760006124fa8c928a8388518096819582947fe6aba073000000000000000000000000000000000000000000000000000000008452828b8501526080602485015260848401906117d3565b9060448301527f0101000000000000000000000000000000000000000000000000000000000000606483015203925af1801561276657612757575b50893b1561161e578251907fc9af28b30000000000000000000000000000000000000000000000000000000082528101602090528981808451602482016101e090526102048201612585916117d3565b602086019b8c517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc92838582030160448601526125c1916117d3565b9d8888019e8f5190848682030160648701526125dc916117d3565b91606089019a8b5160ff16608487015260808a015160a487015260a08a015160c487015251151560e486015251151561010485015261010088015115156101248501526101208801511515610144850152511515610164840152610160870151908284820301610184850152612651916117d3565b6101808701519082848203016101a485015261266c916121d5565b6101a087015191838203016101c484015261268691612209565b88516101e483015203815a6000948591f1801561274c578a959360ff6126de61272c957f5a74099ba6991aeb15a22db4438f7a363b7f35cbe0d7ade0c13f3c106bb039ee9b9a989561271e9561273d575b5051612f64565b95519a519b519351169a6126f1896122ba565b9a61270d83519a8b9a8b5260c060208c015260c08b01906117d3565b9289015287820360608901526117d3565b9085820360808701526117d3565b9660a084015216940390a460019190565b61274690611646565b386126d7565b83513d6000823e3d90fd5b61276090611646565b38612535565b84513d6000823e3d90fd5b82517f741752c2000000000000000000000000000000000000000000000000000000008152fd5b8a84517f4ca249dc000000000000000000000000000000000000000000000000000000008152fd5b8a84517fa6bdfcb7000000000000000000000000000000000000000000000000000000008152fd5b6127fb913d8091833e61063b81836116a5565b38612456565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60049450612351565b6003945061234a565b905038612344565b6002965061233e565b60019550612334565b60046040517f4bb2e5a5000000000000000000000000000000000000000000000000000000008152fd5b60046040517f3e18315e000000000000000000000000000000000000000000000000000000008152fd5b508151151561230e565b506101208501511515612307565b506101008501511515612300565b60a08501516080860151146123225760046040517f4bb2e5a5000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6adb5e34000000000000000000000000000000000000000000000000000000008152fd5b60408101805190939260009161290f576129566020840151612f64565b94829051612eac575b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff871614612ea4575b6007811015612e775760248373ffffffffffffffffffffffffffffffffffffffff612a1560c0880151604051612a09816020810193604085526129d7606083018c6117d3565b906040830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018352826116a5565b519020946102c1612f0f565b5416604051928380927fb514681e00000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff8c16151560048301525afa908115612dbe578491612e5d575b50805190612a836020820192832084612eb4565b3b612e3357805115612e0957519084f59473ffffffffffffffffffffffffffffffffffffffff861615612ddf5773ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff821615600014612dd85786905b803b156106545773ffffffffffffffffffffffffffffffffffffffff859189836040518096819582947fe6aba0730000000000000000000000000000000000000000000000000000000084521660048301526080602483015273ffffffffffffffffffffffffffffffffffffffff612b84608484018c6117d3565b911660448301527f0101000000000000000000000000000000000000000000000000000000000000606483015203925af18015612dbe57612dc9575b50612bcb8451612f64565b612bd86060860151612f64565b90608086015160a08701519073ffffffffffffffffffffffffffffffffffffffff8a163b156108395791612ca173ffffffffffffffffffffffffffffffffffffffff92612c7189958560405198899788977f1b7fd4ec000000000000000000000000000000000000000000000000000000008952166004880152818b16602488015216604486015260a0606486015260a48501906121d5565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc848303016084850152612209565b03818373ffffffffffffffffffffffffffffffffffffffff8c165af18015612dbe5790879291612d6e575b5090604073ffffffffffffffffffffffffffffffffffffffff807f5a74099ba6991aeb15a22db4438f7a363b7f35cbe0d7ade0c13f3c106bb039ee9460c0612d148a51612f64565b99015197612d3d612d24896122ba565b988487519816885260c0602089015260c08801906117d3565b9885870152806020878b039a8b60608a0152828152818c0160808a0152015260a0860152169616940190a460019190565b73ffffffffffffffffffffffffffffffffffffffff807f5a74099ba6991aeb15a22db4438f7a363b7f35cbe0d7ade0c13f3c106bb039ee949396612db3604094611646565b969394505050612ccc565b6040513d86823e3d90fd5b612dd290611646565b38612bc0565b8190612b09565b60046040517f741752c2000000000000000000000000000000000000000000000000000000008152fd5b60046040517f4ca249dc000000000000000000000000000000000000000000000000000000008152fd5b60046040517fa6bdfcb7000000000000000000000000000000000000000000000000000000008152fd5b612e7191503d8086833e61063b81836116a5565b38612a6f565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526021600452fd5b506006612991565b50600561295f565b605591600b9160405191604083015260208201523081520160ff81532090565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006040519160601b1660208201526014815261177281611689565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416612f3a57565b60046040517fd93c0665000000000000000000000000000000000000000000000000000000008152fd5b60208151910151907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000918281169160148110612fa5575b5050905060601c90565b8391925060140360031b1b1616803880612f9b565b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615612fe957565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b90613052575080511561302857805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b815115806130aa575b613063575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b1561305b56fea2646970667358221220b943be94bc090e00e9f0a09c2c7c60ff1439e94da8d41325b1e501de718b095264736f6c63430008180033000000000000000000000000d685179d71b41b1bf67bdac3d12ad72d5045e4b5000000000000000000000000481d89337abcb336bdfa422e85af8aa88919b342

Deployed Bytecode

0x6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a71461150b5750806306433b1b1461149c578063248a9ca3146114355780632ae9c600146113dc5780632f2ff15d1461139557806336568abe1461130a5780633f4ba83a1461122c5780634f1ef28614610f2a57806352d1902d14610e6d5780635c975abb14610e0c5780638456cb5914610d5657806391d1485414610cc7578063a17f0e9114610c36578063a217fddf14610bfd578063ad3cb1cc14610b82578063bd6ec01914610b13578063c0d7865514610a45578063c4d66de81461083d578063c51ddb1214610658578063cbc89a2c14610492578063cca5b0d11461041e578063d547741f146103a2578063d5bcb61014610355578063e63ab1e9146102fc578063ef69c0381461026d578063f887ea40146101fb5763fd0fb7911461014c57600080fd5b346101f7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc926020843601126101f05781359367ffffffffffffffff85116101f35760e09085360301126101f057506101ec926101b96101be926101b033612ed4565b92369101611b79565b612939565b9151901515815273ffffffffffffffffffffffffffffffffffffffff90911660208201529081906040820190565b0390f35b80fd5b5080fd5b8280fd5b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35760209073ffffffffffffffffffffffffffffffffffffffff7fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc50054169051908152f35b5050346101f35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35760209073ffffffffffffffffffffffffffffffffffffffff6102f36102c1611847565b60ff166000527fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc501602052604060002090565b54169051908152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f357602090517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f3576020905173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8152f35b5090346101f757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f75761041a913561041560016103e46115fb565b938387527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205286200154611f27565b612114565b5080f35b50346101f7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc926020843601126101f05781359367ffffffffffffffff85116101f3576101e09085360301126101f057506101ec9261048d6101be9261048433612ed4565b92369101611a14565b6122da565b50346101f75760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f7576104ca611847565b60243567ffffffffffffffff8111610654576104e99036908401611782565b919092856064358015158091036101f35760246105b196839661056360808b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8251958693816020860199828b52816060880152878701378b86838701015260443590850152011681010360608101845201826116a5565b5190209473ffffffffffffffffffffffffffffffffffffffff97889160ff166000527fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc501602052604060002090565b541693885194859384927fb514681e0000000000000000000000000000000000000000000000000000000084528301525afa90811561064a57866106079495969792610627575b50506020815191012090612eb4565b91823b61061e575b83519216825215156020820152f35b6001915061060f565b61064392503d8091833e61063b81836116a5565b810190611dfb565b38806105f8565b85513d88823e3d90fd5b8480fd5b5090346101f757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f75767ffffffffffffffff918035838111610654576106a89036908301611816565b602493919394602435908111610839576106c59036908501611816565b9290916106d0611eed565b83810361081157875b8082116106e4578880f35b6106ef818389611dbc565b3560ff811680820361080d57610706838888611dbc565b359173ffffffffffffffffffffffffffffffffffffffff83168093036108095761075c9060ff166000527fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc501602052604060002090565b827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905584519182527ff075814462165e43a77d77233ab92ee620d638022269a24fd995bc3f557bf67f60203393a37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107de576001016106d9565b87896011887f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8b80fd5b8a80fd5b8482517f8d4a74cb000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b50346101f75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757610875611623565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0091825460ff81861c16159267ffffffffffffffff821680159081610a3d575b6001149081610a33575b159081610a2a575b50610a03575090818360017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000061096e95161786556109ce575b5061090a612fba565b610912612fba565b61091a612fba565b610922612fba565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008154169055611f6c565b50610977578280f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d291817fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff602093541690555160018152a138808280f35b7fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000166801000000000000000117845538610901565b85517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b905015386108c8565b303b1591506108c0565b8591506108b6565b5050346101f35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35773ffffffffffffffffffffffffffffffffffffffff610a93611623565b610a9b611eed565b16907fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc500827fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055519081527f49120cf551759f073b2b5fbc79147e47ce15da72a2e6abf8b28e38eec83985ee60203392a280f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f3576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000d685179d71b41b1bf67bdac3d12ad72d5045e4b5168152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35780516101ec91610bc182611689565b600582527f352e302e300000000000000000000000000000000000000000000000000000006020830152519182916020835260208301906117d3565b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35751908152602090f35b50346101f75760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f7578035908115158203610cc35767ffffffffffffffff90602435828111610cbf57610c939036908301611782565b9290956044359182116101f0575091610cb76101be94926101ec9794369101611782565b939092611c4e565b8580fd5b8380fd5b50346101f757817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f7578160209360ff92610d056115fb565b903582527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800865273ffffffffffffffffffffffffffffffffffffffff83832091168252855220541690519015158152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35760207f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25891610db2611e5a565b610dba612f0f565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905551338152a180f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f35760209060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541690519015158152f35b5091346101f057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f0575073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001216103901ecc19a174825f2400fbb0d2dfd3e80163003610f0457602090517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b5090807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757610f5d611623565b9060243567ffffffffffffffff811161065457610f7d9036908501611757565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000001216103901ecc19a174825f2400fbb0d2dfd3e80168030149081156111fe575b506111d657610fcd611eed565b8316928251907f52d1902d00000000000000000000000000000000000000000000000000000000825260209182818881895afa8891816111a3575b5061103c57602487878751917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc969295919396908181036111745750833b156111455780547fffffffffffffffffffffffff0000000000000000000000000000000000000000168217905583518792917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a286511561110f57505080858561041a97519101845af4913d15611105573d6110f76110ee826116e6565b925192836116a5565b81528581943d92013e613013565b5060609250613013565b945094505050503461112057505080f35b7fb398979f000000000000000000000000000000000000000000000000000000008152fd5b602483838751917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b836024918751917faa1d49a4000000000000000000000000000000000000000000000000000000008352820152fd5b9091508381813d83116111cf575b6111bb81836116a5565b810103126111cb57519038611008565b8880fd5b503d6111b1565b8483517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538610fc0565b50346101f757827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757611263611e5a565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009081549060ff8216156112e357507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a180f35b83517f8dfc202b000000000000000000000000000000000000000000000000000000008152fd5b509190346101f357807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f3576113436115fb565b903373ffffffffffffffffffffffffffffffffffffffff83160361136d575061041a919235612114565b8390517f6697b232000000000000000000000000000000000000000000000000000000008152fd5b5090346101f757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f75761041a91356113d760016103e46115fb565b612049565b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f357602090517f01010000000000000000000000000000000000000000000000000000000000008152f35b50346101f75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757816020936001923581527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680085522001549051908152f35b5050346101f357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f3576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000481d89337abcb336bdfa422e85af8aa88919b342168152f35b925050346101f75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f757357fffffffff0000000000000000000000000000000000000000000000000000000081168091036101f757602092507f63e0baa300000000000000000000000000000000000000000000000000000000811490811561159e575b5015158152f35b7f7965db0b000000000000000000000000000000000000000000000000000000008114915081156115d1575b5038611597565b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386115ca565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361161e57565b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361161e57565b67ffffffffffffffff811161165a57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761165a57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761165a57604052565b67ffffffffffffffff811161165a57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261172c826116e6565b9161173a60405193846116a5565b82948184528183011161161e578281602093846000960137010152565b9080601f8301121561161e5781602061177293359101611720565b90565b3590811515820361161e57565b9181601f8401121561161e5782359167ffffffffffffffff831161161e576020838186019501011161161e57565b60005b8381106117c35750506000910152565b81810151838201526020016117b3565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361180f815180928187528780880191016117b0565b0116010190565b9181601f8401121561161e5782359167ffffffffffffffff831161161e576020808501948460051b01011161161e57565b6004359060ff8216820361161e57565b359060ff8216820361161e57565b67ffffffffffffffff811161165a5760051b60200190565b9080601f8301121561161e57602090823561189781611865565b936118a560405195866116a5565b81855260208086019260051b82010192831161161e57602001905b8282106118ce575050505090565b813581529083019083016118c0565b81601f8201121561161e578035916020916118f784611865565b9360409261190860405196876116a5565b818652848087019260051b8401019381851161161e57858401925b858410611934575050505050505090565b67ffffffffffffffff90843582811161161e57860190608091827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0828803011261161e57845190838201828110868211176119e65786528a81013585811161161e57878c6119a492840101611757565b825285810135948516850361161e576119d78b95948695868501526060926119cd848201611857565b8986015201611775565b90820152815201930192611923565b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b9190916101e090818185031261161e576040519182019367ffffffffffffffff948381108682111761165a576040528294823581811161161e5782611a5a918501611757565b8452602083013581811161161e5782611a74918501611757565b6020850152604083013581811161161e5782611a91918501611757565b6040850152611aa260608401611857565b60608501526080830135608085015260a083013560a0850152611ac760c08401611775565b60c0850152611ad860e08401611775565b60e0850152610100611aeb818501611775565b90850152610120611afd818501611775565b90850152610140611b0f818501611775565b908501526101608084013582811161161e5783611b2d918601611757565b908501526101808084013582811161161e5783611b4b91860161187d565b908501526101a0918284013591821161161e57611b699184016118dd565b908301526101c080910135910152565b919060e08382031261161e576040519067ffffffffffffffff9060e083018281118482101761165a576040528294803583811161161e5782611bbc918301611757565b8452602081013583811161161e5782611bd6918301611757565b6020850152611be760408201611775565b6040850152606081013583811161161e5782611c04918301611757565b6060850152608081013583811161161e5782611c2191830161187d565b608085015260a081013592831161161e57611c4260c09392849383016118dd565b60a08501520135910152565b93929192604051947fcae94c94000000000000000000000000000000000000000000000000000000008652336004870152602095868160248173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000d685179d71b41b1bf67bdac3d12ad72d5045e4b5165afa908115611db057600091611d7a575b5015611d505715611d1b578201938285031261161e5781359167ffffffffffffffff831161161e57611d1794611d1193611d099201611b79565b923691611720565b90612939565b9091565b8201938285031261161e5781359167ffffffffffffffff831161161e57611d1794611d4a93611d099201611a14565b906122da565b60046040517f05188bfc000000000000000000000000000000000000000000000000000000008152fd5b8781813d8311611da9575b611d8f81836116a5565b810103126101f357519081151582036101f0575038611ccf565b503d611d85565b6040513d6000823e3d90fd5b9190811015611dcc5760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60208183031261161e5780519067ffffffffffffffff821161161e570181601f8201121561161e578051611e2e816116e6565b92611e3c60405194856116a5565b8184526020828401011161161e5761177291602080850191016117b0565b3360009081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b60205260409020547f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9060ff1615611eb65750565b604490604051907fe2517d3f0000000000000000000000000000000000000000000000000000000082523360048301526024820152fd5b3360009081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604081205460ff1615611eb65750565b806000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260406000203360005260205260ff6040600020541615611eb65750565b73ffffffffffffffffffffffffffffffffffffffff1660008181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d60205260408120549091907f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268009060ff1661204457828052602052604082208183526020526040822060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505090565b906000918083527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268008060205273ffffffffffffffffffffffffffffffffffffffff6040852093169283855260205260ff6040852054161560001461210e57818452602052604083208284526020526040832060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339380a4600190565b50505090565b906000918083527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268008060205273ffffffffffffffffffffffffffffffffffffffff6040852093169283855260205260ff60408520541660001461210e5781845260205260408320828452602052604083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4600190565b90815180825260208080930193019160005b8281106121f5575050505090565b8351855293810193928101926001016121e7565b908082519081815260208091019281808460051b8301019501936000915b8483106122375750505050505090565b9091929394958480827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0856001950301865289519061227f60808351908084528301906117d3565b9167ffffffffffffffff848201511684830152604060ff81830151169083015260608091015115159101529801930193019194939290612227565b6122d2906020604051928284809451938492016117b0565b810103902090565b91906101408301805161290f5760c084018051156128d65760e0850151158015906128c8575b80156128ba575b80156128b0575b6128865760a085015160808601511061285c575b60009260e08601918251151580612853575b845115158061284a575b81612842575b50612839575b8051612830575b600785101561280157600094612413916101c089019182519060248960409384516123bd81602081019388855261238c8d60608401906117d3565b9089830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018352826116a5565b519020926123c9612f0f565b73ffffffffffffffffffffffffffffffffffffffff97889160ff166000527fcc4154715de11014e2fc2b9a91f0be7b1928d6f735a27ddfce6492aefc2bc501602052604060002090565b54168451928380927fb514681e00000000000000000000000000000000000000000000000000000000825260049e8f8301525afa90811561274c576000916127e8575b5080519061246a6020820192832084612eb4565b3b6127c0578051156127985751906000f599848b1698891561277157857f000000000000000000000000481d89337abcb336bdfa422e85af8aa88919b34216803b1561161e5760006124fa8c928a8388518096819582947fe6aba073000000000000000000000000000000000000000000000000000000008452828b8501526080602485015260848401906117d3565b9060448301527f0101000000000000000000000000000000000000000000000000000000000000606483015203925af1801561276657612757575b50893b1561161e578251907fc9af28b30000000000000000000000000000000000000000000000000000000082528101602090528981808451602482016101e090526102048201612585916117d3565b602086019b8c517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc92838582030160448601526125c1916117d3565b9d8888019e8f5190848682030160648701526125dc916117d3565b91606089019a8b5160ff16608487015260808a015160a487015260a08a015160c487015251151560e486015251151561010485015261010088015115156101248501526101208801511515610144850152511515610164840152610160870151908284820301610184850152612651916117d3565b6101808701519082848203016101a485015261266c916121d5565b6101a087015191838203016101c484015261268691612209565b88516101e483015203815a6000948591f1801561274c578a959360ff6126de61272c957f5a74099ba6991aeb15a22db4438f7a363b7f35cbe0d7ade0c13f3c106bb039ee9b9a989561271e9561273d575b5051612f64565b95519a519b519351169a6126f1896122ba565b9a61270d83519a8b9a8b5260c060208c015260c08b01906117d3565b9289015287820360608901526117d3565b9085820360808701526117d3565b9660a084015216940390a460019190565b61274690611646565b386126d7565b83513d6000823e3d90fd5b61276090611646565b38612535565b84513d6000823e3d90fd5b82517f741752c2000000000000000000000000000000000000000000000000000000008152fd5b8a84517f4ca249dc000000000000000000000000000000000000000000000000000000008152fd5b8a84517fa6bdfcb7000000000000000000000000000000000000000000000000000000008152fd5b6127fb913d8091833e61063b81836116a5565b38612456565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60049450612351565b6003945061234a565b905038612344565b6002965061233e565b60019550612334565b60046040517f4bb2e5a5000000000000000000000000000000000000000000000000000000008152fd5b60046040517f3e18315e000000000000000000000000000000000000000000000000000000008152fd5b508151151561230e565b506101208501511515612307565b506101008501511515612300565b60a08501516080860151146123225760046040517f4bb2e5a5000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6adb5e34000000000000000000000000000000000000000000000000000000008152fd5b60408101805190939260009161290f576129566020840151612f64565b94829051612eac575b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff871614612ea4575b6007811015612e775760248373ffffffffffffffffffffffffffffffffffffffff612a1560c0880151604051612a09816020810193604085526129d7606083018c6117d3565b906040830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018352826116a5565b519020946102c1612f0f565b5416604051928380927fb514681e00000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff8c16151560048301525afa908115612dbe578491612e5d575b50805190612a836020820192832084612eb4565b3b612e3357805115612e0957519084f59473ffffffffffffffffffffffffffffffffffffffff861615612ddf5773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000481d89337abcb336bdfa422e85af8aa88919b3421673ffffffffffffffffffffffffffffffffffffffff821615600014612dd85786905b803b156106545773ffffffffffffffffffffffffffffffffffffffff859189836040518096819582947fe6aba0730000000000000000000000000000000000000000000000000000000084521660048301526080602483015273ffffffffffffffffffffffffffffffffffffffff612b84608484018c6117d3565b911660448301527f0101000000000000000000000000000000000000000000000000000000000000606483015203925af18015612dbe57612dc9575b50612bcb8451612f64565b612bd86060860151612f64565b90608086015160a08701519073ffffffffffffffffffffffffffffffffffffffff8a163b156108395791612ca173ffffffffffffffffffffffffffffffffffffffff92612c7189958560405198899788977f1b7fd4ec000000000000000000000000000000000000000000000000000000008952166004880152818b16602488015216604486015260a0606486015260a48501906121d5565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc848303016084850152612209565b03818373ffffffffffffffffffffffffffffffffffffffff8c165af18015612dbe5790879291612d6e575b5090604073ffffffffffffffffffffffffffffffffffffffff807f5a74099ba6991aeb15a22db4438f7a363b7f35cbe0d7ade0c13f3c106bb039ee9460c0612d148a51612f64565b99015197612d3d612d24896122ba565b988487519816885260c0602089015260c08801906117d3565b9885870152806020878b039a8b60608a0152828152818c0160808a0152015260a0860152169616940190a460019190565b73ffffffffffffffffffffffffffffffffffffffff807f5a74099ba6991aeb15a22db4438f7a363b7f35cbe0d7ade0c13f3c106bb039ee949396612db3604094611646565b969394505050612ccc565b6040513d86823e3d90fd5b612dd290611646565b38612bc0565b8190612b09565b60046040517f741752c2000000000000000000000000000000000000000000000000000000008152fd5b60046040517f4ca249dc000000000000000000000000000000000000000000000000000000008152fd5b60046040517fa6bdfcb7000000000000000000000000000000000000000000000000000000008152fd5b612e7191503d8086833e61063b81836116a5565b38612a6f565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526021600452fd5b506006612991565b50600561295f565b605591600b9160405191604083015260208201523081520160ff81532090565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006040519160601b1660208201526014815261177281611689565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416612f3a57565b60046040517fd93c0665000000000000000000000000000000000000000000000000000000008152fd5b60208151910151907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000918281169160148110612fa5575b5050905060601c90565b8391925060140360031b1b1616803880612f9b565b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615612fe957565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b90613052575080511561302857805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b815115806130aa575b613063575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b1561305b56fea2646970667358221220b943be94bc090e00e9f0a09c2c7c60ff1439e94da8d41325b1e501de718b095264736f6c63430008180033

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

000000000000000000000000d685179d71b41b1bf67bdac3d12ad72d5045e4b5000000000000000000000000481d89337abcb336bdfa422e85af8aa88919b342

-----Decoded View---------------
Arg [0] : masterRouter (address): 0xd685179d71B41b1BF67bdac3d12aD72D5045e4b5
Arg [1] : registry (address): 0x481d89337aBcb336bdfA422e85af8aa88919b342

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000d685179d71b41b1bf67bdac3d12ad72d5045e4b5
Arg [1] : 000000000000000000000000481d89337abcb336bdfa422e85af8aa88919b342


Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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.