{"file_path":"contracts/token/DSToken.sol","creation_status":"success","source_code":"/**\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","deployed_bytecode":"0x6080604052600436106103ce5760003560e01c8063715018a6116101fd578063b3c6501511610118578063d3f61d70116100ab578063de7baed21161007a578063de7baed214610a58578063e24a473e14610a6e578063ecf85efb14610a84578063f2fde38b14610a9a578063f5be319314610aba57600080fd5b8063d3f61d70146109c8578063d73dd623146109dd578063d8486d29146109fd578063dd62ed3e14610a1257600080fd5b8063bf02f4f2116100e7578063bf02f4f2146108ef578063c4b8c5a014610988578063c75401501461099d578063cdf76fcb146109b357600080fd5b8063b3c650151461091c578063b696bf0214610949578063b820a8291461095e578063b8632a041461097357600080fd5b806395d89b4111610190578063add377391161015f578063add37739146108c3578063ae22901d146108d9578063b0a42f91146108ef578063b187bd261461090457600080fd5b806395d89b41146108485780639c37b8e11461085d578063a9059cbb14610872578063ad3cb1cc1461089257600080fd5b80637f407235116101cc5780637f407235146107f45780638456cb5914610809578063897c002e1461081e5780638da5cb5b1461083357600080fd5b8063715018a61461079e5780637627f6c4146107b357806377cc16e0146107ca578063794d3850146107df57600080fd5b80633ce5aae9116102ed5780634f1ef28611610280578063661884631161024f578063661884631461071e5780636f2968981461073e57806370a082311461075e578063712d5fa21461077e57600080fd5b80634f1ef286146106c15780634ff60823146106d457806352d1902d146106e957806359fefa47146106fe57600080fd5b8063471c7606116102bc578063471c76061461065f578063475a9fa9146106755780634ae07184146106955780634c83c126146106ab57600080fd5b80633ce5aae9146106005780633f4ba83a146106205780634021d0a21461063557806340801b6c1461064a57600080fd5b80631624f6c61161036557806324ffea9a1161033457806324ffea9a1461057f57806329b57c691461059f578063313ce567146105b4578063356c52b0146105e057600080fd5b80631624f6c6146104ee57806318160ddd1461050e5780631f227b431461053157806323b872dd1461055f57600080fd5b80630b2ae63d116103a15780630b2ae63d146104825780630cbcae70146104995780630e5324be146104ae57806315f570dc146104ce57600080fd5b8063023f8fd1146103d357806306fdde0314610410578063082af7c014610432578063095ea7b314610462575b600080fd5b3480156103df57600080fd5b506103f36103ee366004612e7d565b610acf565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561041c57600080fd5b50610425610b07565b6040516104079190612ee6565b34801561043e57600080fd5b5061045261044d366004612f15565b610b95565b6040519015158152602001610407565b34801561046e57600080fd5b5061045261047d366004612f41565b610cb5565b34801561048e57600080fd5b50610497610d21565b005b3480156104a557600080fd5b506103f3610d34565b3480156104ba57600080fd5b506103f36104c9366004612e7d565b610d5a565b3480156104da57600080fd5b506104976104e9366004612fb3565b610d75565b3480156104fa57600080fd5b5061049761050936600461301b565b610fee565b34801561051a57600080fd5b5061052361111e565b604051908152602001610407565b34801561053d57600080fd5b5061055161054c36600461309e565b6111a7565b6040516104079291906130da565b34801561056b57600080fd5b5061045261057a36600461309e565b61123e565b34801561058b57600080fd5b5061045261059a366004613269565b61131e565b3480156105ab57600080fd5b50603854610523565b3480156105c057600080fd5b50603f546105ce9060ff1681565b60405160ff9091168152602001610407565b3480156105ec57600080fd5b506104976105fb366004612e7d565b6115a8565b34801561060c57600080fd5b5061049761061b36600461336a565b611658565b34801561062c57600080fd5b50610497611934565b34801561064157600080fd5b50610523600281565b34801561065657600080fd5b506105ce600181565b34801561066b57600080fd5b5061052361200081565b34801561068157600080fd5b50610452610690366004612f41565b611a61565b3480156106a157600080fd5b5061052361200481565b3480156106b757600080fd5b5061052361040081565b6104976106cf3660046133d8565b611a8c565b3480156106e057600080fd5b50610497611aab565b3480156106f557600080fd5b50610523611ac3565b34801561070a57600080fd5b50610497610719366004613447565b611ae0565b34801561072a57600080fd5b50610452610739366004612f41565b611c05565b34801561074a57600080fd5b50610523610759366004613480565b611ced565b34801561076a57600080fd5b506105236107793660046134b4565b611d98565b34801561078a57600080fd5b506104526107993660046134cf565b611e30565b3480156107aa57600080fd5b50610497611eee565b3480156107bf57600080fd5b506040546105239081565b3480156107d657600080fd5b506105ce600081565b3480156107eb57600080fd5b506105ce600281565b34801561080057600080fd5b50610523604081565b34801561081557600080fd5b50610497611f00565b34801561082a57600080fd5b50610523600481565b34801561083f57600080fd5b506103f361202d565b34801561085457600080fd5b5061042561205b565b34801561086957600080fd5b50610523602081565b34801561087e57600080fd5b5061045261088d366004612f41565b612068565b34801561089e57600080fd5b50610425604051806040016040528060058152602001640352e302e360dc1b81525081565b3480156108cf57600080fd5b5061052361020081565b3480156108e557600080fd5b5061052361100081565b3480156108fb57600080fd5b50610523600081565b34801561091057600080fd5b5060415460ff16610452565b34801561092857600080fd5b50610931612146565b6040516001600160401b039091168152602001610407565b34801561095557600080fd5b50610523600181565b34801561096a57600080fd5b50610497612150565b34801561097f57600080fd5b50610523600881565b34801561099457600080fd5b50610523601081565b3480156109a957600080fd5b5061052361010081565b3480156109bf57600080fd5b50610523608081565b3480156109d457600080fd5b506105ce600481565b3480156109e957600080fd5b506104526109f8366004612f41565b612170565b348015610a0957600080fd5b506105ce600881565b348015610a1e57600080fd5b50610523610a2d366004613548565b6001600160a01b03918216600090815260366020908152604080832093909416825291909152205490565b348015610a6457600080fd5b50610523603c5481565b348015610a7a57600080fd5b5061052361080081565b348015610a9057600080fd5b5061052361400081565b348015610aa657600080fd5b50610497610ab53660046134b4565b6121f6565b348015610ac657600080fd5b50610523612234565b60008082118015610ae257506038548211155b610aeb57600080fd5b506000908152603760205260409020546001600160a01b031690565b603d8054610b1490613572565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4090613572565b8015610b8d5780601f10610b6257610100808354040283529160200191610b8d565b820191906000526020600020905b815481529060010190602001808311610b7057829003601f168201915b505050505081565b600033610ba061202d565b6001600160a01b031614610c4b576001610bb8612276565b604051634427673360e01b81523360048201526001600160a01b039190911690634427673390602401602060405180830381865afa158015610bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2291906135ac565b60ff1614610c4b5760405162461bcd60e51b8152600401610c42906135c9565b60405180910390fd5b6000838152602081815260409182902080546001600160a01b0319166001600160a01b0386169081179091558251868152918201527f8a9dba1dc2a1daab74cedc87602df39dcebeacc96d1f5bf104159897a96bebaf910160405180910390a15060015b92915050565b3360008181526036602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610d109086815260200190565b60405180910390a350600192915050565b610d29612282565b610d32336122a7565b565b6000610d55600080516020613ac9833981519152546001600160a01b031690565b905090565b6000908152602081905260409020546001600160a01b031690565b6000610d7f612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa158015610dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ded91906135ac565b905060ff811660081480610e04575060ff81166002145b80610e12575060ff81166001145b610e2e5760405162461bcd60e51b8152600401610c42906135c9565b6000610e386122b8565b9050600073d9e2e5bc54dcff27cf219120eac4d4b11ca0b2246376d8c33f6032610e606122c5565b8b8b876040518663ffffffff1660e01b8152600401610e83959493929190613645565b602060405180830381865af4158015610ea0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec49190613688565b9050876001600160a01b03167f47e772fda56eb54ab211642ce5421882c49fc2b7033455982af14588ae4207ff888888604051610f03939291906136a1565b60405180910390a26040518781526000906001600160a01b038a1690600080516020613ae98339815191529060200160405180910390a360006001600160a01b0316886001600160a01b0316600080516020613aa983398151915283856001600160a01b0316631b3ed7226040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc19190613688565b6040805192835260208301919091520160405180910390a3610fe4886000612361565b5050505050505050565b610ff6612394565b6000611000612439565b805490915060ff600160401b82041615906001600160401b03166000811580156110275750825b90506000826001600160401b031660011480156110435750303b155b905081158015611051575080155b1561106f5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561109957845460ff60401b1916600160401b1785555b6110a1611aab565b603d6110ae8a8c8361371f565b50603e6110bc888a8361371f565b50603f805460ff191660ff8816179055831561111257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b60008061112c612004610d5a565b6034546040516374f7a4f560e01b815260048101919091529091506000906001600160a01b038316906374f7a4f5906024015b602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a09190613688565b9392505050565b600060606111b3612462565b604051631f227b4360e01b81526001600160a01b0387811660048301528681166024830152604482018690529190911690631f227b4390606401600060405180830381865afa15801561120a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112329190810190613824565b91509150935093915050565b600083838361124b612462565b6001600160a01b031663d794eb76848484604160009054906101000a900460ff1661127589611d98565b6040516001600160e01b031960e088901b1681526001600160a01b039586166004820152949093166024850152604484019190915215156064830152608482015260a4016020604051808303816000875af11580156112d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fc9190613860565b5061131361130b88888861246e565b88888861251c565b979650505050505050565b600080611329612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa158015611373573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139791906135ac565b905060ff8116600214806113ae575060ff81166001145b6113ca5760405162461bcd60e51b8152600401610c42906135c9565b60006113d46122b8565b905060006040518060e001604052808c6001600160a01b031681526020018b81526020018a8152602001898152602001878152602001888152602001836001600160a01b03168152509050600073d9e2e5bc54dcff27cf219120eac4d4b11ca0b22463285674c160326114456122c5565b61144d612542565b866040518563ffffffff1660e01b815260040161146d94939291906138b7565b602060405180830381865af415801561148a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ae9190613688565b90508b6001600160a01b031660006001600160a01b0316600080516020613ae98339815191528d6040516114e491815260200190565b60405180910390a38b6001600160a01b031660006001600160a01b0316600080516020613aa983398151915283866001600160a01b0316631b3ed7226040518163ffffffff1660e01b8152600401602060405180830381865afa15801561154f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115739190613688565b6040805192835260208301919091520160405180910390a361159660008d612361565b5060019b9a5050505050505050505050565b336115b161202d565b6001600160a01b0316146116535760016115c9612276565b604051634427673360e01b81523360048201526001600160a01b039190911690634427673390602401602060405180830381865afa15801561160f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163391906135ac565b60ff16146116535760405162461bcd60e51b8152600401610c42906135c9565b604055565b6000611662612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa1580156116ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d091906135ac565b905060ff8116600814806116e7575060ff81166001145b6117035760405162461bcd60e51b8152600401610c42906135c9565b600061170d6122b8565b604051632a21b82b60e11b8152600481018890529091506000906001600160a01b03831690635443705690602401602060405180830381865afa158015611758573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177c9190613688565b905073d9e2e5bc54dcff27cf219120eac4d4b11ca0b22463037ac75b60326117a26122c5565b8c8c8c876040518763ffffffff1660e01b81526004016117c7969594939291906139a9565b60006040518083038186803b1580156117df57600080fd5b505af41580156117f3573d6000803e3d6000fd5b50505050876001600160a01b0316896001600160a01b03167f5068c48f7f290ce2b8d555bd28014be9f312999bb621037ea3e9fc86335a21d789898960405161183e939291906136a1565b60405180910390a3876001600160a01b0316896001600160a01b0316600080516020613ae98339815191528960405161187991815260200190565b60405180910390a3876001600160a01b0316896001600160a01b0316600080516020613aa983398151915283856001600160a01b0316631b3ed7226040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119079190613688565b6040805192835260208301919091520160405180910390a36119298989612361565b505050505050505050565b600061193e612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa158015611988573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ac91906135ac565b905060ff8116600814806119c3575060ff81166001145b6119df5760405162461bcd60e51b8152600401610c42906135c9565b60415460ff16611a2a5760405162461bcd60e51b815260206004820152601660248201527510dbdb9d1c9858dd081a5cc81b9bdd081c185d5cd95960521b6044820152606401610c42565b6041805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a15050565b6000611a828383426000604051806020016040528060008152506000611e30565b5060019392505050565b611a94612394565b611a9d8261254e565b611aa782826125f9565b5050565b611ab3612394565b611abb612282565b610d32612150565b6000611acd6126bb565b50600080516020613ac983398151915290565b33611ae961202d565b6001600160a01b031614611b8b576001611b01612276565b604051634427673360e01b81523360048201526001600160a01b039190911690634427673390602401602060405180830381865afa158015611b47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6b91906135ac565b60ff1614611b8b5760405162461bcd60e51b8152600401610c42906135c9565b60408051635eafc2b960e11b8152600481019190915260ff83166024820152811515604482015273d9e2e5bc54dcff27cf219120eac4d4b11ca0b2249063bd5f85729060640160006040518083038186803b158015611be957600080fd5b505af4158015611bfd573d6000803e3d6000fd5b505050505050565b3360009081526036602090815260408083206001600160a01b038616845290915281205480831115611c5a573360009081526036602090815260408083206001600160a01b0388168452909152812055611c89565b611c648382613a06565b3360009081526036602090815260408083206001600160a01b03891684529091529020555b3360008181526036602090815260408083206001600160a01b038916808552908352928190205490519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060019392505050565b600080611cf86122b8565b90506000816001600160a01b03166374f7a4f5603260010186604051611d1e9190613a19565b908152604051908190036020018120546001600160e01b031960e084901b168252611d4f9160040190815260200190565b602060405180830381865afa158015611d6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d909190613688565b949350505050565b600080611da6612004610d5a565b6001600160a01b038481166000908152603260205260408082205490516374f7a4f560e01b8152600481018290529394509290918416906374f7a4f590602401602060405180830381865afa158015611e03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e279190613688565b95945050505050565b60006060808515611ed057604080516001808252818301909252906020808301908036833750506040805160018082528183019092529294509050602080830190803683370190505090508582600081518110611e8f57611e8f613a35565b6020026020010181815250508381600081518110611eaf57611eaf613a35565b60200260200101906001600160401b031690816001600160401b0316815250505b611ede89898985898661131e565b5060019998505050505050505050565b611ef6612704565b610d326000612736565b6000611f0a612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa158015611f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7891906135ac565b905060ff811660081480611f8f575060ff81166001145b611fab5760405162461bcd60e51b8152600401610c42906135c9565b60415460ff1615611ff35760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b6044820152606401610c42565b6041805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a15050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b603e8054610b1490613572565b6000338383612075612462565b6001600160a01b031663d794eb76848484604160009054906101000a900460ff1661209f89611d98565b6040516001600160e01b031960e088901b1681526001600160a01b039586166004820152949093166024850152604484019190915215156064830152608482015260a4016020604051808303816000875af1158015612102573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121269190613860565b5061213c61213487876127a7565b33888861251c565b9695505050505050565b6000610d556127b4565b612158612394565b612160612282565b6121686127cd565b610d32610d21565b3360009081526036602090815260408083206001600160a01b038616845290915281205461219f908390613a4b565b3360008181526036602090815260408083206001600160a01b038916808552908352928190208590555193845290927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101610d10565b6121fe612704565b6001600160a01b03811661222857604051631e4fbdf760e01b815260006004820152602401610c42565b61223181612736565b50565b60008061223f6122b8565b6035546040516374f7a4f560e01b815260048101919091529091506000906001600160a01b038316906374f7a4f59060240161115f565b6000610d556001610d5a565b61228a6127d5565b610d3257604051631afcd79f60e31b815260040160405180910390fd5b6122af612282565b612231816127ef565b6000610d55612004610d5a565b604080516002808252606080830184529260009291906020830190803683370190505090506122f46008610d5a565b8160008151811061230757612307613a35565b60200260200101906001600160a01b031690816001600160a01b0316815250506123316004610d5a565b8160018151811061234457612344613a35565b6001600160a01b0390921660209283029190910190910152919050565b61236a82611d98565b60000361237a5761237a826127f7565b600061238582611d98565b1115611aa757611aa7816128aa565b306001600160a01b037f00000000000000000000000077684815f44b28726bc3efa4471b88ef3b93feb016148061241b57507f00000000000000000000000077684815f44b28726bc3efa4471b88ef3b93feb06001600160a01b031661240f600080516020613ac9833981519152546001600160a01b031690565b6001600160a01b031614155b15610d325760405163703e46dd60e11b815260040160405180910390fd5b6000807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610caf565b6000610d556008610d5a565b6001600160a01b03831660009081526036602090815260408083203384529091528120548211156124d85760405162461bcd60e51b81526020600482015260146024820152734e6f7420656e6f75676820616c6c6f77616e636560601b6044820152606401610c42565b6001600160a01b03841660009081526036602090815260408083203384529091528120805484929061250b908490613a06565b90915550611d90905084848461291e565b6000841561252f5761252f848484612b18565b6125398484612361565b50929392505050565b6000610d556040610d5a565b3361255761202d565b6001600160a01b03161461223157600161256f612276565b604051634427673360e01b81523360048201526001600160a01b039190911690634427673390602401602060405180830381865afa1580156125b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d991906135ac565b60ff16146122315760405162461bcd60e51b8152600401610c42906135c9565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612653575060408051601f3d908101601f1916820190925261265091810190613688565b60015b61267b57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610c42565b600080516020613ac983398151915281146126ac57604051632a87526960e21b815260048101829052602401610c42565b6126b68383612b30565b505050565b306001600160a01b037f00000000000000000000000077684815f44b28726bc3efa4471b88ef3b93feb01614610d325760405163703e46dd60e11b815260040160405180910390fd5b3361270d61202d565b6001600160a01b031614610d325760405163118cdaa760e01b8152336004820152602401610c42565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60006111a033848461291e565b60006127be612439565b546001600160401b0316919050565b610d32612282565b60006127df612439565b54600160401b900460ff16919050565b6121fe612282565b6001600160a01b0381166000908152603960205260409020548015611aa7576038548181146128615760008181526037602090815260408083205485845281842080546001600160a01b0319166001600160a01b0390921691821790558352603990915290208290555b6001600160a01b03831660009081526039602090815260408083208390558383526037909152902080546001600160a01b03191690556128a2600182613a06565b603855505050565b6001600160a01b03811660009081526039602052604081205490819003611aa757600060385460016128dc9190613a4b565b600081815260376020908152604080832080546001600160a01b0389166001600160a01b03199091168117909155835260399091529020819055603855505050565b60006001600160a01b03831661293357600080fd5b6000612940612004610d5a565b604051632a21b82b60e11b8152600481018590529091506000906001600160a01b03831690635443705690602401602060405180830381865afa15801561298b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129af9190613688565b6001600160a01b0387166000908152603260205260409020549091508111156129d757600080fd5b6001600160a01b038616600090815260326020526040812080548392906129ff908490613a06565b90915550506001600160a01b03851660009081526032602052604081208054839290612a2c908490613a4b565b92505081905550846001600160a01b0316866001600160a01b0316600080516020613ae983398151915286604051612a6691815260200190565b60405180910390a3846001600160a01b0316866001600160a01b0316600080516020613aa983398151915283856001600160a01b0316631b3ed7226040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ad0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af49190613688565b6040805192835260208301919091520160405180910390a350600195945050505050565b612b2483826001612b86565b6126b682826000612b86565b612b3982612cfc565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115612b7e576126b68282612d61565b611aa7612dce565b6000612b90612ded565b60405163479ad3af60e11b81526001600160a01b0386811660048301529190911690638f35a75e90602401600060405180830381865afa158015612bd8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c009190810190613a5e565b9050612c0b81511590565b612cf6576000612c1a82611ced565b90506000836001811115612c3057612c30613a92565b03612c4657612c3f8482613a4b565b9050612c53565b612c508482613a06565b90505b6000612c5d6122b8565b604051632a21b82b60e11b8152600481018490529091506000906001600160a01b03831690635443705690602401602060405180830381865afa158015612ca8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ccc9190613688565b905080603260010185604051612ce29190613a19565b908152604051908190036020019020555050505b50505050565b806001600160a01b03163b600003612d3257604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610c42565b600080516020613ac983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051612d7e9190613a19565b600060405180830381855af49150503d8060008114612db9576040519150601f19603f3d011682016040523d82523d6000602084013e612dbe565b606091505b5091509150611e27858383612df9565b3415610d325760405163b398979f60e01b815260040160405180910390fd5b6000610d556004610d5a565b606082612e0e57612e0982612e55565b6111a0565b8151158015612e2557506001600160a01b0384163b155b15612e4e57604051639996b31560e01b81526001600160a01b0385166004820152602401610c42565b50806111a0565b805115612e6457805160208201fd5b60405163d6bda27560e01b815260040160405180910390fd5b600060208284031215612e8f57600080fd5b5035919050565b60005b83811015612eb1578181015183820152602001612e99565b50506000910152565b60008151808452612ed2816020860160208601612e96565b601f01601f19169290920160200192915050565b6020815260006111a06020830184612eba565b80356001600160a01b0381168114612f1057600080fd5b919050565b60008060408385031215612f2857600080fd5b82359150612f3860208401612ef9565b90509250929050565b60008060408385031215612f5457600080fd5b612f5d83612ef9565b946020939093013593505050565b60008083601f840112612f7d57600080fd5b5081356001600160401b03811115612f9457600080fd5b602083019150836020828501011115612fac57600080fd5b9250929050565b60008060008060608587031215612fc957600080fd5b612fd285612ef9565b93506020850135925060408501356001600160401b03811115612ff457600080fd5b61300087828801612f6b565b95989497509550505050565b60ff8116811461223157600080fd5b60008060008060006060868803121561303357600080fd5b85356001600160401b038082111561304a57600080fd5b61305689838a01612f6b565b9097509550602088013591508082111561306f57600080fd5b5061307c88828901612f6b565b90945092505060408601356130908161300c565b809150509295509295909350565b6000806000606084860312156130b357600080fd5b6130bc84612ef9565b92506130ca60208501612ef9565b9150604084013590509250925092565b828152604060208201526000611d906040830184612eba565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613131576131316130f3565b604052919050565b60006001600160401b03821115613152576131526130f3565b5060051b60200190565b60006001600160401b03821115613175576131756130f3565b50601f01601f191660200190565b60006131966131918461315c565b613109565b90508281528383830111156131aa57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126131d257600080fd5b6111a083833560208501613183565b80356001600160401b0381168114612f1057600080fd5b600082601f83011261320957600080fd5b8135602061321961319183613139565b8083825260208201915060208460051b87010193508684111561323b57600080fd5b602086015b8481101561325e57613251816131e1565b8352918301918301613240565b509695505050505050565b60008060008060008060c0878903121561328257600080fd5b61328b87612ef9565b955060208088013595506040880135945060608801356001600160401b03808211156132b657600080fd5b818a0191508a601f8301126132ca57600080fd5b81356132d861319182613139565b81815260059190911b8301840190848101908d8311156132f757600080fd5b938501935b82851015613315578435825293850193908501906132fc565b9750505060808a013592508083111561332d57600080fd5b6133398b848c016131c1565b945060a08a013592508083111561334f57600080fd5b505061335d89828a016131f8565b9150509295509295509295565b60008060008060006080868803121561338257600080fd5b61338b86612ef9565b945061339960208701612ef9565b93506040860135925060608601356001600160401b038111156133bb57600080fd5b6133c788828901612f6b565b969995985093965092949392505050565b600080604083850312156133eb57600080fd5b6133f483612ef9565b915060208301356001600160401b0381111561340f57600080fd5b8301601f8101851361342057600080fd5b61342f85823560208401613183565b9150509250929050565b801515811461223157600080fd5b6000806040838503121561345a57600080fd5b82356134658161300c565b9150602083013561347581613439565b809150509250929050565b60006020828403121561349257600080fd5b81356001600160401b038111156134a857600080fd5b611d90848285016131c1565b6000602082840312156134c657600080fd5b6111a082612ef9565b60008060008060008060c087890312156134e857600080fd5b6134f187612ef9565b955060208701359450604087013593506060870135925060808701356001600160401b0381111561352157600080fd5b61352d89828a016131c1565b92505061353c60a088016131e1565b90509295509295509295565b6000806040838503121561355b57600080fd5b61356483612ef9565b9150612f3860208401612ef9565b600181811c9082168061358657607f821691505b6020821081036135a657634e487b7160e01b600052602260045260246000fd5b50919050565b6000602082840312156135be57600080fd5b81516111a08161300c565b60208082526018908201527f496e73756666696369656e74207472757374206c6576656c0000000000000000604082015260600190565b60008151808452602080850194506020840160005b8381101561363a5781516001600160a01b031687529582019590820190600101613615565b509495945050505050565b85815260a06020820152600061365e60a0830187613600565b6001600160a01b039586166040840152606083019490945250921660809092019190915292915050565b60006020828403121561369a57600080fd5b5051919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b601f8211156126b6576000816000526020600020601f850160051c810160208610156137005750805b601f850160051c820191505b81811015611bfd5782815560010161370c565b6001600160401b03831115613736576137366130f3565b61374a836137448354613572565b836136d7565b6000601f84116001811461377e57600085156137665750838201355b600019600387901b1c1916600186901b1783556137d8565b600083815260209020601f19861690835b828110156137af578685013582556020948501946001909201910161378f565b50868210156137cc5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600082601f8301126137f057600080fd5b81516137fe6131918261315c565b81815284602083860101111561381357600080fd5b611d90826020830160208701612e96565b6000806040838503121561383757600080fd5b8251915060208301516001600160401b0381111561385457600080fd5b61342f858286016137df565b60006020828403121561387257600080fd5b81516111a081613439565b60008151808452602080850194506020840160005b8381101561363a5781516001600160401b031687529582019590820190600101613892565b848152600060206080818401526138d16080840187613600565b60018060a01b038087166040860152848203606086015260e082018187511683528387015184840152604087015160408401526060870151915060e06060840152808251808352610100850191508584019350600092505b808310156139495783518252928501926001929092019190850190613929565b50608088015194508381036080850152613963818661387d565b945050505060a085015181830360a083015261397f8382612eba565b92505060c085015161399c60c08301826001600160a01b03169052565b5090979650505050505050565b86815260c0602082015260006139c260c0830188613600565b6001600160a01b039687166040840152949095166060820152608081019290925260a0909101529392505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610caf57610caf6139f0565b60008251613a2b818460208701612e96565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b80820180821115610caf57610caf6139f0565b600060208284031215613a7057600080fd5b81516001600160401b03811115613a8657600080fd5b611d90848285016137df565b634e487b7160e01b600052602160045260246000fdfe36fc7423c1d510db881ac4f5079886a3514ef5d12646d91185e86d6e6aac25dd360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ef22d80044cdee555e2d7dbbcd24698313699163545b9ab1cf38e18bcfc0c42a64736f6c63430008160033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"paris","libraries":{"contracts/token/DSToken.sol":{"TokenLibrary":"0xd9e2e5bc54dcff27cf219120eac4d4b11ca0b224"}},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}}},"optimization_runs":200,"sourcify_repo_url":null,"decoded_constructor_args":null,"compiler_version":"v0.8.22+commit.4fc1097e","is_verified_via_verifier_alliance":false,"verified_at":"2025-10-30T17:39:38.266686Z","implementations":[],"proxy_type":null,"external_libraries":[{"name":"TokenLibrary","address_hash":"0xd9e2E5Bc54dcFF27cF219120eac4D4B11CA0b224"}],"creation_bytecode":"0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000da565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000775760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d75780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613b3e620001046000396000818161239f015281816123c801526126c60152613b3e6000f3fe6080604052600436106103ce5760003560e01c8063715018a6116101fd578063b3c6501511610118578063d3f61d70116100ab578063de7baed21161007a578063de7baed214610a58578063e24a473e14610a6e578063ecf85efb14610a84578063f2fde38b14610a9a578063f5be319314610aba57600080fd5b8063d3f61d70146109c8578063d73dd623146109dd578063d8486d29146109fd578063dd62ed3e14610a1257600080fd5b8063bf02f4f2116100e7578063bf02f4f2146108ef578063c4b8c5a014610988578063c75401501461099d578063cdf76fcb146109b357600080fd5b8063b3c650151461091c578063b696bf0214610949578063b820a8291461095e578063b8632a041461097357600080fd5b806395d89b4111610190578063add377391161015f578063add37739146108c3578063ae22901d146108d9578063b0a42f91146108ef578063b187bd261461090457600080fd5b806395d89b41146108485780639c37b8e11461085d578063a9059cbb14610872578063ad3cb1cc1461089257600080fd5b80637f407235116101cc5780637f407235146107f45780638456cb5914610809578063897c002e1461081e5780638da5cb5b1461083357600080fd5b8063715018a61461079e5780637627f6c4146107b357806377cc16e0146107ca578063794d3850146107df57600080fd5b80633ce5aae9116102ed5780634f1ef28611610280578063661884631161024f578063661884631461071e5780636f2968981461073e57806370a082311461075e578063712d5fa21461077e57600080fd5b80634f1ef286146106c15780634ff60823146106d457806352d1902d146106e957806359fefa47146106fe57600080fd5b8063471c7606116102bc578063471c76061461065f578063475a9fa9146106755780634ae07184146106955780634c83c126146106ab57600080fd5b80633ce5aae9146106005780633f4ba83a146106205780634021d0a21461063557806340801b6c1461064a57600080fd5b80631624f6c61161036557806324ffea9a1161033457806324ffea9a1461057f57806329b57c691461059f578063313ce567146105b4578063356c52b0146105e057600080fd5b80631624f6c6146104ee57806318160ddd1461050e5780631f227b431461053157806323b872dd1461055f57600080fd5b80630b2ae63d116103a15780630b2ae63d146104825780630cbcae70146104995780630e5324be146104ae57806315f570dc146104ce57600080fd5b8063023f8fd1146103d357806306fdde0314610410578063082af7c014610432578063095ea7b314610462575b600080fd5b3480156103df57600080fd5b506103f36103ee366004612e7d565b610acf565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561041c57600080fd5b50610425610b07565b6040516104079190612ee6565b34801561043e57600080fd5b5061045261044d366004612f15565b610b95565b6040519015158152602001610407565b34801561046e57600080fd5b5061045261047d366004612f41565b610cb5565b34801561048e57600080fd5b50610497610d21565b005b3480156104a557600080fd5b506103f3610d34565b3480156104ba57600080fd5b506103f36104c9366004612e7d565b610d5a565b3480156104da57600080fd5b506104976104e9366004612fb3565b610d75565b3480156104fa57600080fd5b5061049761050936600461301b565b610fee565b34801561051a57600080fd5b5061052361111e565b604051908152602001610407565b34801561053d57600080fd5b5061055161054c36600461309e565b6111a7565b6040516104079291906130da565b34801561056b57600080fd5b5061045261057a36600461309e565b61123e565b34801561058b57600080fd5b5061045261059a366004613269565b61131e565b3480156105ab57600080fd5b50603854610523565b3480156105c057600080fd5b50603f546105ce9060ff1681565b60405160ff9091168152602001610407565b3480156105ec57600080fd5b506104976105fb366004612e7d565b6115a8565b34801561060c57600080fd5b5061049761061b36600461336a565b611658565b34801561062c57600080fd5b50610497611934565b34801561064157600080fd5b50610523600281565b34801561065657600080fd5b506105ce600181565b34801561066b57600080fd5b5061052361200081565b34801561068157600080fd5b50610452610690366004612f41565b611a61565b3480156106a157600080fd5b5061052361200481565b3480156106b757600080fd5b5061052361040081565b6104976106cf3660046133d8565b611a8c565b3480156106e057600080fd5b50610497611aab565b3480156106f557600080fd5b50610523611ac3565b34801561070a57600080fd5b50610497610719366004613447565b611ae0565b34801561072a57600080fd5b50610452610739366004612f41565b611c05565b34801561074a57600080fd5b50610523610759366004613480565b611ced565b34801561076a57600080fd5b506105236107793660046134b4565b611d98565b34801561078a57600080fd5b506104526107993660046134cf565b611e30565b3480156107aa57600080fd5b50610497611eee565b3480156107bf57600080fd5b506040546105239081565b3480156107d657600080fd5b506105ce600081565b3480156107eb57600080fd5b506105ce600281565b34801561080057600080fd5b50610523604081565b34801561081557600080fd5b50610497611f00565b34801561082a57600080fd5b50610523600481565b34801561083f57600080fd5b506103f361202d565b34801561085457600080fd5b5061042561205b565b34801561086957600080fd5b50610523602081565b34801561087e57600080fd5b5061045261088d366004612f41565b612068565b34801561089e57600080fd5b50610425604051806040016040528060058152602001640352e302e360dc1b81525081565b3480156108cf57600080fd5b5061052361020081565b3480156108e557600080fd5b5061052361100081565b3480156108fb57600080fd5b50610523600081565b34801561091057600080fd5b5060415460ff16610452565b34801561092857600080fd5b50610931612146565b6040516001600160401b039091168152602001610407565b34801561095557600080fd5b50610523600181565b34801561096a57600080fd5b50610497612150565b34801561097f57600080fd5b50610523600881565b34801561099457600080fd5b50610523601081565b3480156109a957600080fd5b5061052361010081565b3480156109bf57600080fd5b50610523608081565b3480156109d457600080fd5b506105ce600481565b3480156109e957600080fd5b506104526109f8366004612f41565b612170565b348015610a0957600080fd5b506105ce600881565b348015610a1e57600080fd5b50610523610a2d366004613548565b6001600160a01b03918216600090815260366020908152604080832093909416825291909152205490565b348015610a6457600080fd5b50610523603c5481565b348015610a7a57600080fd5b5061052361080081565b348015610a9057600080fd5b5061052361400081565b348015610aa657600080fd5b50610497610ab53660046134b4565b6121f6565b348015610ac657600080fd5b50610523612234565b60008082118015610ae257506038548211155b610aeb57600080fd5b506000908152603760205260409020546001600160a01b031690565b603d8054610b1490613572565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4090613572565b8015610b8d5780601f10610b6257610100808354040283529160200191610b8d565b820191906000526020600020905b815481529060010190602001808311610b7057829003601f168201915b505050505081565b600033610ba061202d565b6001600160a01b031614610c4b576001610bb8612276565b604051634427673360e01b81523360048201526001600160a01b039190911690634427673390602401602060405180830381865afa158015610bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2291906135ac565b60ff1614610c4b5760405162461bcd60e51b8152600401610c42906135c9565b60405180910390fd5b6000838152602081815260409182902080546001600160a01b0319166001600160a01b0386169081179091558251868152918201527f8a9dba1dc2a1daab74cedc87602df39dcebeacc96d1f5bf104159897a96bebaf910160405180910390a15060015b92915050565b3360008181526036602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610d109086815260200190565b60405180910390a350600192915050565b610d29612282565b610d32336122a7565b565b6000610d55600080516020613ac9833981519152546001600160a01b031690565b905090565b6000908152602081905260409020546001600160a01b031690565b6000610d7f612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa158015610dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ded91906135ac565b905060ff811660081480610e04575060ff81166002145b80610e12575060ff81166001145b610e2e5760405162461bcd60e51b8152600401610c42906135c9565b6000610e386122b8565b9050600073d9e2e5bc54dcff27cf219120eac4d4b11ca0b2246376d8c33f6032610e606122c5565b8b8b876040518663ffffffff1660e01b8152600401610e83959493929190613645565b602060405180830381865af4158015610ea0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec49190613688565b9050876001600160a01b03167f47e772fda56eb54ab211642ce5421882c49fc2b7033455982af14588ae4207ff888888604051610f03939291906136a1565b60405180910390a26040518781526000906001600160a01b038a1690600080516020613ae98339815191529060200160405180910390a360006001600160a01b0316886001600160a01b0316600080516020613aa983398151915283856001600160a01b0316631b3ed7226040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc19190613688565b6040805192835260208301919091520160405180910390a3610fe4886000612361565b5050505050505050565b610ff6612394565b6000611000612439565b805490915060ff600160401b82041615906001600160401b03166000811580156110275750825b90506000826001600160401b031660011480156110435750303b155b905081158015611051575080155b1561106f5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561109957845460ff60401b1916600160401b1785555b6110a1611aab565b603d6110ae8a8c8361371f565b50603e6110bc888a8361371f565b50603f805460ff191660ff8816179055831561111257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b60008061112c612004610d5a565b6034546040516374f7a4f560e01b815260048101919091529091506000906001600160a01b038316906374f7a4f5906024015b602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a09190613688565b9392505050565b600060606111b3612462565b604051631f227b4360e01b81526001600160a01b0387811660048301528681166024830152604482018690529190911690631f227b4390606401600060405180830381865afa15801561120a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112329190810190613824565b91509150935093915050565b600083838361124b612462565b6001600160a01b031663d794eb76848484604160009054906101000a900460ff1661127589611d98565b6040516001600160e01b031960e088901b1681526001600160a01b039586166004820152949093166024850152604484019190915215156064830152608482015260a4016020604051808303816000875af11580156112d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fc9190613860565b5061131361130b88888861246e565b88888861251c565b979650505050505050565b600080611329612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa158015611373573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139791906135ac565b905060ff8116600214806113ae575060ff81166001145b6113ca5760405162461bcd60e51b8152600401610c42906135c9565b60006113d46122b8565b905060006040518060e001604052808c6001600160a01b031681526020018b81526020018a8152602001898152602001878152602001888152602001836001600160a01b03168152509050600073d9e2e5bc54dcff27cf219120eac4d4b11ca0b22463285674c160326114456122c5565b61144d612542565b866040518563ffffffff1660e01b815260040161146d94939291906138b7565b602060405180830381865af415801561148a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ae9190613688565b90508b6001600160a01b031660006001600160a01b0316600080516020613ae98339815191528d6040516114e491815260200190565b60405180910390a38b6001600160a01b031660006001600160a01b0316600080516020613aa983398151915283866001600160a01b0316631b3ed7226040518163ffffffff1660e01b8152600401602060405180830381865afa15801561154f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115739190613688565b6040805192835260208301919091520160405180910390a361159660008d612361565b5060019b9a5050505050505050505050565b336115b161202d565b6001600160a01b0316146116535760016115c9612276565b604051634427673360e01b81523360048201526001600160a01b039190911690634427673390602401602060405180830381865afa15801561160f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163391906135ac565b60ff16146116535760405162461bcd60e51b8152600401610c42906135c9565b604055565b6000611662612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa1580156116ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d091906135ac565b905060ff8116600814806116e7575060ff81166001145b6117035760405162461bcd60e51b8152600401610c42906135c9565b600061170d6122b8565b604051632a21b82b60e11b8152600481018890529091506000906001600160a01b03831690635443705690602401602060405180830381865afa158015611758573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177c9190613688565b905073d9e2e5bc54dcff27cf219120eac4d4b11ca0b22463037ac75b60326117a26122c5565b8c8c8c876040518763ffffffff1660e01b81526004016117c7969594939291906139a9565b60006040518083038186803b1580156117df57600080fd5b505af41580156117f3573d6000803e3d6000fd5b50505050876001600160a01b0316896001600160a01b03167f5068c48f7f290ce2b8d555bd28014be9f312999bb621037ea3e9fc86335a21d789898960405161183e939291906136a1565b60405180910390a3876001600160a01b0316896001600160a01b0316600080516020613ae98339815191528960405161187991815260200190565b60405180910390a3876001600160a01b0316896001600160a01b0316600080516020613aa983398151915283856001600160a01b0316631b3ed7226040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119079190613688565b6040805192835260208301919091520160405180910390a36119298989612361565b505050505050505050565b600061193e612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa158015611988573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ac91906135ac565b905060ff8116600814806119c3575060ff81166001145b6119df5760405162461bcd60e51b8152600401610c42906135c9565b60415460ff16611a2a5760405162461bcd60e51b815260206004820152601660248201527510dbdb9d1c9858dd081a5cc81b9bdd081c185d5cd95960521b6044820152606401610c42565b6041805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a15050565b6000611a828383426000604051806020016040528060008152506000611e30565b5060019392505050565b611a94612394565b611a9d8261254e565b611aa782826125f9565b5050565b611ab3612394565b611abb612282565b610d32612150565b6000611acd6126bb565b50600080516020613ac983398151915290565b33611ae961202d565b6001600160a01b031614611b8b576001611b01612276565b604051634427673360e01b81523360048201526001600160a01b039190911690634427673390602401602060405180830381865afa158015611b47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6b91906135ac565b60ff1614611b8b5760405162461bcd60e51b8152600401610c42906135c9565b60408051635eafc2b960e11b8152600481019190915260ff83166024820152811515604482015273d9e2e5bc54dcff27cf219120eac4d4b11ca0b2249063bd5f85729060640160006040518083038186803b158015611be957600080fd5b505af4158015611bfd573d6000803e3d6000fd5b505050505050565b3360009081526036602090815260408083206001600160a01b038616845290915281205480831115611c5a573360009081526036602090815260408083206001600160a01b0388168452909152812055611c89565b611c648382613a06565b3360009081526036602090815260408083206001600160a01b03891684529091529020555b3360008181526036602090815260408083206001600160a01b038916808552908352928190205490519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060019392505050565b600080611cf86122b8565b90506000816001600160a01b03166374f7a4f5603260010186604051611d1e9190613a19565b908152604051908190036020018120546001600160e01b031960e084901b168252611d4f9160040190815260200190565b602060405180830381865afa158015611d6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d909190613688565b949350505050565b600080611da6612004610d5a565b6001600160a01b038481166000908152603260205260408082205490516374f7a4f560e01b8152600481018290529394509290918416906374f7a4f590602401602060405180830381865afa158015611e03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e279190613688565b95945050505050565b60006060808515611ed057604080516001808252818301909252906020808301908036833750506040805160018082528183019092529294509050602080830190803683370190505090508582600081518110611e8f57611e8f613a35565b6020026020010181815250508381600081518110611eaf57611eaf613a35565b60200260200101906001600160401b031690816001600160401b0316815250505b611ede89898985898661131e565b5060019998505050505050505050565b611ef6612704565b610d326000612736565b6000611f0a612276565b604051634427673360e01b81523360048201529091506000906001600160a01b03831690634427673390602401602060405180830381865afa158015611f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7891906135ac565b905060ff811660081480611f8f575060ff81166001145b611fab5760405162461bcd60e51b8152600401610c42906135c9565b60415460ff1615611ff35760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b6044820152606401610c42565b6041805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a15050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b603e8054610b1490613572565b6000338383612075612462565b6001600160a01b031663d794eb76848484604160009054906101000a900460ff1661209f89611d98565b6040516001600160e01b031960e088901b1681526001600160a01b039586166004820152949093166024850152604484019190915215156064830152608482015260a4016020604051808303816000875af1158015612102573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121269190613860565b5061213c61213487876127a7565b33888861251c565b9695505050505050565b6000610d556127b4565b612158612394565b612160612282565b6121686127cd565b610d32610d21565b3360009081526036602090815260408083206001600160a01b038616845290915281205461219f908390613a4b565b3360008181526036602090815260408083206001600160a01b038916808552908352928190208590555193845290927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101610d10565b6121fe612704565b6001600160a01b03811661222857604051631e4fbdf760e01b815260006004820152602401610c42565b61223181612736565b50565b60008061223f6122b8565b6035546040516374f7a4f560e01b815260048101919091529091506000906001600160a01b038316906374f7a4f59060240161115f565b6000610d556001610d5a565b61228a6127d5565b610d3257604051631afcd79f60e31b815260040160405180910390fd5b6122af612282565b612231816127ef565b6000610d55612004610d5a565b604080516002808252606080830184529260009291906020830190803683370190505090506122f46008610d5a565b8160008151811061230757612307613a35565b60200260200101906001600160a01b031690816001600160a01b0316815250506123316004610d5a565b8160018151811061234457612344613a35565b6001600160a01b0390921660209283029190910190910152919050565b61236a82611d98565b60000361237a5761237a826127f7565b600061238582611d98565b1115611aa757611aa7816128aa565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061241b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661240f600080516020613ac9833981519152546001600160a01b031690565b6001600160a01b031614155b15610d325760405163703e46dd60e11b815260040160405180910390fd5b6000807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610caf565b6000610d556008610d5a565b6001600160a01b03831660009081526036602090815260408083203384529091528120548211156124d85760405162461bcd60e51b81526020600482015260146024820152734e6f7420656e6f75676820616c6c6f77616e636560601b6044820152606401610c42565b6001600160a01b03841660009081526036602090815260408083203384529091528120805484929061250b908490613a06565b90915550611d90905084848461291e565b6000841561252f5761252f848484612b18565b6125398484612361565b50929392505050565b6000610d556040610d5a565b3361255761202d565b6001600160a01b03161461223157600161256f612276565b604051634427673360e01b81523360048201526001600160a01b039190911690634427673390602401602060405180830381865afa1580156125b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d991906135ac565b60ff16146122315760405162461bcd60e51b8152600401610c42906135c9565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612653575060408051601f3d908101601f1916820190925261265091810190613688565b60015b61267b57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610c42565b600080516020613ac983398151915281146126ac57604051632a87526960e21b815260048101829052602401610c42565b6126b68383612b30565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d325760405163703e46dd60e11b815260040160405180910390fd5b3361270d61202d565b6001600160a01b031614610d325760405163118cdaa760e01b8152336004820152602401610c42565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60006111a033848461291e565b60006127be612439565b546001600160401b0316919050565b610d32612282565b60006127df612439565b54600160401b900460ff16919050565b6121fe612282565b6001600160a01b0381166000908152603960205260409020548015611aa7576038548181146128615760008181526037602090815260408083205485845281842080546001600160a01b0319166001600160a01b0390921691821790558352603990915290208290555b6001600160a01b03831660009081526039602090815260408083208390558383526037909152902080546001600160a01b03191690556128a2600182613a06565b603855505050565b6001600160a01b03811660009081526039602052604081205490819003611aa757600060385460016128dc9190613a4b565b600081815260376020908152604080832080546001600160a01b0389166001600160a01b03199091168117909155835260399091529020819055603855505050565b60006001600160a01b03831661293357600080fd5b6000612940612004610d5a565b604051632a21b82b60e11b8152600481018590529091506000906001600160a01b03831690635443705690602401602060405180830381865afa15801561298b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129af9190613688565b6001600160a01b0387166000908152603260205260409020549091508111156129d757600080fd5b6001600160a01b038616600090815260326020526040812080548392906129ff908490613a06565b90915550506001600160a01b03851660009081526032602052604081208054839290612a2c908490613a4b565b92505081905550846001600160a01b0316866001600160a01b0316600080516020613ae983398151915286604051612a6691815260200190565b60405180910390a3846001600160a01b0316866001600160a01b0316600080516020613aa983398151915283856001600160a01b0316631b3ed7226040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ad0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af49190613688565b6040805192835260208301919091520160405180910390a350600195945050505050565b612b2483826001612b86565b6126b682826000612b86565b612b3982612cfc565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115612b7e576126b68282612d61565b611aa7612dce565b6000612b90612ded565b60405163479ad3af60e11b81526001600160a01b0386811660048301529190911690638f35a75e90602401600060405180830381865afa158015612bd8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c009190810190613a5e565b9050612c0b81511590565b612cf6576000612c1a82611ced565b90506000836001811115612c3057612c30613a92565b03612c4657612c3f8482613a4b565b9050612c53565b612c508482613a06565b90505b6000612c5d6122b8565b604051632a21b82b60e11b8152600481018490529091506000906001600160a01b03831690635443705690602401602060405180830381865afa158015612ca8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ccc9190613688565b905080603260010185604051612ce29190613a19565b908152604051908190036020019020555050505b50505050565b806001600160a01b03163b600003612d3257604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610c42565b600080516020613ac983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051612d7e9190613a19565b600060405180830381855af49150503d8060008114612db9576040519150601f19603f3d011682016040523d82523d6000602084013e612dbe565b606091505b5091509150611e27858383612df9565b3415610d325760405163b398979f60e01b815260040160405180910390fd5b6000610d556004610d5a565b606082612e0e57612e0982612e55565b6111a0565b8151158015612e2557506001600160a01b0384163b155b15612e4e57604051639996b31560e01b81526001600160a01b0385166004820152602401610c42565b50806111a0565b805115612e6457805160208201fd5b60405163d6bda27560e01b815260040160405180910390fd5b600060208284031215612e8f57600080fd5b5035919050565b60005b83811015612eb1578181015183820152602001612e99565b50506000910152565b60008151808452612ed2816020860160208601612e96565b601f01601f19169290920160200192915050565b6020815260006111a06020830184612eba565b80356001600160a01b0381168114612f1057600080fd5b919050565b60008060408385031215612f2857600080fd5b82359150612f3860208401612ef9565b90509250929050565b60008060408385031215612f5457600080fd5b612f5d83612ef9565b946020939093013593505050565b60008083601f840112612f7d57600080fd5b5081356001600160401b03811115612f9457600080fd5b602083019150836020828501011115612fac57600080fd5b9250929050565b60008060008060608587031215612fc957600080fd5b612fd285612ef9565b93506020850135925060408501356001600160401b03811115612ff457600080fd5b61300087828801612f6b565b95989497509550505050565b60ff8116811461223157600080fd5b60008060008060006060868803121561303357600080fd5b85356001600160401b038082111561304a57600080fd5b61305689838a01612f6b565b9097509550602088013591508082111561306f57600080fd5b5061307c88828901612f6b565b90945092505060408601356130908161300c565b809150509295509295909350565b6000806000606084860312156130b357600080fd5b6130bc84612ef9565b92506130ca60208501612ef9565b9150604084013590509250925092565b828152604060208201526000611d906040830184612eba565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613131576131316130f3565b604052919050565b60006001600160401b03821115613152576131526130f3565b5060051b60200190565b60006001600160401b03821115613175576131756130f3565b50601f01601f191660200190565b60006131966131918461315c565b613109565b90508281528383830111156131aa57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126131d257600080fd5b6111a083833560208501613183565b80356001600160401b0381168114612f1057600080fd5b600082601f83011261320957600080fd5b8135602061321961319183613139565b8083825260208201915060208460051b87010193508684111561323b57600080fd5b602086015b8481101561325e57613251816131e1565b8352918301918301613240565b509695505050505050565b60008060008060008060c0878903121561328257600080fd5b61328b87612ef9565b955060208088013595506040880135945060608801356001600160401b03808211156132b657600080fd5b818a0191508a601f8301126132ca57600080fd5b81356132d861319182613139565b81815260059190911b8301840190848101908d8311156132f757600080fd5b938501935b82851015613315578435825293850193908501906132fc565b9750505060808a013592508083111561332d57600080fd5b6133398b848c016131c1565b945060a08a013592508083111561334f57600080fd5b505061335d89828a016131f8565b9150509295509295509295565b60008060008060006080868803121561338257600080fd5b61338b86612ef9565b945061339960208701612ef9565b93506040860135925060608601356001600160401b038111156133bb57600080fd5b6133c788828901612f6b565b969995985093965092949392505050565b600080604083850312156133eb57600080fd5b6133f483612ef9565b915060208301356001600160401b0381111561340f57600080fd5b8301601f8101851361342057600080fd5b61342f85823560208401613183565b9150509250929050565b801515811461223157600080fd5b6000806040838503121561345a57600080fd5b82356134658161300c565b9150602083013561347581613439565b809150509250929050565b60006020828403121561349257600080fd5b81356001600160401b038111156134a857600080fd5b611d90848285016131c1565b6000602082840312156134c657600080fd5b6111a082612ef9565b60008060008060008060c087890312156134e857600080fd5b6134f187612ef9565b955060208701359450604087013593506060870135925060808701356001600160401b0381111561352157600080fd5b61352d89828a016131c1565b92505061353c60a088016131e1565b90509295509295509295565b6000806040838503121561355b57600080fd5b61356483612ef9565b9150612f3860208401612ef9565b600181811c9082168061358657607f821691505b6020821081036135a657634e487b7160e01b600052602260045260246000fd5b50919050565b6000602082840312156135be57600080fd5b81516111a08161300c565b60208082526018908201527f496e73756666696369656e74207472757374206c6576656c0000000000000000604082015260600190565b60008151808452602080850194506020840160005b8381101561363a5781516001600160a01b031687529582019590820190600101613615565b509495945050505050565b85815260a06020820152600061365e60a0830187613600565b6001600160a01b039586166040840152606083019490945250921660809092019190915292915050565b60006020828403121561369a57600080fd5b5051919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b601f8211156126b6576000816000526020600020601f850160051c810160208610156137005750805b601f850160051c820191505b81811015611bfd5782815560010161370c565b6001600160401b03831115613736576137366130f3565b61374a836137448354613572565b836136d7565b6000601f84116001811461377e57600085156137665750838201355b600019600387901b1c1916600186901b1783556137d8565b600083815260209020601f19861690835b828110156137af578685013582556020948501946001909201910161378f565b50868210156137cc5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600082601f8301126137f057600080fd5b81516137fe6131918261315c565b81815284602083860101111561381357600080fd5b611d90826020830160208701612e96565b6000806040838503121561383757600080fd5b8251915060208301516001600160401b0381111561385457600080fd5b61342f858286016137df565b60006020828403121561387257600080fd5b81516111a081613439565b60008151808452602080850194506020840160005b8381101561363a5781516001600160401b031687529582019590820190600101613892565b848152600060206080818401526138d16080840187613600565b60018060a01b038087166040860152848203606086015260e082018187511683528387015184840152604087015160408401526060870151915060e06060840152808251808352610100850191508584019350600092505b808310156139495783518252928501926001929092019190850190613929565b50608088015194508381036080850152613963818661387d565b945050505060a085015181830360a083015261397f8382612eba565b92505060c085015161399c60c08301826001600160a01b03169052565b5090979650505050505050565b86815260c0602082015260006139c260c0830188613600565b6001600160a01b039687166040840152949095166060820152608081019290925260a0909101529392505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610caf57610caf6139f0565b60008251613a2b818460208701612e96565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b80820180821115610caf57610caf6139f0565b600060208284031215613a7057600080fd5b81516001600160401b03811115613a8657600080fd5b611d90848285016137df565b634e487b7160e01b600052602160045260246000fdfe36fc7423c1d510db881ac4f5079886a3514ef5d12646d91185e86d6e6aac25dd360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ef22d80044cdee555e2d7dbbcd24698313699163545b9ab1cf38e18bcfc0c42a64736f6c63430008160033","name":"DSToken","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":false,"language":"solidity","evm_version":"paris","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts/interfaces/IERC1967.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts/interfaces/IERC20.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts/interfaces/draft-IERC1822.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts/proxy/beacon/IBeacon.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts/token/ERC20/IERC20.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts/utils/Address.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts/utils/Errors.sol","source_code":"// 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"},{"file_path":"@openzeppelin/contracts/utils/StorageSlot.sol","source_code":"// 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"},{"file_path":"contracts/compliance/IDSComplianceConfigurationService.sol","source_code":"/**\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"},{"file_path":"contracts/compliance/IDSComplianceService.sol","source_code":"/**\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"},{"file_path":"contracts/compliance/IDSLockManager.sol","source_code":"/**\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"},{"file_path":"contracts/compliance/IDSWalletManager.sol","source_code":"/**\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"},{"file_path":"contracts/data-stores/ServiceConsumerDataStore.sol","source_code":"/**\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"},{"file_path":"contracts/data-stores/TokenDataStore.sol","source_code":"/**\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"},{"file_path":"contracts/rebasing/ISecuritizeRebasingProvider.sol","source_code":"/**\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"},{"file_path":"contracts/rebasing/RebasingLibrary.sol","source_code":"/**\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}"},{"file_path":"contracts/registry/IDSRegistryService.sol","source_code":"/**\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"},{"file_path":"contracts/service/IDSServiceConsumer.sol","source_code":"/**\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"},{"file_path":"contracts/service/ServiceConsumer.sol","source_code":"/**\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"},{"file_path":"contracts/token/IDSToken.sol","source_code":"/**\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"},{"file_path":"contracts/token/StandardToken.sol","source_code":"/**\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"},{"file_path":"contracts/token/TokenLibrary.sol","source_code":"/**\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"},{"file_path":"contracts/trust/IDSTrustService.sol","source_code":"/**\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"},{"file_path":"contracts/utils/BaseDSContract.sol","source_code":"/**\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"},{"file_path":"contracts/utils/CommonUtils.sol","source_code":"/**\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"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"serviceId","type":"uint256"},{"indexed":false,"internalType":"address","name":"serviceAddress","type":"address"}],"name":"DSServiceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"valueLocked","type":"uint256"}],"name":"Issue","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"Seize","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"TxShares","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"}],"name":"WalletAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"}],"name":"WalletRemoved","type":"event"},{"inputs":[],"name":"COMPLIANCE_CONFIGURATION_SERVICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COMPLIANCE_SERVICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_ISSUER_MULTICALL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_OMNIBUS_TBE_CONTROLLER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_PARTITIONS_MANAGER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_SECURITIZE_SWAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_TA_MULTICALL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPRECATED_TOKEN_REALLOCATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DS_TOKEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_MANAGER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REBASING_PROVIDER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REGISTRY_SERVICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_EXCHANGE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_ISSUER","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_MASTER","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_NONE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_TRANSFER_AGENT","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_ISSUER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSACTION_RELAYER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRUST_SERVICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNUSED_1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WALLET_MANAGER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WALLET_REGISTRAR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"__BaseDSContract_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"__ServiceConsumer_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"__StandardToken_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_id","type":"string"}],"name":"balanceOfInvestor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_who","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"string","name":"_reason","type":"string"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serviceId","type":"uint256"}],"name":"getDSService","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getImplementationAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInitializedVersion","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getWalletAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"issueTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_issuanceTime","type":"uint256"},{"internalType":"uint256","name":"_valueLocked","type":"uint256"},{"internalType":"string","name":"_reason","type":"string"},{"internalType":"uint64","name":"_releaseTime","type":"uint64"}],"name":"issueTokensCustom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_issuanceTime","type":"uint256"},{"internalType":"uint256[]","name":"_valuesLocked","type":"uint256[]"},{"internalType":"string","name":"_reason","type":"string"},{"internalType":"uint64[]","name":"_releaseTimes","type":"uint64[]"}],"name":"issueTokensWithMultipleLocks","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"preTransferCheck","outputs":[{"internalType":"uint256","name":"code","type":"uint256"},{"internalType":"string","name":"reason","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"string","name":"_reason","type":"string"}],"name":"seize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serviceId","type":"uint256"},{"internalType":"address","name":"_address","type":"address"}],"name":"setDSService","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"featureIndex","type":"uint8"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"setFeature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"features","type":"uint256"}],"name":"setFeatures","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supportedFeatures","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalIssued","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"walletCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":null}