Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
UTSRegistry
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 99999 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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/utils/structs/EnumerableSet.sol"; import "./libraries/BytesLib.sol"; import "./libraries/UTSCoreDataTypes.sol"; import "./interfaces/IUTSRegistry.sol"; /** * @notice A contract stores the metadata of registered UTS compatible contracts. * * @dev It is an implementation of {UTSRegistry} for UUPS. */ contract UTSRegistry is IUTSRegistry, AccessControlUpgradeable, UUPSUpgradeable { using EnumerableSet for EnumerableSet.AddressSet; using BytesLib for bytes; /// @notice {AccessControl} role identifier for approver addresses. bytes32 public constant APPROVER_ROLE = keccak256("APPROVER_ROLE"); /// @notice {AccessControl} role identifier for UTS factory addresses. bytes32 public constant FACTORY_ROLE = keccak256("FACTORY_ROLE"); /// @custom:storage-location erc7201:UTSProtocol.storage.UTSRegistry.Main struct Main { EnumerableSet.AddressSet _deployments; EnumerableSet.AddressSet _underlyingTokens; mapping(uint256 index => address deploymentAddress) _deploymentByIndex; mapping(address deployment => DeploymentData) _deploymentData; mapping(address underlyingToken => EnumerableSet.AddressSet deploymentsAddresses) _deploymentsByUnderlying; mapping(bytes deployer => EnumerableSet.AddressSet deploymentsAddresses) _deploymentsByDeployer; } /// @dev keccak256(abi.encode(uint256(keccak256("UTSProtocol.storage.UTSRegistry.Main")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant MAIN_STORAGE_LOCATION = 0x34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4500; /// @notice Indicates an error that the provided {deployer} address is empty. error UTSRegistry__E0(); /// @notice Indicates an error that the function caller is not a registered deployment. error UTSRegistry__E1(); /** * @notice Emitted when a new UTS compatible contract is registered. * @param deployment newly registered UTS compatible contract address. * @param deployerIndexed indexed deployer address. * @param deployer deployer address. * @param underlyingToken underlying token address. * @param protocolVersion UTS protocol version. */ event Registered( address deployment, bytes indexed deployerIndexed, bytes deployer, address indexed underlyingToken, bytes2 indexed protocolVersion ); /** * @notice Emitted when a metadata of registered UTS compatible contract is updated. * @param deployment registered UTS compatible contract address. * @param deployerIndexed indexed deployer address. * @param deployer deployer address. * @param underlyingToken underlying token address. * @param protocolVersion new UTS protocol version. */ event DeploymentUpdated( address indexed deployment, bytes indexed deployerIndexed, bytes deployer, address underlyingToken, bytes2 indexed protocolVersion ); /** * @notice Emitted when {ChainConfig} settings of registered {UTSToken} or {UTSConnector} are updated. * @param deployment the registered {UTSToken} or {UTSConnector} contract address. * @param allowedChainIds new chains Ids available for bridging in both directions. * @param chainConfigs array of new {ChainConfig} settings for corresponding {allowedChainIds}. * @dev See the {UTSERC20DataTypes.ChainConfig} for details. */ event ChainConfigUpdated( address indexed deployment, uint256[] allowedChainIds, ChainConfig[] chainConfigs ); /** * @notice Emitted when the {_router} address of registered UTS compatible contract is updated. * @param deployment the registered UTS compatible contract address. * @param newRouter new {_router} address. */ event RouterUpdated(address indexed deployment, address indexed newRouter); /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } /** * @notice Initializes basic settings with provided parameters. * @param defaultAdmin initial {DEFAULT_ADMIN_ROLE} address. */ function initialize(address defaultAdmin) external initializer() { __UUPSUpgradeable_init(); __AccessControl_init(); _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin); } /** * @notice Registers a new UTS compatible contract with provided metadata. * @param deployment UTS compatible contract address. * @param deployer deployer address. * @param underlyingToken underlying token address. * @param protocolVersion UTS protocol version. * @dev Only addresses with the {FACTORY_ROLE} can execute this function. */ function registerDeployment( address deployment, bytes calldata deployer, address underlyingToken, bytes2 protocolVersion ) external onlyRole(FACTORY_ROLE) { _addDeployment(deployment, deployer, underlyingToken, protocolVersion); } /** * @notice Manually registers a new UTS compatible contracts with provided metadata. * @param requests array of {ApproveRequestData} UTS compatible contracts metadata, containing: * deployment: UTS compatible contract address * deployer: deployer address * underlyingToken: underlying token contract address * protocolVersion: UTS protocol version * @dev See the {UTSCoreDataTypes.ApproveRequestData} for details. * @dev Only addresses with the {APPROVER_ROLE} can execute this function. */ function approveRequestBatch(ApproveRequestData[] calldata requests) external onlyRole(APPROVER_ROLE) returns(bool) { for (uint256 i; requests.length > i; ++i) { _addDeployment( requests[i].deployment, requests[i].deployer, requests[i].underlyingToken, requests[i].protocolVersion ); } return true; } /** * @notice Emits the event when {ChainConfig} settings of registered {UTSToken} or {UTSConnector} are updated. * @param allowedChainIds new chains Ids available for bridging in both directions. * @param chainConfigs array of new {ChainConfig} settings for corresponding {allowedChainIds}. * @dev See the {UTSERC20DataTypes.ChainConfig} for details. * @dev Only registered UTS compatible contracts can execute this function. */ function updateChainConfigs(uint256[] calldata allowedChainIds, ChainConfig[] calldata chainConfigs) external { if (deploymentData(msg.sender).deployer.length == 0) revert UTSRegistry__E1(); emit ChainConfigUpdated(msg.sender, allowedChainIds, chainConfigs); } /** * @notice Emits the event when the {_router} address of registered UTS compatible contract is updated. * @param newRouter new {_router} address. * @dev Only registered UTS compatible contracts can execute this function. */ function updateRouter(address newRouter) external { if (deploymentData(msg.sender).deployer.length == 0) revert UTSRegistry__E1(); emit RouterUpdated(msg.sender, newRouter); } /** * @notice Returns whether any registered UTS compatible contract uses the provided {underlyingToken} contract. * @param underlyingToken {underlyingToken} contract address. * @return isRegistered result. */ function validateUnderlyingRegistered(address underlyingToken) external view returns(bool isRegistered) { Main storage $ = _getMainStorage(); return $._underlyingTokens.contains(underlyingToken); } /** * @notice Returns whether the provided {deployment} contract is registered UTS compatible contract. * @param deployment target contract address. * @return isRegistered result. */ function validateDeploymentRegistered(address deployment) external view returns(bool isRegistered) { return deploymentData(deployment).deployer.length != 0; } /** * @notice Returns whether provided {target} address has the {AccessControl.FACTORY_ROLE}. * @param target target contract address. * @return isAuthorized result. */ function validateFactory(address target) external view returns(bool isAuthorized) { return hasRole(FACTORY_ROLE, target); } /** * @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(IUTSRegistry).interfaceId || super.supportsInterface(interfaceId); } /** * @notice Returns a metadata of provided registered UTS compatible contract address. * @param deployment registered UTS compatible contract address. * @return Metadata {DeploymentData} of provided registered UTS compatible contract address. * @dev See the {UTSCoreDataTypes.DeploymentData} for details. */ function deploymentData(address deployment) public view returns(DeploymentData memory) { Main storage $ = _getMainStorage(); return $._deploymentData[deployment]; } /** * @notice Returns the total number of registered UTS compatible contracts. * @return Total number of registered UTS compatible contracts. */ function totalDeployments() external view returns(uint256) { Main storage $ = _getMainStorage(); return $._deployments.length(); } /** * @notice Returns all underlying tokens that used by UTS compatible contracts. * @return Array of addresses of all {underlyingToken} that used by UTS compatible contracts. */ function underlyingTokens() external view returns(address[] memory) { Main storage $ = _getMainStorage(); return $._underlyingTokens.values(); } /** * @notice Returns all registered UTS compatible contracts. * @return Array of addresses of all registered UTS compatible contracts. */ function deployments() external view returns(address[] memory) { Main storage $ = _getMainStorage(); return $._deployments.values(); } /** * @notice Returns registered UTS compatible contracts addresses for provided indexes. * @return deploymentsAdresses array of addresses of registered UTS compatible contracts for provided {indexes}. */ function deploymentsByIndex(uint256[] calldata indexes) external view returns(address[] memory deploymentsAdresses) { Main storage $ = _getMainStorage(); deploymentsAdresses = new address[](indexes.length); for (uint256 i; indexes.length > i; ++i) deploymentsAdresses[i] = $._deploymentByIndex[indexes[i]]; } /** * @notice Returns registered UTS compatible contracts that uses provided underlying token contract. * @return Array of addresses of registered UTS compatible contracts that uses provided {underlyingToken} contract. */ function deploymentsByUnderlying(address underlyingToken) external view returns(address[] memory) { Main storage $ = _getMainStorage(); return $._deploymentsByUnderlying[underlyingToken].values(); } /** * @notice Returns registered UTS compatible contracts that deployed by provided deployer. * @return Array of addresses of registered UTS compatible contracts that deployed by provided {deployer} address. */ function deploymentsByDeployer(bytes calldata deployer) external view returns(address[] memory) { Main storage $ = _getMainStorage(); return $._deploymentsByDeployer[deployer].values(); } function _authorizeUpgrade(address /* newImplementation */) internal override onlyRole(DEFAULT_ADMIN_ROLE) { } function _addDeployment( address deployment, bytes calldata deployer, address underlyingToken, bytes2 protocolVersion ) internal { if (deployer.length == 0) revert UTSRegistry__E0(); Main storage $ = _getMainStorage(); if ($._deploymentData[deployment].deployer.length == 0) { $._deploymentData[deployment].underlyingToken = underlyingToken; $._underlyingTokens.add(underlyingToken); $._deploymentsByUnderlying[underlyingToken].add(deployment); $._deploymentByIndex[$._deployments.length()] = deployment; $._deployments.add(deployment); emit Registered(deployment, deployer, deployer, underlyingToken, protocolVersion); } else { if (!$._deploymentData[deployment].deployer.equalStorage(deployer)) { $._deploymentsByDeployer[$._deploymentData[deployment].deployer].remove(deployment); } emit DeploymentUpdated( deployment, deployer, deployer, $._deploymentData[deployment].underlyingToken, protocolVersion ); } $._deploymentsByDeployer[deployer].add(deployment); $._deploymentData[deployment].deployer = deployer; $._deploymentData[deployment].initProtocolVersion = protocolVersion; } function _getMainStorage() private pure returns(Main storage $) { assembly { $.slot := MAIN_STORAGE_LOCATION } } }
// 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; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.20; import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol"; import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol"; import {Initializable} from "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. */ abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable address private immutable __self = address(this); /** * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)` * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called, * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string. * If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function * during an upgrade. */ string public constant UPGRADE_INTERFACE_VERSION = "5.0.0"; /** * @dev The call is from an unauthorized context. */ error UUPSUnauthorizedCallContext(); /** * @dev The storage `slot` is unsupported as a UUID. */ error UUPSUnsupportedProxiableUUID(bytes32 slot); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { _checkProxy(); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { _checkNotDelegated(); _; } function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual notDelegated returns (bytes32) { return ERC1967Utils.IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data); } /** * @dev Reverts if the execution is not performed via delegatecall or the execution * context is not of a proxy with an ERC1967-compliant implementation pointing to self. * See {_onlyProxy}. */ function _checkProxy() internal view virtual { if ( address(this) == __self || // Must be called through delegatecall ERC1967Utils.getImplementation() != __self // Must be called through an active proxy ) { revert UUPSUnauthorizedCallContext(); } } /** * @dev Reverts if the execution is performed via delegatecall. * See {notDelegated}. */ function _checkNotDelegated() internal view virtual { if (address(this) != __self) { // Must not be called through delegatecall revert UUPSUnauthorizedCallContext(); } } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call. * * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value * is expected to be the implementation slot in ERC1967. * * Emits an {IERC1967-Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) { revert UUPSUnsupportedProxiableUUID(slot); } ERC1967Utils.upgradeToAndCall(newImplementation, data); } catch { // The implementation is not UUPS revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.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; } }
// 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; } }
// 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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.20; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.20; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {UpgradeableBeacon} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol) pragma solidity ^0.8.20; import {IBeacon} from "../beacon/IBeacon.sol"; import {Address} from "../../utils/Address.sol"; import {StorageSlot} from "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. */ library ERC1967Utils { // We re-declare ERC-1967 events here because they can't be used directly from IERC1967. // This will be fixed in Solidity 0.8.21. At that point we should remove these events. /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev The `implementation` of the proxy is invalid. */ error ERC1967InvalidImplementation(address implementation); /** * @dev The `admin` of the proxy is invalid. */ error ERC1967InvalidAdmin(address admin); /** * @dev The `beacon` of the proxy is invalid. */ error ERC1967InvalidBeacon(address beacon); /** * @dev An upgrade function sees `msg.value > 0` that may be lost. */ error ERC1967NonPayable(); /** * @dev Returns the current implementation address. */ function getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { if (newImplementation.code.length == 0) { revert ERC1967InvalidImplementation(newImplementation); } StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Performs implementation upgrade with additional setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); if (data.length > 0) { Address.functionDelegateCall(newImplementation, data); } else { _checkNonPayable(); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { if (newAdmin == address(0)) { revert ERC1967InvalidAdmin(address(0)); } StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {IERC1967-AdminChanged} event. */ function changeAdmin(address newAdmin) internal { emit AdminChanged(getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { if (newBeacon.code.length == 0) { revert ERC1967InvalidBeacon(newBeacon); } StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon; address beaconImplementation = IBeacon(newBeacon).implementation(); if (beaconImplementation.code.length == 0) { revert ERC1967InvalidImplementation(beaconImplementation); } } /** * @dev Change the beacon and trigger a setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-BeaconUpgraded} event. * * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for * efficiency. */ function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } else { _checkNonPayable(); } } /** * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract * if an upgrade doesn't perform an initialization call. */ function _checkNonPayable() private { if (msg.value > 0) { revert ERC1967NonPayable(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/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); }
// 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 } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._positions[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._positions[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// 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; }
// SPDX-License-Identifier: Unlicense /* * @title Solidity Bytes Arrays Utils * @author Gonçalo Sá <[email protected]> * * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity. * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage. */ pragma solidity >=0.8.0 <0.9.0; library BytesLib { function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) { bool success = true; assembly { let length := mload(_preBytes) // if lengths don't match the arrays are not equal switch eq(length, mload(_postBytes)) case 1 { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 let mc := add(_preBytes, 0x20) let end := add(mc, length) for { let cc := add(_postBytes, 0x20) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) } eq(add(lt(mc, end), cb), 2) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { // if any of these checks fails then arrays are not equal if iszero(eq(mload(mc), mload(cc))) { // unsuccess: success := 0 cb := 0 } } } default { // unsuccess: success := 0 } } return success; } function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) { bool success = true; assembly { // we know _preBytes_offset is 0 let fslot := sload(_preBytes.slot) // Decode the length of the stored array like in concatStorage(). let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) // if lengths don't match the arrays are not equal switch eq(slength, mlength) case 1 { // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage if iszero(iszero(slength)) { switch lt(slength, 32) case 1 { // blank the last byte which is the length fslot := mul(div(fslot, 0x100), 0x100) if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { // unsuccess: success := 0 } } default { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := keccak256(0x0, 0x20) let mc := add(_postBytes, 0x20) let end := add(mc, mlength) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) for { } eq(add(lt(mc, end), cb), 2) { sc := add(sc, 1) mc := add(mc, 0x20) } { if iszero(eq(sload(sc), mload(mc))) { // unsuccess: success := 0 cb := 0 } } } } } default { // unsuccess: success := 0 } } return success; } }
// 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 }
// 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; }
{ "viaIR": true, "evmVersion": "paris", "optimizer": { "enabled": true, "runs": 99999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"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":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"UTSRegistry__E0","type":"error"},{"inputs":[],"name":"UTSRegistry__E1","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"deployment","type":"address"},{"indexed":false,"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"}],"indexed":false,"internalType":"struct ChainConfig[]","name":"chainConfigs","type":"tuple[]"}],"name":"ChainConfigUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"deployment","type":"address"},{"indexed":true,"internalType":"bytes","name":"deployerIndexed","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"deployer","type":"bytes"},{"indexed":false,"internalType":"address","name":"underlyingToken","type":"address"},{"indexed":true,"internalType":"bytes2","name":"protocolVersion","type":"bytes2"}],"name":"DeploymentUpdated","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":"deployment","type":"address"},{"indexed":true,"internalType":"bytes","name":"deployerIndexed","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"deployer","type":"bytes"},{"indexed":true,"internalType":"address","name":"underlyingToken","type":"address"},{"indexed":true,"internalType":"bytes2","name":"protocolVersion","type":"bytes2"}],"name":"Registered","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":true,"internalType":"address","name":"deployment","type":"address"},{"indexed":true,"internalType":"address","name":"newRouter","type":"address"}],"name":"RouterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"APPROVER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FACTORY_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"deployment","type":"address"},{"internalType":"bytes","name":"deployer","type":"bytes"},{"internalType":"address","name":"underlyingToken","type":"address"},{"internalType":"bytes2","name":"protocolVersion","type":"bytes2"}],"internalType":"struct ApproveRequestData[]","name":"requests","type":"tuple[]"}],"name":"approveRequestBatch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"deployment","type":"address"}],"name":"deploymentData","outputs":[{"components":[{"internalType":"bytes","name":"deployer","type":"bytes"},{"internalType":"address","name":"underlyingToken","type":"address"},{"internalType":"bytes2","name":"initProtocolVersion","type":"bytes2"}],"internalType":"struct DeploymentData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deployments","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"deployer","type":"bytes"}],"name":"deploymentsByDeployer","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"indexes","type":"uint256[]"}],"name":"deploymentsByIndex","outputs":[{"internalType":"address[]","name":"deploymentsAdresses","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"underlyingToken","type":"address"}],"name":"deploymentsByUnderlying","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"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":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"deployment","type":"address"},{"internalType":"bytes","name":"deployer","type":"bytes"},{"internalType":"address","name":"underlyingToken","type":"address"},{"internalType":"bytes2","name":"protocolVersion","type":"bytes2"}],"name":"registerDeployment","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDeployments","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"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[]"}],"name":"updateChainConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRouter","type":"address"}],"name":"updateRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"deployment","type":"address"}],"name":"validateDeploymentRegistered","outputs":[{"internalType":"bool","name":"isRegistered","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"validateFactory","outputs":[{"internalType":"bool","name":"isAuthorized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"underlyingToken","type":"address"}],"name":"validateUnderlyingRegistered","outputs":[{"internalType":"bool","name":"isRegistered","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a080604052346100cd57306080527ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009081549060ff8260401c166100be57506001600160401b036002600160401b031982821601610079575b6040516131c29081620000d382396080518181816109350152610b330152f35b6001600160401b031990911681179091556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a1388080610059565b63f92ee8a960e01b8152600490fd5b600080fdfe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146101c757806304a0fb17146101c257806308483906146101bd578063248a9ca3146101b85780632af57555146101b35780632d05ecbf146101ae5780632f2ff15d146101a957806336568abe146101a45780634245962b1461019f5780634f1ef2861461019a57806352d1902d146101955780637d0b9c941461019057806391d148541461018b57806396f8e2191461018657806399ede69014610181578063a217fddf1461017c578063ad3cb1cc14610177578063afeaf2a814610172578063bd27dc9f1461016d578063c4d66de814610168578063c851cc3214610163578063cb086c491461015e578063d547741f14610159578063de46d04314610154578063e6aba0731461014f578063e7d437981461014a5763fb35b4e41461014557600080fd5b6119be565b611754565b611644565b61153a565b6114bb565b6113b7565b611286565b611076565b610fbf565b610ef0565b610e61565b610e27565b610d9d565b610cf1565b610bfe565b610bad565b610aed565b6108b5565b61075a565b6106cc565b61064b565b6105a7565b6104ba565b610430565b610369565b6102be565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576004357fffffffff0000000000000000000000000000000000000000000000000000000081168091036102b957807f483e45f1000000000000000000000000000000000000000000000000000000006020921490811561025c575b506040519015158152f35b7f7965db0b0000000000000000000000000000000000000000000000000000000081149150811561028f575b5038610251565b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610288565b600080fd5b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760206040517fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee278152f35b602090602060408183019282815285518094520193019160005b82811061033f575050505090565b835173ffffffffffffffffffffffffffffffffffffffff1685529381019392810192600101610331565b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957604051807f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45009182548082526020809201936000527fcd960aef3287ce6ac3b28e954a1e7eb26536e420df68ba96f922f5d7f799f297916000905b828210610419576104158561040981890382610803565b60405191829182610317565b0390f35b8354865294850194600193840193909101906103f2565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576004356000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526020600160406000200154604051908152f35b73ffffffffffffffffffffffffffffffffffffffff8116036102b957565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957602060ff61056d6004356104fc8161049c565b7fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee276000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166040519015158152f35b9181601f840112156102b95782359167ffffffffffffffff83116102b957602083818601950101116102b957565b346102b9576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760043567ffffffffffffffff81116102b9576105fa610600913690600401610579565b90611a19565b906040519081602084549182815201936000526020600020916000905b828210610634576104158561040981890382610803565b83548652948501946001938401939091019061061d565b346102b95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576106ca60243560043561068c8261049c565b806000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526106c5600160406000200154611ee4565b61204e565b005b346102b95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576024356107078161049c565b3373ffffffffffffffffffffffffffffffffffffffff821603610730576106ca90600435612152565b60046040517f6697b232000000000000000000000000000000000000000000000000000000008152fd5b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760206040517f408a36151f841709116a4e8aca4e0202874f7f54687dcb863b1ea4672dc9d8cf8152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff8211176107fe57604052565b6107b3565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176107fe57604052565b67ffffffffffffffff81116107fe57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261088a82610844565b916108986040519384610803565b8294818452818301116102b9578281602093846000960137010152565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760048035906108ed8261049c565b60243567ffffffffffffffff81116102b957366023820112156102b95761091d903690602481850135910161087e565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016803014908115610abf575b50610a96579060208392610972611ddf565b604051938480927f52d1902d00000000000000000000000000000000000000000000000000000000825288165afa60009281610a65575b506109fd5750506040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90921690820190815281906020010390fd5b83837f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8403610a30576106ca8383612aa4565b6040517faa1d49a400000000000000000000000000000000000000000000000000000000815290810184815281906020010390fd5b610a8891935060203d602011610a8f575b610a808183610803565b81019061224d565b91386109a9565b503d610a76565b826040517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538610960565b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610b835760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b60046040517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576020610bf2600435610bed8161049c565b611aa4565b51511515604051908152f35b346102b95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957602060ff61056d602435610c408161049c565b6004356000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b919082519283825260005b848110610cdd5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610c9e565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957610d2f600435610bed8161049c565b6040518091602082527fffff0000000000000000000000000000000000000000000000000000000000006040610d718351606060208701526080860190610c93565b9273ffffffffffffffffffffffffffffffffffffffff6020820151168286015201511660608301520390f35b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95773ffffffffffffffffffffffffffffffffffffffff600435610ded8161049c565b166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd450360205260206040600020541515604051908152f35b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957602060405160008152f35b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957604051604081019080821067ffffffffffffffff8311176107fe5761041591604052600581527f352e302e300000000000000000000000000000000000000000000000000000006020820152604051918291602083526020830190610c93565b346102b9576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957610f74600435610f2f8161049c565b73ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4506602052604060002090565b906040519081602084549182815201936000526020600020916000905b828210610fa8576104158561040981890382610803565b835486529485019460019384019390910190610f91565b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957604051807f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45029182548082526020809201936000527fe925d21000393e3474e2977b2446258a47b5915b2640cc9b72aa456fd6813b36916000905b82821061105f576104158561040981890382610803565b835486529485019460019384019390910190611048565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576004356110b18161049c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549067ffffffffffffffff60ff8360401c161592168015908161127e575b6001149081611274575b15908161126b575b5061124157611164908261115b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0060017fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000825416179055565b6111e557611c44565b61116a57005b6111b67ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a007fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff8154169055565b604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a1005b61123c7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff825416179055565b611c44565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b90501538611102565b303b1591506110fa565b8391506110f0565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576004356112c18161049c565b6112ca33611aa4565b51511561130f5773ffffffffffffffffffffffffffffffffffffffff16337f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684600080a3005b60046040517f2e755e49000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102b95782359167ffffffffffffffff83116102b9576020808501948460051b0101116102b957565b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102b9576004359067ffffffffffffffff82116102b9576113b391600401611339565b9091565b346102b9576113c53661136a565b6113ce81611c60565b916113dc6040519384610803565b8183527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061140983611c60565b0136602085013760005b80831161142857604051806104158682610317565b828110156114b657806114ac73ffffffffffffffffffffffffffffffffffffffff6114856114b19460051b8601356000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4504602052604060002090565b54166114918388611d08565b9073ffffffffffffffffffffffffffffffffffffffff169052565b611ca7565b611413565b611cd9565b346102b95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576106ca6024356004356114fc8261049c565b806000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052611535600160406000200154611ee4565b612152565b346102b9576115483661136a565b611550611e4f565b60005b8082116115665760405160018152602090f35b611571818385611d1c565b359061157c8261049c565b611587818486611d1c565b60209081810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102b957019081359167ffffffffffffffff83116102b957019281360384136102b957611615936114ac926115f860406115f2878a8c611d1c565b01611d5c565b9161160f6060611609888b8d611d1c565b01611d66565b93612565565b611553565b7fffff0000000000000000000000000000000000000000000000000000000000008116036102b957565b346102b95760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760043561167f8161049c565b60243567ffffffffffffffff81116102b95761169f903690600401610579565b604435906116ac8261049c565b606435926116b98461161a565b3360009081527fae397ad4942fd55c39428db5ea3ac85cc8592b20d92437b6ec53a8b6ff39d42d60205260409020547fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee27959060ff161561171d576106ca9550612565565b604486604051907fe2517d3f0000000000000000000000000000000000000000000000000000000082523360048301526024820152fd5b346102b9576040807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95767ffffffffffffffff906004358281116102b9576117a6903690600401611339565b6024358481116102b9576117be903690600401611339565b9190936117ca33611aa4565b5151156119955780519381855282828601526060927f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116102b957600596949392961b8091606087013784016060810191836020936060888503018589015252608096608083019060808660051b85010198876000955b88871061187257337f25bb14184ed47336f0e8c5b9b58e65ca31a0cfd0cf8eb80cd59b5005339b4db68c8e038da2005b9091929394959697989a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808282030186528b357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81843603018112156102b9578301908135917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018312156102b957918201803592908b018f84116102b95783360381136102b957611981838b61197a8f9687966119746119418f988f9c8d60019e899752890191611d70565b976119606119508b8501611daf565b67ffffffffffffffff16888c0152565b61196b818401611dc4565b60ff1690870152565b01611dd2565b1515910152565b9d0196019701959498979693929190611842565b600490517f2e755e49000000000000000000000000000000000000000000000000000000008152fd5b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760207f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd450054604051908152f35b60209082604051938492833781017f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd450781520301902090565b90600182811c92168015611a9a575b6020831014611a6b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611a60565b604051611ab0816107e2565b60608152611b0c6000928360406020948286820152015273ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b60405192611b19846107e2565b60405190808354611b2981611a51565b80855291600191808316908115611c075750600114611bd4575b50505060017fffff0000000000000000000000000000000000000000000000000000000000009383611b7e611bd19795611ba2950382610803565b8752015473ffffffffffffffffffffffffffffffffffffffff811692860192909252565b60501b1660408301907fffff000000000000000000000000000000000000000000000000000000000000169052565b90565b92508483528583205b828410611bf4575050508101830160018383611b43565b8054858501880152928601928101611bdd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001688870152505050151560051b82018401905060018383611b43565b611c5d90611c50612bbb565b611c58612bbb565b611f3c565b50565b67ffffffffffffffff81116107fe5760051b60200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611cd45760010190565b611c78565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80518210156114b65760209160051b010190565b91908110156114b65760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81813603018212156102b9570190565b35611bd18161049c565b35611bd18161161a565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b359067ffffffffffffffff821682036102b957565b359060ff821682036102b957565b359081151582036102b957565b3360009081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff1615611e1857565b60446040517fe2517d3f00000000000000000000000000000000000000000000000000000000815233600482015260006024820152fd5b3360009081527fdd2b03978755574964de3a540f0737454491b33185af74da97113472c72356d7602052604090207f408a36151f841709116a4e8aca4e0202874f7f54687dcb863b1ea4672dc9d8cf9060ff905b541615611ead5750565b604490604051907fe2517d3f0000000000000000000000000000000000000000000000000000000082523360048301526024820152fd5b806000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260ff611ea33360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d60205260408120547f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268009060ff1661204857818052602052611fdd82604083209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b50905090565b6000908082527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268008060205260ff6120a885604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541661214b578183526020526120e183604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d73ffffffffffffffffffffffffffffffffffffffff3394169280a4600190565b5050905090565b6000908082527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268008060205260ff6121ac85604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54161561214b578183526020526121e683604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b73ffffffffffffffffffffffffffffffffffffffff3394169280a4600190565b908160209103126102b9575190565b611bd19054611a51565b60405190816000825461227881611a51565b936001918083169081156122fd57506001146122bf575b5050602092507f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd450781520301902090565b9091506000526020906020600020906000915b8583106122e957505050506020918101388061228f565b8054878401528694509183019181016122d2565b91505060209492507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009150168252801515028101388061228f565b81604051928392833781016000815203902090565b9161237b60209273ffffffffffffffffffffffffffffffffffffffff92969596604086526040860191611d70565b9416910152565b60409073ffffffffffffffffffffffffffffffffffffffff611bd195931681528160208201520191611d70565b916123e7918354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055565b90601f81116123f957505050565b6000916000526020600020906020601f850160051c83019410612437575b601f0160051c01915b82811061242c57505050565b818155600101612420565b9092508290612417565b90929167ffffffffffffffff81116107fe57612467816124618454611a51565b846123eb565b6000601f82116001146124c15781906123e79394956000926124b6575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b013590503880612484565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08216946124f484600052602060002090565b91805b87811061254d575083600195969710612515575b505050811b019055565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88560031b161c1991013516905538808061250b565b909260206001819286860135815501940191016124f7565b9392938215612a7a5761283a60019361287f936128c7976125cd6125c88673ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b61225c565b6128c957612660818861261f8873ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b019073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61277773ffffffffffffffffffffffffffffffffffffffff6126d7876126d28386169561268c87612eef565b5073ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4506602052604060002090565b612d27565b50612770876127307f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4500546000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4504602052604060002090565b9073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b8616612fa7565b506127828383612338565b90604051917fbca7c1ec4586c63d30b61d560bb908e30d9adf1c3ed15fdeebe946dfe7f34e237fffff0000000000000000000000000000000000000000000000000000000000008b1693806127d988888c84612382565b0390a45b6127eb846126d28484611a19565b506128358473ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b612441565b73ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b01907fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff75ffff000000000000000000000000000000000000000083549260501c169116179055565b565b5061292e61292a6129198673ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b61292436868661087e565b90612c14565b1590565b612a1a575b61299b866129808673ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b015473ffffffffffffffffffffffffffffffffffffffff1690565b6129a58383612338565b604051917f3f301353389ef7d811c1f793df12ded6975ae83d646eb53ebf110a66b481a9a07fffff0000000000000000000000000000000000000000000000000000000000008b169380612a1273ffffffffffffffffffffffffffffffffffffffff8b169489898461234d565b0390a46127dd565b612a7484612a6f612a6a8273ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b612266565b612d07565b50612933565b60046040517f69e9585d000000000000000000000000000000000000000000000000000000008152fd5b90813b15612b745773ffffffffffffffffffffffffffffffffffffffff82167f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2805115612b4157611c5d91612d47565b505034612b4a57565b60046040517fb398979f000000000000000000000000000000000000000000000000000000008152fd5b60248273ffffffffffffffffffffffffffffffffffffffff604051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352166004820152fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615612bea57565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b60019181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8482161560081b018116841c92825191828514600114612c5f57505050505050600090565b84612c6d575b505050505090565b6020809510600114612ccf575060009081528381209183018401928401916001905b6002828686100114612cac575050505050505b3880808080612c65565b8351815403612cc2575b92850192600101612c8f565b9195508591829150612cb6565b939150507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091015191160315612ca257506000612ca2565b73ffffffffffffffffffffffffffffffffffffffff611bd1921690612e1c565b73ffffffffffffffffffffffffffffffffffffffff611bd1921690613058565b600080611bd193602081519101845af43d15612d85573d91612d6883610844565b92612d766040519485610803565b83523d6000602085013e6130ec565b6060916130ec565b80548210156114b65760005260206000200190600090565b8054908115612ded577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80920191612ddd8383612d8d565b909182549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001810191806000528260205260406000205492831515600014612ee6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9283850190858211611cd4578054948501948511611cd4576000958583612e9d97612e8e9503612ea3575b505050612da5565b90600052602052604060002090565b55600190565b612ecd612ec791612eb7612edd9487612d8d565b90549060031b1c92839187612d8d565b906123af565b8590600052602052604060002090565b55388080612e86565b50505050600090565b806000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45038060205260406000205415600014612fa0577f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45028054680100000000000000008110156107fe57600181018083558110156114b65783907fe925d21000393e3474e2977b2446258a47b5915b2640cc9b72aa456fd6813b3601555491600052602052604060002055600190565b5050600090565b806000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45018060205260406000205415600014612fa0577f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45008054680100000000000000008110156107fe57600181018083558110156114b65783907fcd960aef3287ce6ac3b28e954a1e7eb26536e420df68ba96f922f5d7f799f29701555491600052602052604060002055600190565b60018101908260005281602052604060002054156000146130e4578054680100000000000000008110156107fe576130cf61309a826001879401855584612d8d565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90555491600052602052604060002055600190565b505050600090565b9061312b575080511561310157805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580613183575b61313c575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b1561313456fea2646970667358221220ea4ebf58585bc813312804ceb393620d7e0dee0c5571c2aa3756edf11289c47a64736f6c63430008180033
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146101c757806304a0fb17146101c257806308483906146101bd578063248a9ca3146101b85780632af57555146101b35780632d05ecbf146101ae5780632f2ff15d146101a957806336568abe146101a45780634245962b1461019f5780634f1ef2861461019a57806352d1902d146101955780637d0b9c941461019057806391d148541461018b57806396f8e2191461018657806399ede69014610181578063a217fddf1461017c578063ad3cb1cc14610177578063afeaf2a814610172578063bd27dc9f1461016d578063c4d66de814610168578063c851cc3214610163578063cb086c491461015e578063d547741f14610159578063de46d04314610154578063e6aba0731461014f578063e7d437981461014a5763fb35b4e41461014557600080fd5b6119be565b611754565b611644565b61153a565b6114bb565b6113b7565b611286565b611076565b610fbf565b610ef0565b610e61565b610e27565b610d9d565b610cf1565b610bfe565b610bad565b610aed565b6108b5565b61075a565b6106cc565b61064b565b6105a7565b6104ba565b610430565b610369565b6102be565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576004357fffffffff0000000000000000000000000000000000000000000000000000000081168091036102b957807f483e45f1000000000000000000000000000000000000000000000000000000006020921490811561025c575b506040519015158152f35b7f7965db0b0000000000000000000000000000000000000000000000000000000081149150811561028f575b5038610251565b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610288565b600080fd5b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760206040517fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee278152f35b602090602060408183019282815285518094520193019160005b82811061033f575050505090565b835173ffffffffffffffffffffffffffffffffffffffff1685529381019392810192600101610331565b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957604051807f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45009182548082526020809201936000527fcd960aef3287ce6ac3b28e954a1e7eb26536e420df68ba96f922f5d7f799f297916000905b828210610419576104158561040981890382610803565b60405191829182610317565b0390f35b8354865294850194600193840193909101906103f2565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576004356000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526020600160406000200154604051908152f35b73ffffffffffffffffffffffffffffffffffffffff8116036102b957565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957602060ff61056d6004356104fc8161049c565b7fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee276000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166040519015158152f35b9181601f840112156102b95782359167ffffffffffffffff83116102b957602083818601950101116102b957565b346102b9576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760043567ffffffffffffffff81116102b9576105fa610600913690600401610579565b90611a19565b906040519081602084549182815201936000526020600020916000905b828210610634576104158561040981890382610803565b83548652948501946001938401939091019061061d565b346102b95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576106ca60243560043561068c8261049c565b806000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526106c5600160406000200154611ee4565b61204e565b005b346102b95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576024356107078161049c565b3373ffffffffffffffffffffffffffffffffffffffff821603610730576106ca90600435612152565b60046040517f6697b232000000000000000000000000000000000000000000000000000000008152fd5b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760206040517f408a36151f841709116a4e8aca4e0202874f7f54687dcb863b1ea4672dc9d8cf8152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff8211176107fe57604052565b6107b3565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176107fe57604052565b67ffffffffffffffff81116107fe57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261088a82610844565b916108986040519384610803565b8294818452818301116102b9578281602093846000960137010152565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760048035906108ed8261049c565b60243567ffffffffffffffff81116102b957366023820112156102b95761091d903690602481850135910161087e565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000c8eceadf29145bbae633fc675e9bc3ebb346c2cd16803014908115610abf575b50610a96579060208392610972611ddf565b604051938480927f52d1902d00000000000000000000000000000000000000000000000000000000825288165afa60009281610a65575b506109fd5750506040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90921690820190815281906020010390fd5b83837f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8403610a30576106ca8383612aa4565b6040517faa1d49a400000000000000000000000000000000000000000000000000000000815290810184815281906020010390fd5b610a8891935060203d602011610a8f575b610a808183610803565b81019061224d565b91386109a9565b503d610a76565b826040517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538610960565b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c8eceadf29145bbae633fc675e9bc3ebb346c2cd163003610b835760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b60046040517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576020610bf2600435610bed8161049c565b611aa4565b51511515604051908152f35b346102b95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957602060ff61056d602435610c408161049c565b6004356000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b919082519283825260005b848110610cdd5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610c9e565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957610d2f600435610bed8161049c565b6040518091602082527fffff0000000000000000000000000000000000000000000000000000000000006040610d718351606060208701526080860190610c93565b9273ffffffffffffffffffffffffffffffffffffffff6020820151168286015201511660608301520390f35b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95773ffffffffffffffffffffffffffffffffffffffff600435610ded8161049c565b166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd450360205260206040600020541515604051908152f35b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957602060405160008152f35b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957604051604081019080821067ffffffffffffffff8311176107fe5761041591604052600581527f352e302e300000000000000000000000000000000000000000000000000000006020820152604051918291602083526020830190610c93565b346102b9576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957610f74600435610f2f8161049c565b73ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4506602052604060002090565b906040519081602084549182815201936000526020600020916000905b828210610fa8576104158561040981890382610803565b835486529485019460019384019390910190610f91565b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b957604051807f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45029182548082526020809201936000527fe925d21000393e3474e2977b2446258a47b5915b2640cc9b72aa456fd6813b36916000905b82821061105f576104158561040981890382610803565b835486529485019460019384019390910190611048565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576004356110b18161049c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549067ffffffffffffffff60ff8360401c161592168015908161127e575b6001149081611274575b15908161126b575b5061124157611164908261115b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0060017fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000825416179055565b6111e557611c44565b61116a57005b6111b67ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a007fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff8154169055565b604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a1005b61123c7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff825416179055565b611c44565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b90501538611102565b303b1591506110fa565b8391506110f0565b346102b95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576004356112c18161049c565b6112ca33611aa4565b51511561130f5773ffffffffffffffffffffffffffffffffffffffff16337f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684600080a3005b60046040517f2e755e49000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102b95782359167ffffffffffffffff83116102b9576020808501948460051b0101116102b957565b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102b9576004359067ffffffffffffffff82116102b9576113b391600401611339565b9091565b346102b9576113c53661136a565b6113ce81611c60565b916113dc6040519384610803565b8183527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061140983611c60565b0136602085013760005b80831161142857604051806104158682610317565b828110156114b657806114ac73ffffffffffffffffffffffffffffffffffffffff6114856114b19460051b8601356000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4504602052604060002090565b54166114918388611d08565b9073ffffffffffffffffffffffffffffffffffffffff169052565b611ca7565b611413565b611cd9565b346102b95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b9576106ca6024356004356114fc8261049c565b806000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052611535600160406000200154611ee4565b612152565b346102b9576115483661136a565b611550611e4f565b60005b8082116115665760405160018152602090f35b611571818385611d1c565b359061157c8261049c565b611587818486611d1c565b60209081810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102b957019081359167ffffffffffffffff83116102b957019281360384136102b957611615936114ac926115f860406115f2878a8c611d1c565b01611d5c565b9161160f6060611609888b8d611d1c565b01611d66565b93612565565b611553565b7fffff0000000000000000000000000000000000000000000000000000000000008116036102b957565b346102b95760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760043561167f8161049c565b60243567ffffffffffffffff81116102b95761169f903690600401610579565b604435906116ac8261049c565b606435926116b98461161a565b3360009081527fae397ad4942fd55c39428db5ea3ac85cc8592b20d92437b6ec53a8b6ff39d42d60205260409020547fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee27959060ff161561171d576106ca9550612565565b604486604051907fe2517d3f0000000000000000000000000000000000000000000000000000000082523360048301526024820152fd5b346102b9576040807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95767ffffffffffffffff906004358281116102b9576117a6903690600401611339565b6024358481116102b9576117be903690600401611339565b9190936117ca33611aa4565b5151156119955780519381855282828601526060927f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116102b957600596949392961b8091606087013784016060810191836020936060888503018589015252608096608083019060808660051b85010198876000955b88871061187257337f25bb14184ed47336f0e8c5b9b58e65ca31a0cfd0cf8eb80cd59b5005339b4db68c8e038da2005b9091929394959697989a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808282030186528b357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81843603018112156102b9578301908135917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018312156102b957918201803592908b018f84116102b95783360381136102b957611981838b61197a8f9687966119746119418f988f9c8d60019e899752890191611d70565b976119606119508b8501611daf565b67ffffffffffffffff16888c0152565b61196b818401611dc4565b60ff1690870152565b01611dd2565b1515910152565b9d0196019701959498979693929190611842565b600490517f2e755e49000000000000000000000000000000000000000000000000000000008152fd5b346102b95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102b95760207f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd450054604051908152f35b60209082604051938492833781017f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd450781520301902090565b90600182811c92168015611a9a575b6020831014611a6b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611a60565b604051611ab0816107e2565b60608152611b0c6000928360406020948286820152015273ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b60405192611b19846107e2565b60405190808354611b2981611a51565b80855291600191808316908115611c075750600114611bd4575b50505060017fffff0000000000000000000000000000000000000000000000000000000000009383611b7e611bd19795611ba2950382610803565b8752015473ffffffffffffffffffffffffffffffffffffffff811692860192909252565b60501b1660408301907fffff000000000000000000000000000000000000000000000000000000000000169052565b90565b92508483528583205b828410611bf4575050508101830160018383611b43565b8054858501880152928601928101611bdd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001688870152505050151560051b82018401905060018383611b43565b611c5d90611c50612bbb565b611c58612bbb565b611f3c565b50565b67ffffffffffffffff81116107fe5760051b60200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611cd45760010190565b611c78565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80518210156114b65760209160051b010190565b91908110156114b65760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81813603018212156102b9570190565b35611bd18161049c565b35611bd18161161a565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b359067ffffffffffffffff821682036102b957565b359060ff821682036102b957565b359081151582036102b957565b3360009081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff1615611e1857565b60446040517fe2517d3f00000000000000000000000000000000000000000000000000000000815233600482015260006024820152fd5b3360009081527fdd2b03978755574964de3a540f0737454491b33185af74da97113472c72356d7602052604090207f408a36151f841709116a4e8aca4e0202874f7f54687dcb863b1ea4672dc9d8cf9060ff905b541615611ead5750565b604490604051907fe2517d3f0000000000000000000000000000000000000000000000000000000082523360048301526024820152fd5b806000527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260ff611ea33360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d60205260408120547f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268009060ff1661204857818052602052611fdd82604083209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b50905090565b6000908082527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268008060205260ff6120a885604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541661214b578183526020526120e183604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d73ffffffffffffffffffffffffffffffffffffffff3394169280a4600190565b5050905090565b6000908082527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268008060205260ff6121ac85604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54161561214b578183526020526121e683604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b73ffffffffffffffffffffffffffffffffffffffff3394169280a4600190565b908160209103126102b9575190565b611bd19054611a51565b60405190816000825461227881611a51565b936001918083169081156122fd57506001146122bf575b5050602092507f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd450781520301902090565b9091506000526020906020600020906000915b8583106122e957505050506020918101388061228f565b8054878401528694509183019181016122d2565b91505060209492507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009150168252801515028101388061228f565b81604051928392833781016000815203902090565b9161237b60209273ffffffffffffffffffffffffffffffffffffffff92969596604086526040860191611d70565b9416910152565b60409073ffffffffffffffffffffffffffffffffffffffff611bd195931681528160208201520191611d70565b916123e7918354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055565b90601f81116123f957505050565b6000916000526020600020906020601f850160051c83019410612437575b601f0160051c01915b82811061242c57505050565b818155600101612420565b9092508290612417565b90929167ffffffffffffffff81116107fe57612467816124618454611a51565b846123eb565b6000601f82116001146124c15781906123e79394956000926124b6575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b013590503880612484565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08216946124f484600052602060002090565b91805b87811061254d575083600195969710612515575b505050811b019055565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88560031b161c1991013516905538808061250b565b909260206001819286860135815501940191016124f7565b9392938215612a7a5761283a60019361287f936128c7976125cd6125c88673ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b61225c565b6128c957612660818861261f8873ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b019073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61277773ffffffffffffffffffffffffffffffffffffffff6126d7876126d28386169561268c87612eef565b5073ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4506602052604060002090565b612d27565b50612770876127307f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4500546000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4504602052604060002090565b9073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b8616612fa7565b506127828383612338565b90604051917fbca7c1ec4586c63d30b61d560bb908e30d9adf1c3ed15fdeebe946dfe7f34e237fffff0000000000000000000000000000000000000000000000000000000000008b1693806127d988888c84612382565b0390a45b6127eb846126d28484611a19565b506128358473ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b612441565b73ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b01907fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff75ffff000000000000000000000000000000000000000083549260501c169116179055565b565b5061292e61292a6129198673ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b61292436868661087e565b90612c14565b1590565b612a1a575b61299b866129808673ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b015473ffffffffffffffffffffffffffffffffffffffff1690565b6129a58383612338565b604051917f3f301353389ef7d811c1f793df12ded6975ae83d646eb53ebf110a66b481a9a07fffff0000000000000000000000000000000000000000000000000000000000008b169380612a1273ffffffffffffffffffffffffffffffffffffffff8b169489898461234d565b0390a46127dd565b612a7484612a6f612a6a8273ffffffffffffffffffffffffffffffffffffffff166000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd4505602052604060002090565b612266565b612d07565b50612933565b60046040517f69e9585d000000000000000000000000000000000000000000000000000000008152fd5b90813b15612b745773ffffffffffffffffffffffffffffffffffffffff82167f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2805115612b4157611c5d91612d47565b505034612b4a57565b60046040517fb398979f000000000000000000000000000000000000000000000000000000008152fd5b60248273ffffffffffffffffffffffffffffffffffffffff604051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352166004820152fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615612bea57565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b60019181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8482161560081b018116841c92825191828514600114612c5f57505050505050600090565b84612c6d575b505050505090565b6020809510600114612ccf575060009081528381209183018401928401916001905b6002828686100114612cac575050505050505b3880808080612c65565b8351815403612cc2575b92850192600101612c8f565b9195508591829150612cb6565b939150507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091015191160315612ca257506000612ca2565b73ffffffffffffffffffffffffffffffffffffffff611bd1921690612e1c565b73ffffffffffffffffffffffffffffffffffffffff611bd1921690613058565b600080611bd193602081519101845af43d15612d85573d91612d6883610844565b92612d766040519485610803565b83523d6000602085013e6130ec565b6060916130ec565b80548210156114b65760005260206000200190600090565b8054908115612ded577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80920191612ddd8383612d8d565b909182549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001810191806000528260205260406000205492831515600014612ee6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9283850190858211611cd4578054948501948511611cd4576000958583612e9d97612e8e9503612ea3575b505050612da5565b90600052602052604060002090565b55600190565b612ecd612ec791612eb7612edd9487612d8d565b90549060031b1c92839187612d8d565b906123af565b8590600052602052604060002090565b55388080612e86565b50505050600090565b806000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45038060205260406000205415600014612fa0577f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45028054680100000000000000008110156107fe57600181018083558110156114b65783907fe925d21000393e3474e2977b2446258a47b5915b2640cc9b72aa456fd6813b3601555491600052602052604060002055600190565b5050600090565b806000527f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45018060205260406000205415600014612fa0577f34c54c412898cb0c4b3c503b0c88b6ac073a7a2636fe835a402241e611fd45008054680100000000000000008110156107fe57600181018083558110156114b65783907fcd960aef3287ce6ac3b28e954a1e7eb26536e420df68ba96f922f5d7f799f29701555491600052602052604060002055600190565b60018101908260005281602052604060002054156000146130e4578054680100000000000000008110156107fe576130cf61309a826001879401855584612d8d565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90555491600052602052604060002055600190565b505050600090565b9061312b575080511561310157805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580613183575b61313c575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b1561313456fea2646970667358221220ea4ebf58585bc813312804ceb393620d7e0dee0c5571c2aa3756edf11289c47a64736f6c63430008180033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.