{"sources":{"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n    struct OwnableStorage {\n        address _owner;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n        assembly {\n            $.slot := OwnableStorageLocation\n        }\n    }\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    function __Ownable_init(address initialOwner) internal onlyInitializing {\n        __Ownable_init_unchained(initialOwner);\n    }\n\n    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        OwnableStorage storage $ = _getOwnableStorage();\n        return $._owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        OwnableStorage storage $ = _getOwnableStorage();\n        address oldOwner = $._owner;\n        $._owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Storage of the initializable contract.\n     *\n     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n     * when using with upgradeable contracts.\n     *\n     * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n     */\n    struct InitializableStorage {\n        /**\n         * @dev Indicates that the contract has been initialized.\n         */\n        uint64 _initialized;\n        /**\n         * @dev Indicates that the contract is in the process of being initialized.\n         */\n        bool _initializing;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n    /**\n     * @dev The contract is already initialized.\n     */\n    error InvalidInitialization();\n\n    /**\n     * @dev The contract is not initializing.\n     */\n    error NotInitializing();\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint64 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n     * production.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        // Cache values to avoid duplicated sloads\n        bool isTopLevelCall = !$._initializing;\n        uint64 initialized = $._initialized;\n\n        // Allowed calls:\n        // - initialSetup: the contract is not in the initializing state and no previous version was\n        //                 initialized\n        // - construction: the contract is initialized at version 1 (no reinitialization) and the\n        //                 current contract is just being deployed\n        bool initialSetup = initialized == 0 && isTopLevelCall;\n        bool construction = initialized == 1 && address(this).code.length == 0;\n\n        if (!initialSetup && !construction) {\n            revert InvalidInitialization();\n        }\n        $._initialized = 1;\n        if (isTopLevelCall) {\n            $._initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            $._initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint64 version) {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        if ($._initializing || $._initialized >= version) {\n            revert InvalidInitialization();\n        }\n        $._initialized = version;\n        $._initializing = true;\n        _;\n        $._initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        _checkInitializing();\n        _;\n    }\n\n    /**\n     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n     */\n    function _checkInitializing() internal view virtual {\n        if (!_isInitializing()) {\n            revert NotInitializing();\n        }\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        if ($._initializing) {\n            revert InvalidInitialization();\n        }\n        if ($._initialized != type(uint64).max) {\n            $._initialized = type(uint64).max;\n            emit Initialized(type(uint64).max);\n        }\n    }\n\n    /**\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\n     */\n    function _getInitializedVersion() internal view returns (uint64) {\n        return _getInitializableStorage()._initialized;\n    }\n\n    /**\n     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _getInitializableStorage()._initializing;\n    }\n\n    /**\n     * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n     *\n     * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n     */\n    function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n        return INITIALIZABLE_STORAGE;\n    }\n\n    /**\n     * @dev Returns a pointer to the storage namespace.\n     */\n    // solhint-disable-next-line var-name-mixedcase\n    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n        bytes32 slot = _initializableStorageSlot();\n        assembly {\n            $.slot := slot\n        }\n    }\n}\n"},"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.22;\n\nimport {IERC1822Proxiable} from \"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\";\nimport {ERC1967Utils} from \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol\";\nimport {Initializable} from \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n    address private immutable __self = address(this);\n\n    /**\n     * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`\n     * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,\n     * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.\n     * If the getter returns `\"5.0.0\"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must\n     * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n     * during an upgrade.\n     */\n    string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n    /**\n     * @dev The call is from an unauthorized context.\n     */\n    error UUPSUnauthorizedCallContext();\n\n    /**\n     * @dev The storage `slot` is unsupported as a UUID.\n     */\n    error UUPSUnsupportedProxiableUUID(bytes32 slot);\n\n    /**\n     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n     * a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case\n     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n     * function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n     * fail.\n     */\n    modifier onlyProxy() {\n        _checkProxy();\n        _;\n    }\n\n    /**\n     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n     * callable on the implementing contract but not through proxies.\n     */\n    modifier notDelegated() {\n        _checkNotDelegated();\n        _;\n    }\n\n    function __UUPSUpgradeable_init() internal onlyInitializing {\n    }\n\n    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the\n     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n     */\n    function proxiableUUID() external view virtual notDelegated returns (bytes32) {\n        return ERC1967Utils.IMPLEMENTATION_SLOT;\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n     * encoded in `data`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     *\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallUUPS(newImplementation, data);\n    }\n\n    /**\n     * @dev Reverts if the execution is not performed via delegatecall or the execution\n     * context is not of a proxy with an ERC-1967 compliant implementation pointing to self.\n     */\n    function _checkProxy() internal view virtual {\n        if (\n            address(this) == __self || // Must be called through delegatecall\n            ERC1967Utils.getImplementation() != __self // Must be called through an active proxy\n        ) {\n            revert UUPSUnauthorizedCallContext();\n        }\n    }\n\n    /**\n     * @dev Reverts if the execution is performed via delegatecall.\n     * See {notDelegated}.\n     */\n    function _checkNotDelegated() internal view virtual {\n        if (address(this) != __self) {\n            // Must not be called through delegatecall\n            revert UUPSUnauthorizedCallContext();\n        }\n    }\n\n    /**\n     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n     * {upgradeToAndCall}.\n     *\n     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n     *\n     * ```solidity\n     * function _authorizeUpgrade(address) internal onlyOwner {}\n     * ```\n     */\n    function _authorizeUpgrade(address newImplementation) internal virtual;\n\n    /**\n     * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.\n     *\n     * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value\n     * is expected to be the implementation slot in ERC-1967.\n     *\n     * Emits an {IERC1967-Upgraded} event.\n     */\n    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {\n        try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n            if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {\n                revert UUPSUnsupportedProxiableUUID(slot);\n            }\n            ERC1967Utils.upgradeToAndCall(newImplementation, data);\n        } catch {\n            // The implementation is not UUPS\n            revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);\n        }\n    }\n}\n"},"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},"@openzeppelin/contracts/interfaces/draft-IERC1822.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n    /**\n     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n     * address.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy.\n     */\n    function proxiableUUID() external view returns (bytes32);\n}\n"},"@openzeppelin/contracts/interfaces/IERC1967.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1967.sol)\n\npragma solidity >=0.4.11;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Emitted when the beacon is changed.\n     */\n    event BeaconUpgraded(address indexed beacon);\n}\n"},"@openzeppelin/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"@openzeppelin/contracts/proxy/beacon/IBeacon.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {UpgradeableBeacon} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n"},"@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.21;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev The `implementation` of the proxy is invalid.\n     */\n    error ERC1967InvalidImplementation(address implementation);\n\n    /**\n     * @dev The `admin` of the proxy is invalid.\n     */\n    error ERC1967InvalidAdmin(address admin);\n\n    /**\n     * @dev The `beacon` of the proxy is invalid.\n     */\n    error ERC1967InvalidBeacon(address beacon);\n\n    /**\n     * @dev An upgrade function sees `msg.value > 0` that may be lost.\n     */\n    error ERC1967NonPayable();\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function getImplementation() internal view returns (address) {\n        return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the ERC-1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        if (newImplementation.code.length == 0) {\n            revert ERC1967InvalidImplementation(newImplementation);\n        }\n        StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n     * to avoid stuck value in the contract.\n     *\n     * Emits an {IERC1967-Upgraded} event.\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n        _setImplementation(newImplementation);\n        emit IERC1967.Upgraded(newImplementation);\n\n        if (data.length > 0) {\n            Address.functionDelegateCall(newImplementation, data);\n        } else {\n            _checkNonPayable();\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Returns the current admin.\n     *\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n     * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n     */\n    function getAdmin() internal view returns (address) {\n        return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the ERC-1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        if (newAdmin == address(0)) {\n            revert ERC1967InvalidAdmin(address(0));\n        }\n        StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {IERC1967-AdminChanged} event.\n     */\n    function changeAdmin(address newAdmin) internal {\n        emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function getBeacon() internal view returns (address) {\n        return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the ERC-1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        if (newBeacon.code.length == 0) {\n            revert ERC1967InvalidBeacon(newBeacon);\n        }\n\n        StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n        address beaconImplementation = IBeacon(newBeacon).implementation();\n        if (beaconImplementation.code.length == 0) {\n            revert ERC1967InvalidImplementation(beaconImplementation);\n        }\n    }\n\n    /**\n     * @dev Change the beacon and trigger a setup call if data is nonempty.\n     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n     * to avoid stuck value in the contract.\n     *\n     * Emits an {IERC1967-BeaconUpgraded} event.\n     *\n     * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n     * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n     * efficiency.\n     */\n    function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n        _setBeacon(newBeacon);\n        emit IERC1967.BeaconUpgraded(newBeacon);\n\n        if (data.length > 0) {\n            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n        } else {\n            _checkNonPayable();\n        }\n    }\n\n    /**\n     * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n     * if an upgrade doesn't perform an initialization call.\n     */\n    function _checkNonPayable() private {\n        if (msg.value > 0) {\n            revert ERC1967NonPayable();\n        }\n    }\n}\n"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"@openzeppelin/contracts/utils/Address.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev There's no code at `target` (it is not a contract).\n     */\n    error AddressEmptyCode(address target);\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        if (address(this).balance < amount) {\n            revert Errors.InsufficientBalance(address(this).balance, amount);\n        }\n\n        (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n        if (!success) {\n            _revert(returndata);\n        }\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason or custom error, it is bubbled\n     * up by this function (like regular Solidity function calls). However, if\n     * the call reverted with no returned reason, this function reverts with a\n     * {Errors.FailedCall} error.\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n     * of an unsuccessful call.\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata\n    ) internal view returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            // only check if target is a contract if the call was successful and the return data is empty\n            // otherwise we already know that it was a contract\n            if (returndata.length == 0 && target.code.length == 0) {\n                revert AddressEmptyCode(target);\n            }\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n     * revert reason or with a default {Errors.FailedCall} error.\n     */\n    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n     */\n    function _revert(bytes memory returndata) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            assembly (\"memory-safe\") {\n                revert(add(returndata, 0x20), mload(returndata))\n            }\n        } else {\n            revert Errors.FailedCall();\n        }\n    }\n}\n"},"@openzeppelin/contracts/utils/Errors.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n    /**\n     * @dev The ETH balance of the account is not enough to perform the operation.\n     */\n    error InsufficientBalance(uint256 balance, uint256 needed);\n\n    /**\n     * @dev A call to an address target failed. The target may have reverted.\n     */\n    error FailedCall();\n\n    /**\n     * @dev The deployment failed.\n     */\n    error FailedDeployment();\n\n    /**\n     * @dev A necessary precompile is missing.\n     */\n    error MissingPrecompile(address);\n}\n"},"@openzeppelin/contracts/utils/StorageSlot.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(newImplementation.code.length > 0);\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    struct Int256Slot {\n        int256 value;\n    }\n\n    struct StringSlot {\n        string value;\n    }\n\n    struct BytesSlot {\n        bytes value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n     */\n    function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `StringSlot` with member `value` located at `slot`.\n     */\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n     */\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n     */\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n     */\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n}\n"},"contracts/compliance/IDSComplianceConfigurationService.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nabstract contract IDSComplianceConfigurationService {\n\n    function initialize() public virtual;\n\n    event DSComplianceUIntRuleSet(string ruleName, uint256 prevValue, uint256 newValue);\n    event DSComplianceBoolRuleSet(string ruleName, bool prevValue, bool newValue);\n    event DSComplianceStringToUIntMapRuleSet(string ruleName, string keyValue, uint256 prevValue, uint256 newValue);\n\n    function getCountryCompliance(string calldata _country) public view virtual returns (uint256);\n\n    function setCountriesCompliance(string[] calldata _countries, uint256[] calldata _values) public virtual;\n\n    function setCountryCompliance(\n        string calldata _country,\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getTotalInvestorsLimit() public view virtual returns (uint256);\n\n    function setTotalInvestorsLimit(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getMinUSTokens() public view virtual returns (uint256);\n\n    function setMinUSTokens(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getMinEUTokens() public view virtual returns (uint256);\n\n    function setMinEUTokens(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getUSInvestorsLimit() public view virtual returns (uint256);\n\n    function setUSInvestorsLimit(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getJPInvestorsLimit() public view virtual returns (uint256);\n\n    function setJPInvestorsLimit(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getUSAccreditedInvestorsLimit() public view virtual returns (uint256);\n\n    function setUSAccreditedInvestorsLimit(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getNonAccreditedInvestorsLimit() public view virtual returns (uint256);\n\n    function setNonAccreditedInvestorsLimit(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getMaxUSInvestorsPercentage() public view virtual returns (uint256);\n\n    function setMaxUSInvestorsPercentage(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getBlockFlowbackEndTime() public view virtual returns (uint256);\n\n    function setBlockFlowbackEndTime(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getNonUSLockPeriod() public view virtual returns (uint256);\n\n    function setNonUSLockPeriod(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getMinimumTotalInvestors() public view virtual returns (uint256);\n\n    function setMinimumTotalInvestors(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getMinimumHoldingsPerInvestor() public view virtual returns (uint256);\n\n    function setMinimumHoldingsPerInvestor(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getMaximumHoldingsPerInvestor() public view virtual returns (uint256);\n\n    function setMaximumHoldingsPerInvestor(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getEURetailInvestorsLimit() public view virtual returns (uint256);\n\n    function setEURetailInvestorsLimit(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getUSLockPeriod() public view virtual returns (uint256);\n\n    function setUSLockPeriod(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getForceFullTransfer() public view virtual returns (bool);\n\n    function setForceFullTransfer(\n        bool _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getForceAccredited() public view virtual returns (bool);\n\n    function setForceAccredited(\n        bool _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function setForceAccreditedUS(\n        bool _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getForceAccreditedUS() public view virtual returns (bool);\n\n    function setWorldWideForceFullTransfer(\n        bool _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getWorldWideForceFullTransfer() public view virtual returns (bool);\n\n    function getAuthorizedSecurities() public view virtual returns (uint256);\n\n    function setAuthorizedSecurities(\n        uint256 _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getDisallowBackDating() public view virtual returns (bool);\n\n    function setDisallowBackDating(\n        bool _value /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function setAll(\n        uint256[] calldata _uint_values,\n        bool[] calldata _bool_values /*onlyTransferAgentOrAbove*/\n    ) public virtual;\n\n    function getAll() public view virtual returns (uint256[] memory, bool[] memory);\n}\n"},"contracts/compliance/IDSComplianceService.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nabstract contract IDSComplianceService {\n\n    uint256 internal constant NONE = 0;\n    uint256 internal constant US = 1;\n    uint256 internal constant EU = 2;\n    uint256 internal constant FORBIDDEN = 4;\n    uint256 internal constant JP = 8;\n    string internal constant TOKEN_PAUSED = \"Token Paused\";\n    string internal constant NOT_ENOUGH_TOKENS = \"Not Enough Tokens\";\n    string internal constant TOKENS_LOCKED = \"Tokens Locked\";\n    string internal constant WALLET_NOT_IN_REGISTRY_SERVICE = \"Wallet not in registry Service\";\n    string internal constant DESTINATION_RESTRICTED = \"Destination restricted\";\n    string internal constant VALID = \"Valid\";\n    string internal constant HOLD_UP = \"Under lock-up\";\n    string internal constant ONLY_FULL_TRANSFER = \"Only Full Transfer\";\n    string internal constant FLOWBACK = \"Flowback\";\n    string internal constant MAX_INVESTORS_IN_CATEGORY = \"Max Investors in category\";\n    string internal constant AMOUNT_OF_TOKENS_UNDER_MIN = \"Amount of tokens under min\";\n    string internal constant AMOUNT_OF_TOKENS_ABOVE_MAX = \"Amount of tokens above max\";\n    string internal constant ONLY_ACCREDITED = \"Only accredited\";\n    string internal constant ONLY_US_ACCREDITED = \"Only us accredited\";\n    string internal constant NOT_ENOUGH_INVESTORS = \"Not enough investors\";\n    string internal constant MAX_AUTHORIZED_SECURITIES_EXCEEDED = \"Max authorized securities exceeded\";\n\n    function initialize() public virtual;\n\n    function adjustInvestorCountsAfterCountryChange(\n        string memory _id,\n        string memory _country,\n        string memory _prevCountry\n    ) public virtual returns (bool);\n\n    //*****************************************\n    // TOKEN ACTION VALIDATIONS\n    //*****************************************\n\n    function validateTransfer(\n        address _from,\n        address _to,\n        uint256 _value /*onlyToken*/\n    ) public virtual returns (bool);\n\n    function validateTransfer(\n        address _from,\n        address _to,\n        uint256 _value, /*onlyToken*/\n        bool _pausedToken,\n        uint256 _balanceFrom\n    ) public virtual returns (bool);\n\n    function validateIssuance(\n        address _to,\n        uint256 _value,\n        uint256 _issuanceTime /*onlyToken*/\n    ) public virtual returns (bool);\n\n    function validateBurn(\n        address _who,\n        uint256 _value /*onlyToken*/\n    ) public virtual returns (bool);\n\n    function validateSeize(\n        address _from,\n        address _to,\n        uint256 _value /*onlyToken*/\n    ) public virtual returns (bool);\n\n    function preIssuanceCheck(address _to, uint256 _value) public view virtual returns (uint256 code, string memory reason);\n\n    function preTransferCheck(\n        address _from,\n        address _to,\n        uint256 _value\n    ) public view virtual returns (uint256 code, string memory reason);\n\n    function newPreTransferCheck(\n        address _from,\n        address _to,\n        uint256 _value,\n        uint256 _balanceFrom,\n        bool _pausedToken\n    ) public view virtual returns (uint256 code, string memory reason);\n\n    function preInternalTransferCheck(\n        address _from,\n        address _to,\n        uint256 _value\n    ) public view virtual returns (uint256 code, string memory reason);\n\n    function validateIssuanceTime(uint256 _issuanceTime) public view virtual returns (uint256 issuanceTime);\n\n    function getComplianceTransferableTokens(\n        address _who,\n        uint256 _time,\n        uint64 _lockTime\n    ) public view virtual returns (uint256);\n}\n"},"contracts/compliance/IDSLockManager.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nabstract contract IDSLockManager {\n\n    function initialize() public virtual;\n\n    modifier validLock(uint256 _valueLocked, uint256 _releaseTime) {\n        require(_valueLocked > 0, \"Value is zero\");\n        require(_releaseTime == 0 || _releaseTime > uint256(block.timestamp), \"Release time is in the past\");\n        _;\n    }\n\n    event Locked(address indexed who, uint256 value, uint256 indexed reason, string reasonString, uint256 releaseTime);\n    event Unlocked(address indexed who, uint256 value, uint256 indexed reason, string reasonString, uint256 releaseTime);\n\n    event HolderLocked(string holderId, uint256 value, uint256 indexed reason, string reasonString, uint256 releaseTime);\n    event HolderUnlocked(string holderId, uint256 value, uint256 indexed reason, string reasonString, uint256 releaseTime);\n    /**\n     * @dev creates a lock record for wallet address\n     * @param _to address to lock the tokens at\n     * @param _valueLocked value of tokens to lock\n     * @param _reason reason for lock\n     * @param _releaseTime timestamp to release the lock (or 0 for locks which can only released by an unlockTokens call)\n     * Note: The user MAY have at a certain time more locked tokens than actual tokens\n     */\n\n    function addManualLockRecord(\n        address _to,\n        uint256 _valueLocked,\n        string calldata _reason,\n        uint256 _releaseTime /*issuerOrAboveOrToken*/\n    ) public virtual;\n\n    /**\n     * @dev creates a lock record for investor Id\n     * @param _investor investor id to lock the tokens at\n     * @param _valueLocked value of tokens to lock\n     * @param _reasonCode reason code for lock\n     * @param _reasonString reason for lock\n     * @param _releaseTime timestamp to release the lock (or 0 for locks which can only released by an unlockTokens call)\n     * Note: The user MAY have at a certain time more locked tokens than actual tokens\n     */\n\n    function createLockForInvestor(\n        string memory _investor,\n        uint256 _valueLocked,\n        uint256 _reasonCode,\n        string calldata _reasonString,\n        uint256 _releaseTime /*onlyIssuerOrAboveOrToken*/\n    ) public virtual;\n\n    /**\n     * @dev Releases a specific lock record for a wallet\n     * @param _to address to release the tokens for\n     * @param _lockIndex the index of the lock to remove\n     *\n     * note - this may change the order of the locks on an address, so if iterating the iteration should be restarted.\n     * @return true on success\n     */\n    function removeLockRecord(\n        address _to,\n        uint256 _lockIndex /*issuerOrAbove*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev Releases a specific lock record for a investor\n     * @param _investorId investor id to release the tokens for\n     * @param _lockIndex the index of the lock to remove\n     *\n     * note - this may change the order of the locks on an address, so if iterating the iteration should be restarted.\n     * @return true on success\n     */\n    function removeLockRecordForInvestor(\n        string memory _investorId,\n        uint256 _lockIndex /*onlyIssuerOrAbove*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev Get number of locks currently associated with an address\n     * @param _who address to get count for\n     *\n     * @return number of locks\n     *\n     * Note - a lock can be inactive (due to its time expired) but still exists for a specific address\n     */\n    function lockCount(address _who) public view virtual returns (uint256);\n\n    /**\n     * @dev Get number of locks currently associated with a investor\n     * @param _investorId investor id to get count for\n     *\n     * @return number of locks\n     *\n     * Note - a lock can be inactive (due to its time expired) but still exists for a specific address\n     */\n\n    function lockCountForInvestor(string calldata _investorId) public view virtual returns (uint256);\n\n    /**\n     * @dev Get details of a specific lock associated with an address\n     * can be used to iterate through the locks of a user\n     * @param _who address to get token lock for\n     * @param _lockIndex the 0 based index of the lock.\n     * @return reasonCode the reason code\n     * @return reasonString the reason for the lock\n     * @return value the value of tokens locked\n     * @return autoReleaseTime the timestamp in which the lock will be inactive (or 0 if it's always active until removed)\n     *\n     * Note - a lock can be inactive (due to its time expired) but still exists for a specific address\n     */\n    function lockInfo(address _who, uint256 _lockIndex) public view virtual returns (uint256 reasonCode, string memory reasonString, uint256 value, uint256 autoReleaseTime);\n\n    /**\n     * @dev Get details of a specific lock associated with a investor\n     * can be used to iterate through the locks of a user\n     * @param _investorId investorId to get token lock for\n     * @param _lockIndex the 0 based index of the lock.\n     * @return reasonCode the reason code\n     * @return reasonString the reason for the lock\n     * @return value the value of tokens locked\n     * @return autoReleaseTime the timestamp in which the lock will be inactive (or 0 if it's always active until removed)\n     *\n     * Note - a lock can be inactive (due to its time expired) but still exists for a specific address\n     */\n    function lockInfoForInvestor(\n        string memory _investorId,\n        uint256 _lockIndex\n    ) public view virtual  returns (uint256 reasonCode, string memory reasonString, uint256 value, uint256 autoReleaseTime);\n\n    /**\n     * @dev get total number of transferable tokens for a wallet, at a certain time\n     * @param _who address to get number of transferable tokens for\n     * @param _time time to calculate for\n     */\n    function getTransferableTokens(address _who, uint256 _time) public view virtual returns (uint256);\n\n    /**\n     * @dev get total number of transferable tokens for a investor, at a certain time\n     * @param _investorId investor id\n     * @param _time time to calculate for\n     */\n    function getTransferableTokensForInvestor(string memory _investorId, uint256 _time) public view virtual returns (uint256);\n\n    /**\n     * @dev pause investor\n     * @param _investorId investor id\n     */\n    function lockInvestor(\n        string calldata _investorId /*issuerOrAbove*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev unpauses investor\n     * @param _investorId investor id\n     */\n    function unlockInvestor(\n        string calldata _investorId /*issuerOrAbove*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev Returns true if paused, otherwise false\n     * @param _investorId investor id\n     */\n    function isInvestorLocked(string calldata _investorId) public view virtual returns (bool);\n\n    /**\n     * @dev set investor to liquidate only mode\n     * @param _investorId investor id\n     * @param _enabled true to enable, false to disable\n     */\n    function setInvestorLiquidateOnly(string memory _investorId, bool _enabled) public virtual returns (bool);\n\n    /**\n     * @dev Returns true if the investor is in liquidate only mode\n     * @param _investorId investor id\n     */\n    function isInvestorLiquidateOnly(string calldata _investorId) public view virtual returns (bool);\n}\n"},"contracts/compliance/IDSWalletManager.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nabstract contract IDSWalletManager {\n\n    function initialize() public virtual;\n\n    // Special wallets constants\n    uint8 public constant NONE = 0;\n    uint8 public constant ISSUER = 1;\n    uint8 public constant PLATFORM = 2;\n    uint8 public constant EXCHANGE = 4;\n\n    /**\n     * @dev should be emitted when a special wallet is added.\n     */\n    event DSWalletManagerSpecialWalletAdded(address wallet, uint8 walletType, address sender);\n    /**\n     * @dev should be emitted when a special wallet is removed.\n     */\n    event DSWalletManagerSpecialWalletRemoved(address wallet, uint8 walletType, address sender);\n    /**\n     * @dev should be emitted when the number of reserved slots is set for a wallet.\n     */\n    event DSWalletManagerReservedSlotsSet(address wallet, string country, uint8 accreditationStatus, uint256 slots, address sender);\n\n    /**\n     * @dev Sets a wallet to be an special wallet. (internal)\n     * @param _wallet The address of the wallet.\n     * @param _type The type of the wallet.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function setSpecialWallet(address _wallet, uint8 _type) internal virtual returns (bool);\n\n    /**\n     * @dev gets a wallet type\n     * @param _wallet the address of the wallet to check.\n     */\n    function getWalletType(address _wallet) public view virtual returns (uint8);\n\n    /**\n     * @dev Returns true if it is platform wallet\n     * @param _wallet the address of the wallet to check.\n     */\n    function isPlatformWallet(address _wallet) external view virtual returns (bool);\n\n    /**\n     * @dev Returns true if it is special wallet\n     * @param _wallet the address of the wallet to check.\n     */\n    function isSpecialWallet(address _wallet) external view virtual returns (bool);\n\n    /**\n     * @dev Returns true if it is issuer special wallet\n     * @param _wallet the address of the wallet to check.\n     */\n    function isIssuerSpecialWallet(address _wallet) external view virtual returns (bool);\n\n    /**\n     * @dev Sets a wallet to be an issuer wallet.\n     * @param _wallet The address of the wallet.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function addIssuerWallet(\n        address _wallet /*onlyIssuerOrAbove*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev Sets an array of wallets to be issuer wallets.\n     * @param _wallets The address of the wallets.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function addIssuerWallets(address[] calldata _wallets) public virtual returns (bool);\n\n    /**\n     * @dev Sets a wallet to be a platform wallet.\n     * @param _wallet The address of the wallet.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function addPlatformWallet(\n        address _wallet /*onlyIssuerOrAbove*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev Sets an array of wallets to be platforms wallet.\n     * @param _wallets The address of the wallets.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function addPlatformWallets(address[] calldata _wallets) public virtual returns (bool);\n\n    /**\n     * @dev Sets a wallet to be an exchange wallet.\n     * @param _wallet The address of the wallet.\n     * @param _owner The address of the owner.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function addExchangeWallet(address _wallet, address _owner) public virtual returns (bool);\n\n    /**\n     * @dev Removes a special wallet.\n     * @param _wallet The address of the wallet.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function removeSpecialWallet(\n        address _wallet /*onlyIssuerOrAbove*/\n    ) public virtual returns (bool);\n}\n"},"contracts/data-stores/ServiceConsumerDataStore.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\ncontract ServiceConsumerDataStore {\n\n    mapping(uint256 serviceId => address service) internal services;\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"},"contracts/data-stores/TokenDataStore.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nimport {ServiceConsumerDataStore} from \"./ServiceConsumerDataStore.sol\";\nimport {TokenLibrary} from '../token/TokenLibrary.sol';\n\ncontract TokenDataStore is ServiceConsumerDataStore {\n\n    TokenLibrary.TokenData internal tokenData;\n    mapping(address owner => mapping(address spender => uint256 allowance)) internal allowances;\n    mapping(uint256 index => address wallet) internal walletsList;\n    uint256 internal walletsCount;\n    mapping(address wallet => uint256 index) internal walletsToIndexes;\n    // These two variables replace the 2-slot TokenPartitions struct to preserve storage layout\n    address internal DEPRECATED_PARTITIONS_WALLETS;\n    address internal DEPRECATED_PARTITIONS_BALANCES;\n    uint256 public DEPRECATED_CAP;\n    string public name;\n    string public symbol;\n    uint8 public decimals;\n    TokenLibrary.SupportedFeatures public supportedFeatures;\n    bool internal paused;\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[35] private __gap;\n}\n"},"contracts/rebasing/ISecuritizeRebasingProvider.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\n/**\n * @title ISecuritizeRebasingProvider\n * @dev Defines a common interface to get Rebasing multiplier\n */\ninterface ISecuritizeRebasingProvider {\n    /**\n     * @dev Emitted when owner updates multiplier.\n     * @param oldValue Old multiplier value\n     * @param newValue New multiplier value\n     */\n    event RebasingRateUpdated(uint256 oldValue, uint256 newValue);\n\n    /**\n     * @dev Proxy Initializer.\n     * @param _multiplier the initial rebasing multiplier value\n     * @param _tokenDecimals the token decimals for conversion calculations\n    */\n    function initialize(uint256 _multiplier, uint8 _tokenDecimals) external;\n\n\n    /**\n     * @dev Set rebasing multiplier. It is expressed with the same decimal numbers as stable coin\n     */\n    function setMultiplier(uint256 _multiplier) external;\n\n    /**\n     * @dev The asset:rebasing multiplier.\n     * @return The asset:rebasing multiplier.\n     */\n    function multiplier() external view returns (uint256);\n\n    /**\n     * @dev Convert tokens to shares using the current multiplier and token decimals.\n     * @param _tokens The amount of tokens to convert\n     * @return shares The equivalent amount in shares\n     */\n    function convertTokensToShares(uint256 _tokens) external view returns (uint256 shares);\n\n    /**\n     * @dev Convert shares to tokens using the current multiplier and token decimals.\n     * @param _shares The amount of shares to convert\n     * @return tokens The equivalent amount in tokens\n     */\n    function convertSharesToTokens(uint256 _shares) external view returns (uint256 tokens);\n}\n"},"contracts/rebasing/RebasingLibrary.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nimport {IDSToken} from \"../token/IDSToken.sol\";\n\n\nlibrary RebasingLibrary {\n    /*\n     * @notice Note for auditors regarding rounding logic in rebasing operations.\n     *\n     * A finding was raised concerning the \"rounding to the nearest\" logic in `convertTokensToShares`,\n     * which could potentially result in a wei being rounded up in favor of the investor.\n     * We have analyzed and tested different options and our conclusions are the following:\n     *\n     * 1. The risk for the protocol of losing a wei over a `convertTokensToShares` operation\n     *    is restricted to tokens with many decimals (17 or 18).\n     *\n     * 2. Trying to fix this by rounding down on every operation presents many problems:\n     *    - Users who deposit 1 token immediately see it reflected as less than 1 token (0.99999...),\n     *      which causes confusion and potential complaints.\n     *    - When locking 200 tokens for an investor who holds 500, it should leave 300 tokens\n     *      transferable. Applying a \"round down\" fix causes this to fail, as a wei is lost\n     *      for the investor who no longer holds the total shares needed to get back their 300 tokens.\n     *    - Similar situations happen with other operations of the protocol, none of which happen\n     *      with the \"rounding to the nearest\" approach.\n     *\n     * 3. Exploiting the wei being rounded up is not economically viable for an attacker. It would\n     *    require thousands of transactions, and the associated gas costs (plus any protocol fees,\n     *    like bridging fees) would exceed any potential gain.\n     *\n     * 4. Most of our tokens operate with 6 decimals, while all rebasing operations use 18 decimals\n     *    of precision. For a typical 6-decimal token, taking advantage of this is nearly impossible.\n     *\n     * Conclusion: We are leaving the logic as is (\"rounding to the nearest integer\"). It works well\n     * in all situations, and while it creates a theoretical risk, it is not practically actionable or\n     * economically feasible to exploit.\n     */    \n    uint256 private constant DECIMALS_FACTOR = 1e18;\n\n    /**\n     * @notice Converts a token amount to a share amount.\n     * @param _tokens The amount of tokens to convert.\n     * @param _rebasingMultiplier The current rebasing multiplier, fixed to 18 decimals.\n     * @param _tokenDecimals The number of decimals of the token.\n     * @return The corresponding amount of shares.\n     */\n    function convertTokensToShares(\n        uint256 _tokens,\n        uint256 _rebasingMultiplier, // should be fixed to 18 decimals\n        uint8 _tokenDecimals\n    ) internal pure returns (uint256) {\n        require(_rebasingMultiplier > 0, \"Invalid rebasing multiplier\");\n        uint256 shares;        \n        if (_tokenDecimals == 18) {\n            shares = (_tokens * DECIMALS_FACTOR + _rebasingMultiplier / 2) / _rebasingMultiplier;\n        } else if (_tokenDecimals < 18) {\n            uint256 scale = 10**(18 - _tokenDecimals);\n            shares = (_tokens * scale * DECIMALS_FACTOR + _rebasingMultiplier / 2) / _rebasingMultiplier;\n        } else {\n            revert(\"Token decimals greater than 18 not supported\");\n        }\n\n\n        if (_tokens > 0) {\n            require(shares > 0, \"Shares amount too small\");\n        }\n        return shares;        \n    }\n\n    /**\n     * @notice Converts a share amount to a token amount.\n     * @param _shares The amount of shares to convert.\n     * @param _rebasingMultiplier The current rebasing multiplier, fixed to 18 decimals.\n     * @param _tokenDecimals The number of decimals of the token.\n     * @return The corresponding amount of tokens.\n     */\n    function convertSharesToTokens(\n        uint256 _shares,\n        uint256 _rebasingMultiplier,\n        uint8 _tokenDecimals\n    ) internal pure returns (uint256) {\n        require(_rebasingMultiplier > 0, \"Invalid rebasing multiplier\");\n        if (_tokenDecimals == 18) {\n            return (_shares * _rebasingMultiplier + DECIMALS_FACTOR / 2) / DECIMALS_FACTOR;\n        } else if (_tokenDecimals < 18) {\n            uint256 scale = 10**(18 - _tokenDecimals);\n            return (((_shares * _rebasingMultiplier + DECIMALS_FACTOR / 2) / DECIMALS_FACTOR) + scale / 2) / scale;\n        } else {\n            revert(\"Token decimals greater than 18 not supported\");\n        }\n    }\n}"},"contracts/registry/IDSRegistryService.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nimport {CommonUtils} from \"../utils/CommonUtils.sol\";\n\nabstract contract IDSRegistryService {\n\n    function initialize() public virtual;\n\n    event DSRegistryServiceInvestorAdded(string investorId, address sender);\n    event DSRegistryServiceInvestorRemoved(string investorId, address sender);\n    event DSRegistryServiceInvestorCountryChanged(string investorId, string country, address sender);\n    event DSRegistryServiceInvestorAttributeChanged(string investorId, uint256 attributeId, uint256 value, uint256 expiry, string proofHash, address sender);\n    event DSRegistryServiceWalletAdded(address wallet, string investorId, address sender);\n    event DSRegistryServiceWalletRemoved(address wallet, string investorId, address sender);\n\n    uint8 public constant NONE = 0;\n    uint8 public constant KYC_APPROVED = 1;\n    uint8 public constant ACCREDITED = 2;\n    uint8 public constant QUALIFIED = 4;\n    uint8 public constant PROFESSIONAL = 8;\n\n    uint8 public constant PENDING = 0;\n    uint8 public constant APPROVED = 1;\n    uint8 public constant REJECTED = 2;\n\n    uint8 public constant EXCHANGE = 4;\n\n    modifier investorExists(string memory _id) {\n        require(isInvestor(_id), \"Unknown investor\");\n        _;\n    }\n\n    modifier newInvestor(string memory _id) {\n        require(!CommonUtils.isEmptyString(_id), \"Investor id must not be empty\");\n        require(!isInvestor(_id), \"Investor already exists\");\n        _;\n    }\n\n    modifier walletExists(address _address) {\n        require(isWallet(_address), \"Unknown wallet\");\n        _;\n    }\n\n    modifier newWallet(address _address) {\n        require(!isWallet(_address), \"Wallet already exists\");\n        _;\n    }\n\n    modifier walletBelongsToInvestor(address _address, string memory _id) {\n        require(CommonUtils.isEqualString(getInvestor(_address), _id), \"Wallet does not belong to investor\");\n        _;\n    }\n\n    function registerInvestor(\n        string calldata _id,\n        string calldata _collision_hash /*onlyExchangeOrAbove newInvestor(_id)*/\n    ) public virtual returns (bool);\n\n    function updateInvestor(\n        string calldata _id,\n        string calldata _collisionHash,\n        string memory _country,\n        address[] memory _wallets,\n        uint8[] memory _attributeIds,\n        uint256[] memory _attributeValues,\n        uint256[] memory _attributeExpirations /*onlyIssuerOrAbove*/\n    ) public virtual returns (bool);\n\n    function removeInvestor(\n        string calldata _id /*onlyExchangeOrAbove investorExists(_id)*/\n    ) public virtual returns (bool);\n\n    function setCountry(\n        string calldata _id,\n        string memory _country /*onlyExchangeOrAbove investorExists(_id)*/\n    ) public virtual returns (bool);\n\n    function getCountry(string memory _id) public view virtual returns (string memory);\n\n    function getCollisionHash(string calldata _id) public view virtual returns (string memory);\n\n    function setAttribute(\n        string calldata _id,\n        uint8 _attributeId,\n        uint256 _value,\n        uint256 _expiry,\n        string memory _proofHash /*onlyExchangeOrAbove investorExists(_id)*/\n    ) public virtual returns (bool);\n\n    function getAttributeValue(string memory _id, uint8 _attributeId) public view virtual returns (uint256);\n\n    function getAttributeExpiry(string memory _id, uint8 _attributeId) public view virtual returns (uint256);\n\n    function getAttributeProofHash(string memory _id, uint8 _attributeId) public view virtual returns (string memory);\n\n    function addWallet(\n        address _address,\n        string memory _id /*onlyExchangeOrAbove newWallet(_address)*/\n    ) public virtual returns (bool);\n\n\n    function removeWallet(\n        address _address,\n        string memory _id /*onlyExchangeOrAbove walletExists walletBelongsToInvestor(_address, _id)*/\n    ) public virtual returns (bool);\n\n    function getInvestor(address _address) public view virtual returns (string memory);\n\n    function getInvestorDetails(address _address) public view virtual returns (string memory, string memory);\n\n    function getInvestorDetailsFull(string memory _id)\n        public\n        view\n        virtual\n        returns (string memory, uint256[] memory, uint256[] memory, string memory, string memory, string memory, string memory);\n\n    function isInvestor(string memory _id) public view virtual returns (bool);\n\n    function isWallet(address _address) public view virtual returns (bool);\n\n    function isAccreditedInvestor(string calldata _id) external view virtual returns (bool);\n\n    function isQualifiedInvestor(string calldata _id) external view virtual returns (bool);\n\n    function isAccreditedInvestor(address _wallet) external view virtual returns (bool);\n\n    function isQualifiedInvestor(address _wallet) external view virtual returns (bool);\n\n    function getInvestors(address _from, address _to) external view virtual returns (string memory, string memory);\n}\n"},"contracts/service/IDSServiceConsumer.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nabstract contract IDSServiceConsumer {\n\n    uint256 public constant TRUST_SERVICE = 1;\n    uint256 public constant DS_TOKEN = 2;\n    uint256 public constant REGISTRY_SERVICE = 4;\n    uint256 public constant COMPLIANCE_SERVICE = 8;\n    uint256 public constant UNUSED_1 = 16;\n    uint256 public constant WALLET_MANAGER = 32;\n    uint256 public constant LOCK_MANAGER = 64;\n    uint256 public constant DEPRECATED_PARTITIONS_MANAGER = 128;\n    uint256 public constant COMPLIANCE_CONFIGURATION_SERVICE = 256;\n    uint256 public constant TOKEN_ISSUER = 512;\n    uint256 public constant WALLET_REGISTRAR = 1024;\n    uint256 public constant DEPRECATED_OMNIBUS_TBE_CONTROLLER = 2048; // Deprecated, keep for backward compatibility\n    uint256 public constant TRANSACTION_RELAYER = 4096;\n    uint256 public constant DEPRECATED_TOKEN_REALLOCATOR = 8192; // Deprecated, keep for backward compatibility\n    uint256 public constant DEPRECATED_ISSUER_MULTICALL = 0;\n    uint256 public constant DEPRECATED_TA_MULTICALL = 0;\n    uint256 public constant DEPRECATED_SECURITIZE_SWAP = 16384;\n    uint256 public constant REBASING_PROVIDER = 8196;\n\n    function getDSService(uint256 _serviceId) public view virtual returns (address);\n\n    function setDSService(\n        uint256 _serviceId,\n        address _address /*onlyMaster*/\n    ) public virtual returns (bool);\n\n    event DSServiceSet(uint256 serviceId, address serviceAddress);\n}\n"},"contracts/service/ServiceConsumer.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nimport {IDSServiceConsumer} from \"./IDSServiceConsumer.sol\";\nimport {ServiceConsumerDataStore} from \"../data-stores/ServiceConsumerDataStore.sol\";\nimport {IDSToken} from \"../token/IDSToken.sol\";\nimport {IDSWalletManager} from \"../compliance/IDSWalletManager.sol\";\nimport {IDSLockManager} from \"../compliance/IDSLockManager.sol\";\nimport {IDSComplianceService} from \"../compliance/IDSComplianceService.sol\";\nimport {IDSComplianceConfigurationService} from \"../compliance/IDSComplianceConfigurationService.sol\";\nimport {IDSRegistryService} from \"../registry/IDSRegistryService.sol\";\nimport {IDSTrustService} from \"../trust/IDSTrustService.sol\";\nimport {ISecuritizeRebasingProvider} from \"../rebasing/ISecuritizeRebasingProvider.sol\";\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n\n\nabstract contract ServiceConsumer is IDSServiceConsumer, ServiceConsumerDataStore, OwnableUpgradeable {\n\n    // Bring role constants to save gas both in deployment (less bytecode) and usage\n    uint8 public constant ROLE_NONE = 0;\n    uint8 public constant ROLE_MASTER = 1;\n    uint8 public constant ROLE_ISSUER = 2;\n    uint8 public constant ROLE_EXCHANGE = 4;\n    uint8 public constant ROLE_TRANSFER_AGENT = 8;\n\n    function __ServiceConsumer_init() public virtual onlyInitializing {\n        __Ownable_init(msg.sender);\n    }\n\n    modifier onlyMaster {\n        if(owner() != msg.sender) require(getTrustService().getRole(msg.sender) == ROLE_MASTER, \"Insufficient trust level\");\n        _;\n    }\n\n    /**\n   * @dev Allow invoking functions only by the users who have the MASTER role or the ISSUER role or the TRANSFER AGENT role.\n   */\n    modifier onlyIssuerOrTransferAgentOrAbove() {\n        IDSTrustService trustManager = getTrustService();\n        uint8 role = trustManager.getRole(msg.sender);\n        require(role == ROLE_TRANSFER_AGENT || role == ROLE_ISSUER || role == ROLE_MASTER, \"Insufficient trust level\");\n        _;\n    }\n\n    modifier onlyIssuerOrAbove {\n        IDSTrustService trustManager = getTrustService();\n        uint8 role = trustManager.getRole(msg.sender);\n        require(role == ROLE_ISSUER || role == ROLE_MASTER, \"Insufficient trust level\");\n        _;\n    }\n\n    modifier onlyTransferAgentOrAbove {\n        IDSTrustService trustManager = getTrustService();\n        uint8 role = trustManager.getRole(msg.sender);\n        require(role == ROLE_TRANSFER_AGENT || role == ROLE_MASTER, \"Insufficient trust level\");\n        _;\n    }\n\n    modifier onlyExchangeOrAbove {\n        IDSTrustService trustManager = getTrustService();\n        uint8 role = trustManager.getRole(msg.sender);\n        require(role == ROLE_EXCHANGE || role == ROLE_ISSUER || role == ROLE_TRANSFER_AGENT || role == ROLE_MASTER, \"Insufficient trust level\");\n        _;\n    }\n\n    modifier onlyToken {\n        require(msg.sender == getDSService(DS_TOKEN), \"This function can only called by the associated token\");\n        _;\n    }\n\n    modifier onlyRegistry {\n        require(msg.sender == getDSService(REGISTRY_SERVICE), \"This function can only called by the registry service\");\n        _;\n    }\n\n    modifier onlyIssuerOrAboveOrToken {\n        if (msg.sender != getDSService(DS_TOKEN)) {\n            IDSTrustService trustManager = IDSTrustService(getDSService(TRUST_SERVICE));\n            require(trustManager.getRole(msg.sender) == ROLE_ISSUER || trustManager.getRole(msg.sender) == ROLE_MASTER, \"Insufficient trust level\");\n        }\n        _;\n    }\n\n    modifier onlyTransferAgentOrAboveOrToken {\n        if (msg.sender != getDSService(DS_TOKEN)) {\n            IDSTrustService trustManager = IDSTrustService(getDSService(TRUST_SERVICE));\n            require(trustManager.getRole(msg.sender) == ROLE_TRANSFER_AGENT || trustManager.getRole(msg.sender) == ROLE_MASTER, \"Insufficient trust level\");\n        }\n        _;\n    }\n\n    modifier onlyOwnerOrIssuerOrAbove {\n        if(owner() != msg.sender) {\n            IDSTrustService trustManager = getTrustService();\n            require(trustManager.getRole(msg.sender) == ROLE_ISSUER || trustManager.getRole(msg.sender) == ROLE_MASTER, \"Insufficient trust level\");\n        }\n        _;\n    }\n\n    function getDSService(uint256 _serviceId) public view override returns (address) {\n        return services[_serviceId];\n    }\n\n    function setDSService(uint256 _serviceId, address _address) public override onlyMaster returns (bool) {\n        services[_serviceId] = _address;\n        emit DSServiceSet(_serviceId, _address);\n        return true;\n    }\n\n    function getToken() internal view returns (IDSToken) {\n        return IDSToken(getDSService(DS_TOKEN));\n    }\n\n    function getTrustService() internal view returns (IDSTrustService) {\n        return IDSTrustService(getDSService(TRUST_SERVICE));\n    }\n\n    function getWalletManager() internal view returns (IDSWalletManager) {\n        return IDSWalletManager(getDSService(WALLET_MANAGER));\n    }\n\n    function getLockManager() internal view returns (IDSLockManager) {\n        return IDSLockManager(getDSService(LOCK_MANAGER));\n    }\n\n    function getComplianceService() internal view returns (IDSComplianceService) {\n        return IDSComplianceService(getDSService(COMPLIANCE_SERVICE));\n    }\n\n    function getRegistryService() internal view returns (IDSRegistryService) {\n        return IDSRegistryService(getDSService(REGISTRY_SERVICE));\n    }\n\n    function getComplianceConfigurationService() internal view returns (IDSComplianceConfigurationService) {\n        return IDSComplianceConfigurationService(getDSService(COMPLIANCE_CONFIGURATION_SERVICE));\n    }\n\n    function getRebasingProvider() internal view returns (ISecuritizeRebasingProvider) {\n        return ISecuritizeRebasingProvider(getDSService(REBASING_PROVIDER));\n    }\n}\n"},"contracts/token/DSToken.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nimport {IDSToken} from \"./IDSToken.sol\";\nimport {StandardToken} from \"./StandardToken.sol\";\nimport {ISecuritizeRebasingProvider} from \"../rebasing/ISecuritizeRebasingProvider.sol\";\nimport {RebasingLibrary} from \"../rebasing/RebasingLibrary.sol\";\nimport {TokenLibrary} from \"./TokenLibrary.sol\";\nimport {CommonUtils} from \"../utils/CommonUtils.sol\";\n\ncontract DSToken is StandardToken {\n    // using FeaturesLibrary for SupportedFeatures;\n    using TokenLibrary for TokenLibrary.SupportedFeatures;\n    uint256 internal constant DEPRECATED_OMNIBUS_NO_ACTION = 0;  // Deprecated, kept for backward compatibility\n\n    /// @custom:oz-upgrades-unsafe-allow constructor\n    constructor() {\n        _disableInitializers();\n    }\n\n    function initialize(\n        string calldata _name,\n        string calldata _symbol,\n        uint8 _decimals\n        ) public virtual override onlyProxy initializer {\n        __StandardToken_init();\n\n        name = _name;\n        symbol = _symbol;\n        decimals = _decimals;\n    }\n\n    /******************************\n       TOKEN CONFIGURATION\n   *******************************/\n\n    function setFeature(uint8 featureIndex, bool enable) public onlyMaster {\n        supportedFeatures.setFeature(featureIndex, enable);\n    }\n\n    function setFeatures(uint256 features) public onlyMaster {\n        supportedFeatures.value = features;\n    }\n\n    function totalIssued() public view returns (uint256) {\n        ISecuritizeRebasingProvider rebasingProvider = getRebasingProvider();\n        uint256 tokens = rebasingProvider.convertSharesToTokens(tokenData.totalIssued);\n        return tokens;\n    }\n\n    /******************************\n       TOKEN ISSUANCE (MINTING)\n   *******************************/\n\n    /**\n     * @dev Issues unlocked tokens\n     * @param _to address The address which is going to receive the newly issued tokens\n     * @param _value uint256 the value of tokens to issue\n     * @return true if successful\n     */\n    function issueTokens(\n        address _to,\n        uint256 _value /*onlyIssuerOrAbove*/\n    ) public override returns (bool) {\n        issueTokensCustom(_to, _value, block.timestamp, 0, \"\", 0);\n        return true;\n    }\n\n    /**\n     * @notice Issues tokens with optional locking parameters\n     * @dev Issues tokens to an address with custom issuance time and optional single lock\n     * @param _to The address which will receive the newly issued tokens\n     * @param _value The amount of tokens to issue\n     * @param _issuanceTime The timestamp when tokens are considered issued\n     * @param _valueLocked The amount of tokens to be locked (0 for no lock)\n     * @param _reason The reason for token issuance\n     * @param _releaseTime The timestamp when locked tokens will be released\n     * @return bool Returns true if successful\n     */\n    function issueTokensCustom(address _to, uint256 _value, uint256 _issuanceTime, uint256 _valueLocked, string memory _reason, uint64 _releaseTime)\n    public\n    virtual\n    override\n    returns (\n    /*onlyIssuerOrAbove*/\n        bool\n    )\n    {\n        uint256[] memory valuesLocked;\n        uint64[] memory releaseTimes;\n        if (_valueLocked > 0) {\n            valuesLocked = new uint256[](1);\n            releaseTimes = new uint64[](1);\n            valuesLocked[0] = _valueLocked;\n            releaseTimes[0] = _releaseTime;\n        }\n\n        issueTokensWithMultipleLocks(_to, _value, _issuanceTime, valuesLocked, _reason, releaseTimes);\n        return true;\n    }\n\n    function issueTokensWithMultipleLocks(address _to, uint256 _value, uint256 _issuanceTime, uint256[] memory _valuesLocked, string memory _reason, uint64[] memory _releaseTimes)\n    public\n    virtual\n    override\n    onlyIssuerOrAbove\n    returns (bool)\n    {\n        ISecuritizeRebasingProvider rebasingProvider = getRebasingProvider();\n        TokenLibrary.IssueParams memory params = TokenLibrary.IssueParams({\n            _to: _to,\n            _value: _value,\n            _issuanceTime: _issuanceTime,\n            _valuesLocked: _valuesLocked,\n            _releaseTimes: _releaseTimes,\n            _reason: _reason,\n            _rebasingProvider: rebasingProvider\n        });\n        uint256 shares = TokenLibrary.issueTokensCustom(\n            tokenData,\n            getCommonServices(),\n            getLockManager(),\n            params\n            );\n\n        emit Transfer(address(0), _to, _value);\n        emit TxShares(address(0), _to, shares, rebasingProvider.multiplier());\n\n        checkWalletsForList(address(0), _to);\n        return true;\n    }\n\n    //*********************\n    // TOKEN BURNING\n    //*********************\n\n    function burn(address _who, uint256 _value, string calldata _reason) public virtual override onlyIssuerOrTransferAgentOrAbove {\n        ISecuritizeRebasingProvider rebasingProvider = getRebasingProvider();\n        uint256 shares = TokenLibrary.burn(tokenData, getCommonServices(), _who, _value, rebasingProvider);\n        emit Burn(_who, _value, _reason);\n        emit Transfer(_who, address(0), _value);\n        emit TxShares(_who, address(0), shares, rebasingProvider.multiplier());\n        checkWalletsForList(_who, address(0));\n    }\n\n    //*********************\n    // TOKEN SEIZING\n    //*********************\n\n    function seize(address _from, address _to, uint256 _value, string calldata _reason) public virtual override onlyTransferAgentOrAbove {\n        ISecuritizeRebasingProvider rebasingProvider = getRebasingProvider();\n        uint256 shares = rebasingProvider.convertTokensToShares(_value);\n\n        TokenLibrary.seize(tokenData, getCommonServices(), _from, _to, _value, shares);\n\n        emit Seize(_from, _to, _value, _reason);\n        emit Transfer(_from, _to, _value);\n        emit TxShares(_from, _to, shares, rebasingProvider.multiplier());\n        checkWalletsForList(_from, _to);\n    }\n\n    //*********************\n    // TRANSFER RESTRICTIONS\n    //*********************\n\n    /**\n     * @dev Checks whether it can transfer with the compliance manager, if not -throws.\n     */\n    modifier canTransfer(address _sender, address _receiver, uint256 _value) {\n        getComplianceService().validateTransfer(_sender, _receiver, _value, paused, super.balanceOf(_sender));\n        _;\n    }\n\n    /**\n     * @dev override for transfer with modifiers:\n     * whether the token is not paused (checked in super class)\n     * and that the sender is allowed to transfer tokens\n     * @param _to The address that will receive the tokens.\n     * @param _value The amount of tokens to be transferred.\n     */\n    function transfer(address _to, uint256 _value) public virtual override canTransfer(msg.sender, _to, _value) returns (bool) {\n        return postTransferImpl(super.transfer(_to, _value), msg.sender, _to, _value);\n    }\n\n    /**\n     * @dev override for transfer with modifiers:\n     * whether the token is not paused (checked in super class)\n     * and that the sender is allowed to transfer tokens\n     * @param _from The address that will send the tokens.\n     * @param _to The address that will receive the tokens.\n     * @param _value The amount of tokens to be transferred.\n     */\n    function transferFrom(address _from, address _to, uint256 _value) public virtual override canTransfer(_from, _to, _value) returns (bool) {\n        return postTransferImpl(super.transferFrom(_from, _to, _value), _from, _to, _value);\n    }\n\n    function postTransferImpl(bool _superResult, address _from, address _to, uint256 _value) internal returns (bool) {\n        if (_superResult) {\n            updateInvestorsBalancesOnTransfer(_from, _to, _value);\n        }\n\n        checkWalletsForList(_from, _to);\n\n        return _superResult;\n    }\n\n    //*********************\n    // WALLET ENUMERATION\n    //****\n\n    function getWalletAt(uint256 _index) public view override returns (address) {\n        require(_index > 0 && _index <= walletsCount);\n        return walletsList[_index];\n    }\n\n    function walletCount() public view override returns (uint256) {\n        return walletsCount;\n    }\n\n    function checkWalletsForList(address _from, address _to) private {\n        if (super.balanceOf(_from) == 0) {\n            removeWalletFromList(_from);\n        }\n        if (super.balanceOf(_to) > 0) {\n            addWalletToList(_to);\n        }\n    }\n\n    function addWalletToList(address _address) private {\n        //Check if it's already there\n        uint256 existingIndex = walletsToIndexes[_address];\n        if (existingIndex == 0) {\n            //If not - add it\n            uint256 index = walletsCount + 1;\n            walletsList[index] = _address;\n            walletsToIndexes[_address] = index;\n            walletsCount = index;\n        }\n    }\n\n    function removeWalletFromList(address _address) private {\n        //Make sure it's there\n        uint256 existingIndex = walletsToIndexes[_address];\n        if (existingIndex != 0) {\n            uint256 lastIndex = walletsCount;\n            if (lastIndex != existingIndex) {\n                //Put the last wallet instead of it (this will work even with 1 wallet in the list)\n                address lastWalletAddress = walletsList[lastIndex];\n                walletsList[existingIndex] = lastWalletAddress;\n                walletsToIndexes[lastWalletAddress] = existingIndex;\n            }\n\n            delete walletsToIndexes[_address];\n            delete walletsList[lastIndex];\n            walletsCount = lastIndex - 1;\n        }\n    }\n\n    //**************************************\n    // MISCELLANEOUS FUNCTIONS\n    //**************************************\n\n    function balanceOfInvestor(string memory _id) public view override returns (uint256) {\n        ISecuritizeRebasingProvider rebasingProvider = getRebasingProvider();\n\n        uint256 tokens = rebasingProvider.convertSharesToTokens(tokenData.investorsBalances[_id]);\n\n        return tokens;\n    }\n\n\n    function updateInvestorsBalancesOnTransfer(address _from, address _to, uint256 _value) internal {\n        updateInvestorBalance(_from, _value, CommonUtils.IncDec.Decrease);\n        updateInvestorBalance(_to, _value, CommonUtils.IncDec.Increase);\n    }\n\n    function updateInvestorBalance(address _wallet, uint256 _value, CommonUtils.IncDec _increase) internal override {\n        string memory investor = getRegistryService().getInvestor(_wallet);\n        if (!CommonUtils.isEmptyString(investor)) {\n            uint256 balance = balanceOfInvestor(investor);\n            if (_increase == CommonUtils.IncDec.Increase) {\n                balance += _value;\n            } else {\n                balance -= _value;\n            }\n\n            ISecuritizeRebasingProvider rebasingProvider = getRebasingProvider();\n\n            uint256 sharesBalance = rebasingProvider.convertTokensToShares(balance);\n\n            tokenData.investorsBalances[investor] = sharesBalance;\n        }\n    }\n\n    function preTransferCheck(address _from, address _to, uint256 _value) public view override returns (uint256 code, string memory reason) {\n        return getComplianceService().preTransferCheck(_from, _to, _value);\n    }\n\n    function getCommonServices() internal view returns (address[] memory) {\n        address[] memory services = new address[](2);\n        services[0] = getDSService(COMPLIANCE_SERVICE);\n        services[1] = getDSService(REGISTRY_SERVICE);\n        return services;\n    }\n}\n"},"contracts/token/IDSToken.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nimport {IERC20} from \"@openzeppelin/contracts/interfaces/IERC20.sol\";\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {CommonUtils} from \"../utils/CommonUtils.sol\";\n\nabstract contract IDSToken is IERC20, Initializable {\n    event Issue(address indexed to, uint256 value, uint256 valueLocked);\n    event TxShares(address indexed from, address indexed to, uint256 shares, uint256 multiplier);\n    event Burn(address indexed burner, uint256 value, string reason);\n    event Seize(address indexed from, address indexed to, uint256 value, string reason);\n\n    event WalletAdded(address wallet);\n    event WalletRemoved(address wallet);\n\n    function initialize(string calldata _name, string calldata _symbol, uint8 _decimals) public virtual;\n\n    /******************************\n       TOKEN ISSUANCE (MINTING)\n   *******************************/\n\n    /**\n     * @dev Issues unlocked tokens\n     * @param _to address The address which is going to receive the newly issued tokens\n     * @param _value uint256 the value of tokens to issue\n     * @return true if successful\n     */\n    function issueTokens(\n        address _to,\n        uint256 _value /*onlyIssuerOrAbove*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev Issuing tokens from the fund\n     * @param _to address The address which is going to receive the newly issued tokens\n     * @param _value uint256 the value of tokens to issue\n     * @param _valueLocked uint256 value of tokens, from those issued, to lock immediately.\n     * @param _reason reason for token locking\n     * @param _releaseTime timestamp to release the lock (or 0 for locks which can only released by an unlockTokens call)\n     * @return true if successful\n     */\n    function issueTokensCustom(\n        address _to,\n        uint256 _value,\n        uint256 _issuanceTime,\n        uint256 _valueLocked,\n        string memory _reason,\n        uint64 _releaseTime /*onlyIssuerOrAbove*/\n    ) public virtual returns (bool);\n\n    function issueTokensWithMultipleLocks(\n        address _to,\n        uint256 _value,\n        uint256 _issuanceTime,\n        uint256[] memory _valuesLocked,\n        string memory _reason,\n        uint64[] memory _releaseTimes /*onlyIssuerOrAbove*/\n    ) public virtual returns (bool);\n\n    //*********************\n    // TOKEN BURNING\n    //*********************\n\n    function burn(\n        address _who,\n        uint256 _value,\n        string calldata _reason /*onlyIssuerOrAbove*/\n    ) public virtual;\n\n    //*********************\n    // TOKEN SIEZING\n    //*********************\n\n    function seize(\n        address _from,\n        address _to,\n        uint256 _value,\n        string calldata _reason /*onlyIssuerOrAbove*/\n    ) public virtual;\n\n    //*********************\n    // WALLET ENUMERATION\n    //*********************\n\n    function getWalletAt(uint256 _index) public view virtual returns (address);\n\n    function walletCount() public view virtual returns (uint256);\n\n    //**************************************\n    // MISCELLANEOUS FUNCTIONS\n    //**************************************\n    function isPaused() public view virtual returns (bool);\n\n    function balanceOfInvestor(string memory _id) public view virtual returns (uint256);\n\n    function updateInvestorBalance(address _wallet, uint256 _value, CommonUtils.IncDec _increase) internal virtual;\n\n    function preTransferCheck(address _from, address _to, uint256 _value) public view virtual returns (uint256 code, string memory reason);\n\n}\n"},"contracts/token/StandardToken.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nimport {TokenDataStore} from \"../data-stores/TokenDataStore.sol\";\nimport {ISecuritizeRebasingProvider} from \"../rebasing/ISecuritizeRebasingProvider.sol\";\nimport {BaseDSContract} from \"../utils/BaseDSContract.sol\";\nimport {RebasingLibrary} from \"../rebasing/RebasingLibrary.sol\";\nimport {IDSToken} from \"./IDSToken.sol\";\n\nabstract contract StandardToken is IDSToken, TokenDataStore, BaseDSContract {\n    event Pause();\n    event Unpause();\n\n    modifier whenNotPaused() {\n        require(!paused, \"Contract is paused\");\n        _;\n    }\n\n    modifier whenPaused() {\n        require(paused, \"Contract is not paused\");\n        _;\n    }\n\n    function __StandardToken_init() public onlyProxy onlyInitializing {\n        __BaseDSContract_init();\n    }\n\n    function pause() public onlyTransferAgentOrAbove whenNotPaused {\n        paused = true;\n        emit Pause();\n    }\n\n    function unpause() public onlyTransferAgentOrAbove whenPaused {\n        paused = false;\n        emit Unpause();\n    }\n\n    function isPaused() public view override returns (bool) {\n        return paused;\n    }\n\n    /**\n     * @dev Gets the balance of the specified address.\n     * @param _owner The address to query the the balance of.\n     * @return An uint256 representing the amount owned by the passed address.\n     */\n    function balanceOf(address _owner) public view returns (uint256) {\n        ISecuritizeRebasingProvider rebasingProvider = ISecuritizeRebasingProvider(getDSService(REBASING_PROVIDER));\n        uint256 shares = tokenData.walletsBalances[_owner];\n\n        uint256 tokens = rebasingProvider.convertSharesToTokens(shares);\n\n        return tokens;\n    }\n\n    function totalSupply() public view returns (uint256) {\n        ISecuritizeRebasingProvider rebasingProvider = ISecuritizeRebasingProvider(getDSService(REBASING_PROVIDER));\n\n        uint256 totalSupplyTokens = rebasingProvider.convertSharesToTokens(tokenData.totalSupply);\n\n        return totalSupplyTokens;\n    }\n\n    /**\n     * @dev transfer token for a specified address\n     * @param _to The address to transfer to.\n     * @param _value The amount to be transferred.\n     */\n    function transfer(address _to, uint256 _value) public virtual returns (bool) {\n        return transferImpl(msg.sender, _to, _value);\n    }\n\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _value\n    ) public virtual returns (bool) {\n        require(_value <= allowances[_from][msg.sender], \"Not enough allowance\");\n        allowances[_from][msg.sender] -= _value;\n        return transferImpl(_from, _to, _value);\n    }\n\n    function transferImpl(\n        address _from,\n        address _to,\n        uint256 _value\n    ) internal returns (bool) {\n        require(_to != address(0));\n        ISecuritizeRebasingProvider rebasingProvider = ISecuritizeRebasingProvider(getDSService(REBASING_PROVIDER));\n\n        uint256 _shares = rebasingProvider.convertTokensToShares(_value);\n\n        require(_shares <= tokenData.walletsBalances[_from]);\n\n        tokenData.walletsBalances[_from] -= _shares;\n        tokenData.walletsBalances[_to] += _shares;\n\n        emit Transfer(_from, _to, _value);\n        emit TxShares(_from, _to, _shares, rebasingProvider.multiplier());\n        return true;\n    }\n\n    function approve(address _spender, uint256 _value) public returns (bool) {\n        allowances[msg.sender][_spender] = _value;\n        emit Approval(msg.sender, _spender, _value);\n        return true;\n    }\n\n    function allowance(address _owner, address _spender) public view returns (uint256) {\n        return allowances[_owner][_spender];\n    }\n\n    function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) {\n        allowances[msg.sender][_spender] = allowances[msg.sender][_spender] + _addedValue;\n        emit Approval(msg.sender, _spender, allowances[msg.sender][_spender]);\n        return true;\n    }\n\n    function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) {\n        uint256 oldValue = allowances[msg.sender][_spender];\n        if (_subtractedValue > oldValue) {\n            allowances[msg.sender][_spender] = 0;\n        } else {\n            allowances[msg.sender][_spender] = oldValue - _subtractedValue;\n        }\n        emit Approval(msg.sender, _spender, allowances[msg.sender][_spender]);\n        return true;\n    }\n}\n"},"contracts/token/TokenLibrary.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nimport {ISecuritizeRebasingProvider} from \"../rebasing/ISecuritizeRebasingProvider.sol\";\nimport {IDSLockManager} from \"../compliance/IDSLockManager.sol\";\nimport {IDSComplianceService} from \"../compliance/IDSComplianceService.sol\";\nimport {IDSRegistryService} from \"../registry/IDSRegistryService.sol\";\nimport {CommonUtils} from \"../utils/CommonUtils.sol\";\n\n\nlibrary TokenLibrary {\n    event Issue(address indexed to, uint256 value, uint256 valueLocked);\n\n    uint256 internal constant COMPLIANCE_SERVICE = 0;\n    uint256 internal constant REGISTRY_SERVICE = 1;\n    uint256 internal constant DEPRECATED_OMNIBUS_NO_ACTION = 0; // Deprecated, keep for backwards compatibility\n    uint256 internal constant DEPRECATED_OMNIBUS_DEPOSIT = 1; // Deprecated, keep for backwards compatibility\n    uint256 internal constant DEPRECATED_OMNIBUS_WITHDRAW = 2; // Deprecated, keep for backwards compatibility\n\n    struct TokenData {\n        mapping(address wallet => uint256 balance) walletsBalances;\n        mapping(string investor => uint256 balance) investorsBalances;\n        uint256 totalSupply;\n        uint256 totalIssued;\n    }\n\n    struct SupportedFeatures {\n        uint256 value;\n    }\n\n    struct IssueParams {\n        address _to;\n        uint256 _value;\n        uint256 _issuanceTime;\n        uint256[] _valuesLocked;\n        uint64[] _releaseTimes;\n        string _reason;\n        ISecuritizeRebasingProvider _rebasingProvider;\n    }\n\n    function setFeature(SupportedFeatures storage supportedFeatures, uint8 featureIndex, bool enable) public {\n        uint256 base = 2;\n        uint256 mask = base**featureIndex;\n\n        // Enable only if the feature is turned off and disable only if the feature is turned on\n        if (enable && (supportedFeatures.value & mask == 0)) {\n            supportedFeatures.value = supportedFeatures.value ^ mask;\n        } else if (!enable && (supportedFeatures.value & mask >= 1)) {\n            supportedFeatures.value = supportedFeatures.value ^ mask;\n        }\n    }\n\n    function issueTokensCustom(\n        TokenData storage _tokenData,\n        address[] memory _services,\n        IDSLockManager _lockManager,\n        IssueParams memory _params\n    ) public returns (uint256) {\n        //Check input values\n        require(_params._to != address(0), \"Invalid address\");\n        require(_params._value > 0, \"Value is zero\");\n        require(_params._valuesLocked.length == _params._releaseTimes.length, \"Wrong length of parameters\");\n\n        //Check issuance is allowed (and inform the compliance manager, possibly adding locks)\n        IDSComplianceService(_services[COMPLIANCE_SERVICE]).validateIssuance(_params._to, _params._value, _params._issuanceTime);\n\n        uint256 shares =  _params._rebasingProvider.convertTokensToShares(_params._value);\n\n        _tokenData.totalSupply += shares;\n        _tokenData.totalIssued += shares;\n        _tokenData.walletsBalances[_params._to] += shares;\n\n        updateInvestorBalance(_tokenData, IDSRegistryService(_services[REGISTRY_SERVICE]), _params._to, shares, CommonUtils.IncDec.Increase);\n\n        uint256 totalLocked = 0;\n        for (uint256 i = 0; i < _params._valuesLocked.length; i++) {\n            totalLocked += _params._valuesLocked[i];\n            _lockManager.addManualLockRecord(_params._to, _params._valuesLocked[i], _params._reason, _params._releaseTimes[i]);\n        }\n        require(totalLocked <= _params._value, \"valueLocked must be smaller than value\");\n        emit Issue(_params._to, _params._value, totalLocked);\n        return shares;\n    }\n\n    modifier validSeizeParameters(TokenData storage _tokenData, address _from, address _to, uint256 _shares) {\n        require(_from != address(0), \"Invalid address\");\n        require(_to != address(0), \"Invalid address\");\n        require(_shares <= _tokenData.walletsBalances[_from], \"Not enough balance\");\n\n        _;\n    }\n\n    function burn(\n        TokenData storage _tokenData,\n        address[] memory _services,\n        address _who,\n        uint256 _value,\n        ISecuritizeRebasingProvider _rebasingProvider\n    ) public returns (uint256) {\n        uint256 sharesToBurn = _rebasingProvider.convertTokensToShares(_value);\n\n        require(sharesToBurn <= _tokenData.walletsBalances[_who], \"Not enough balance\");\n        // no need to require value <= totalSupply, since that would imply the\n        // sender's balance is greater than the totalSupply, which *should* be an assertion failure\n\n        IDSComplianceService(_services[COMPLIANCE_SERVICE]).validateBurn(_who, _value);\n\n        _tokenData.walletsBalances[_who] -= sharesToBurn;\n        updateInvestorBalance(\n            _tokenData,\n            IDSRegistryService(_services[REGISTRY_SERVICE]),\n            _who,\n            sharesToBurn,\n            CommonUtils.IncDec.Decrease\n        );\n\n        _tokenData.totalSupply -= sharesToBurn;\n        return sharesToBurn;\n    }\n\n    function seize(\n        TokenData storage _tokenData,\n        address[] memory _services,\n        address _from,\n        address _to,\n        uint256 _value,\n        uint256 _shares\n)\n    public\n    validSeizeParameters(_tokenData, _from, _to, _shares)\n    {\n        IDSRegistryService registryService = IDSRegistryService(_services[REGISTRY_SERVICE]);\n        IDSComplianceService(_services[COMPLIANCE_SERVICE]).validateSeize(_from, _to, _value);\n\n        _tokenData.walletsBalances[_from] -= _shares;\n        _tokenData.walletsBalances[_to] += _shares;\n        updateInvestorBalance(_tokenData, registryService, _from, _shares, CommonUtils.IncDec.Decrease);\n        updateInvestorBalance(_tokenData, registryService, _to, _shares, CommonUtils.IncDec.Increase);\n    }\n\n    function updateInvestorBalance(TokenData storage _tokenData, IDSRegistryService _registryService, address _wallet, uint256 _shares, CommonUtils.IncDec _increase) internal {\n        string memory investor = _registryService.getInvestor(_wallet);\n        if (!CommonUtils.isEmptyString(investor)) {\n            uint256 balance = _tokenData.investorsBalances[investor];\n            if (_increase == CommonUtils.IncDec.Increase) {\n                balance += _shares;\n            } else {\n                balance -= _shares;\n            }\n            _tokenData.investorsBalances[investor] = balance;\n        }\n    }\n}\n"},"contracts/trust/IDSTrustService.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\n/**\n * @title IDSTrustService\n * @dev An interface for a trust service which allows role-based access control for other contracts.\n */\n\nabstract contract IDSTrustService {\n\n    function initialize() public virtual;\n\n    /**\n     * @dev Should be emitted when a role is set for a user.\n     */\n    event DSTrustServiceRoleAdded(address targetAddress, uint8 role, address sender);\n    /**\n     * @dev Should be emitted when a role is removed for a user.\n     */\n    event DSTrustServiceRoleRemoved(address targetAddress, uint8 role, address sender);\n\n    // Role constants\n    uint8 public constant NONE = 0;\n    uint8 public constant MASTER = 1;\n    uint8 public constant ISSUER = 2;\n    uint8 public constant EXCHANGE = 4;\n    uint8 public constant TRANSFER_AGENT = 8;\n\n    /**\n     * @dev Transfers the ownership (MASTER role) of the contract.\n     * @param _address The address which the ownership needs to be transferred to.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function setServiceOwner(\n        address _address /*onlyMaster*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev Sets a role for an array of wallets.\n     * @dev Should not be used for setting MASTER (use setServiceOwner) or role removal (use removeRole).\n     * @param _addresses The array of wallet whose role needs to be set.\n     * @param _roles The array of role to be set. The length and order must match with _addresses\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function setRoles(address[] calldata _addresses, uint8[] calldata _roles) public virtual returns (bool);\n\n    /**\n     * @dev Sets a role for a wallet.\n     * @dev Should not be used for setting MASTER (use setServiceOwner) or role removal (use removeRole).\n     * @param _address The wallet whose role needs to be set.\n     * @param _role The role to be set.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function setRole(\n        address _address,\n        uint8 _role /*onlyMasterOrIssuer*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev Removes the role for a wallet.\n     * @dev Should not be used to remove MASTER (use setServiceOwner).\n     * @param _address The wallet whose role needs to be removed.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function removeRole(\n        address _address /*onlyMasterOrIssuer*/\n    ) public virtual returns (bool);\n\n    /**\n     * @dev Gets the role for a wallet.\n     * @param _address The wallet whose role needs to be fetched.\n     * @return A boolean that indicates if the operation was successful.\n     */\n    function getRole(address _address) public view virtual returns (uint8);\n\n}\n"},"contracts/utils/BaseDSContract.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nimport {ServiceConsumer} from \"../service/ServiceConsumer.sol\";\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {ERC1967Utils} from \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol\";\n\nabstract contract BaseDSContract is UUPSUpgradeable, ServiceConsumer {\n\n    function __BaseDSContract_init() public onlyProxy onlyInitializing {\n        __UUPSUpgradeable_init();\n        __ServiceConsumer_init();\n    }\n\n    /**\n     * @dev required by the OZ UUPS module\n     */\n    function _authorizeUpgrade(address) internal override onlyMaster {}\n\n    /**\n     * @dev returns proxy ERC1967 implementation address\n     */\n    function getImplementationAddress() external view returns (address) {\n        return ERC1967Utils.getImplementation();\n    }\n\n    /**\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\n     */\n    function getInitializedVersion() external view returns (uint64) {\n        return _getInitializedVersion();\n    }\n\n}\n"},"contracts/utils/CommonUtils.sol":{"content":"/**\n * Copyright 2025 Securitize Inc. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.8.22;\n\nlibrary CommonUtils {\n  enum IncDec { Increase, Decrease }\n\n  function encodeString(string memory _str) internal pure returns (bytes32) {\n    return keccak256(abi.encodePacked(_str));\n  }\n\n  function isEqualString(string memory _str1, string memory _str2) internal pure returns (bool) {\n    return encodeString(_str1) == encodeString(_str2);\n  }\n\n  function isEmptyString(string memory _str) internal pure returns (bool) {\n    return bytes(_str).length == 0;\n  }\n}\n"}},"matchId":"9721124","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2025-10-30T17:39:34Z","match":"match","chainId":"1","address":"0x77684815F44b28726BC3efA4471b88eF3b93fEb0"}