{"file_path":"contracts/MTokenMain.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.24;\n\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {AggregatorV3Interface} from \"@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol\";\nimport {MToken} from \"./MToken.sol\";\n\n// this contract will be deployed on Ethereum\ncontract MTokenMain is MToken {\n    using SafeCast for uint256;\n    using SafeCast for int256;\n\n    uint256 constant ORACLE_OFFLINE_THRESHOLD = 3 days;\n\n    event SetReserveFeedRequest(address oldAddr, address newAddr, uint64 et);\n    event SetReserveFeedEffected(address newAddr);\n    event SetFallbackFeedRequest(address oldAddr, address newAddr, uint64 et);\n    event SetFallbackFeedEffected(address newAddr);\n    event SetFeeCollectorRequest(address oldAddr, address newAddr, uint64 et);\n    event SetFeeCollectorEffected(address newAddr);\n    event ReconcileSupply(uint64 lastReconcileTime, uint64 thisReconcileTime, uint256 amount);\n    error TooEarlyToReconcile();\n    error MintBudgetNotZero();\n\n    error NotFeeCollector(address addr);\n    error ReserveNotEnough(int256 maxOzAmount, uint256 ozAmount);\n\n    modifier onlyFeeCollector() {\n        if (msg.sender != feeCollector) {\n            revert NotFeeCollector(msg.sender);\n        }\n        _;\n    }\n\n    function initialize(\n        string memory name,\n        string memory symbol,\n        address _owner,\n        address _operator,\n        address _reserveFeed,\n        uint64 _annualFeeRate,\n        uint64 _ozPerTokenBase,\n        address _feeCollector\n    ) public initializer {\n        __MTOKENMAIN_init(\n            name,\n            symbol,\n            _owner,\n            _operator,\n            _reserveFeed,\n            _annualFeeRate,\n            _ozPerTokenBase,\n            _feeCollector\n        );\n    }\n\n    function __MTOKENMAIN_init(\n        string memory name,\n        string memory symbol,\n        address _owner,\n        address _operator,\n        address _reserveFeed,\n        uint64 _annualFeeRate,\n        uint64 _ozPerTokenBase,\n        address _feeCollector\n    ) internal onlyInitializing {\n        __MTOKEN_init(\n            name,\n            symbol,\n            _owner,\n            _operator,\n            _annualFeeRate,\n            _ozPerTokenBase\n        );\n        reserveFeed = _reserveFeed;\n        feeCollector = _feeCollector;\n    }\n\n    function setReserveFeed(address addr) public onlyOwner {\n        _checkZeroAddress(addr);\n        uint64 et = etNextReserveFeed;\n        if (addr == nextReserveFeed && et != 0 && et < block.timestamp) {\n            reserveFeed = addr;\n            emit SetReserveFeedEffected(addr);\n        } else {\n            nextReserveFeed = addr;\n            etNextReserveFeed = uint64(block.timestamp) + delay;\n            emit SetReserveFeedRequest(reserveFeed, addr, etNextReserveFeed);\n        }\n    }\n\n    function setFallbackFeed(address addr) public onlyOwner {\n        _checkZeroAddress(addr);\n        uint64 et = etNextFallbackFeed;\n        if (addr == nextFallbackFeed && et != 0 && et < block.timestamp) {\n            fallbackFeed = addr;\n            emit SetFallbackFeedEffected(addr);\n        } else {\n            nextFallbackFeed = addr;\n            etNextFallbackFeed = uint64(block.timestamp) + delay;\n            emit SetFallbackFeedRequest(fallbackFeed, addr, etNextFallbackFeed);\n        }\n    }\n\n    function setFeeCollector(address addr) public onlyOwner {\n        _checkZeroAddress(addr);\n        uint64 et = etNextFeeCollector;\n        if (addr == nextFeeCollector && et != 0 && et < block.timestamp) {\n            feeCollector = addr;\n            emit SetFeeCollectorEffected(addr);\n        } else {\n            nextFeeCollector = addr;\n            etNextFeeCollector = uint64(block.timestamp) + delay;\n            emit SetFeeCollectorRequest(feeCollector, addr, etNextFeeCollector);\n        }\n    }\n\n    function revokeNextReserveFeed() public onlyRevoker {\n        etNextReserveFeed = 0;\n    }\n\n    function revokeNextFallbackFeed() public onlyRevoker {\n        etNextFallbackFeed = 0;\n    }\n\n    function revokeFeeCollector() public onlyRevoker {\n        etNextFeeCollector = 0;\n    }\n\n    function getReserve() private view returns (int256) {\n        // prettier-ignore\n        (\n            /*uint80 roundID*/,\n            int256 reserveFromFeed,\n            /*uint256 startedAt*/,\n            uint256 updatedAt,\n            /*uint80 answeredInRound*/\n        ) = AggregatorV3Interface(reserveFeed).latestRoundData();\n\n        if (updatedAt + ORACLE_OFFLINE_THRESHOLD < block.timestamp) {\n            // use fallback reserve feed\n            // note: fallback feed doesn't require strong timeliness guarantees\n            // hence doesn't use staleness check by design\n            (, reserveFromFeed, , , ) = AggregatorV3Interface(fallbackFeed)\n                .latestRoundData();\n        }\n\n        return reserveFromFeed;\n    }\n\n    function increaseMintBudget(uint112 mintBudgetDelta) public onlyOperator {\n        _increaseMintBudget(mintBudgetDelta);\n    }\n\n    function _increaseMintBudget(uint112 mintBudgetDelta) private {\n        uint112 newTokenObligation = totalTokenObligation + mintBudgetDelta;\n        uint256 ozAmount = (newTokenObligation * ozPerToken()) / OZ_RATIO_BASE;\n        int256 maxOzAmount = getReserve();\n        if (int256(ozAmount) > maxOzAmount) {\n            revert ReserveNotEnough(maxOzAmount, ozAmount);\n        }\n        mintBudget += mintBudgetDelta;\n        totalTokenObligation = newTokenObligation;\n    }\n\n    function decreaseMintBudget(uint112 mintBudgetDelta) public onlyOperator {\n        uint112 newTokenObligation = totalTokenObligation - mintBudgetDelta;\n        mintBudget -= mintBudgetDelta;\n        totalTokenObligation = newTokenObligation;\n    }\n\n    // mint fee tokens to the fee collector\n    function reconcileSupply(uint112 amount) public onlyFeeCollector {\n        _checkZeroValue(amount);\n        if (mintBudget > 0) {\n            revert MintBudgetNotZero();\n        }\n\n        // check and update lastReconcileTime\n        uint64 _lastReconcileTime = lastReconcileTime;\n        uint64 newReconcileTime = currentDayStartTime();\n        if (_lastReconcileTime == newReconcileTime) {\n            revert TooEarlyToReconcile();\n        }\n        lastReconcileTime = newReconcileTime;\n\n        _increaseMintBudget(amount);\n        mintBudget = mintBudget - amount;\n        _mint(feeCollector, amount); // mint fee tokens\n        emit ReconcileSupply(_lastReconcileTime, newReconcileTime, amount);\n    }\n}\n","deployed_bytecode":"0x6080604052600436106105e15760003560e01c80637ecebe0011610301578063b3ab15fb1161019a578063d505accf116100ec578063ea6c077111610095578063f733140e1161006f578063f733140e1461118f578063f8e3fc32146111af578063fbac3951146111d657600080fd5b8063ea6c077114611128578063f2fde38b1461114f578063f6ec1c4d1461116f57600080fd5b8063de9dc8ef116100c6578063de9dc8ef146110cc578063e1420eb2146110e1578063e3dc4dbd1461110857600080fd5b8063d505accf14611027578063d5a5f07214611047578063dd62ed3e1461106757600080fd5b8063c415b95c1161014e578063d017abed11610128578063d017abed14610fb3578063d3c3bbd014610fd3578063d4ecba4f14610ffa57600080fd5b8063c415b95c14610f59578063c62f173f14610f79578063cc9df18414610f9957600080fd5b8063c0c3ee1f1161017f578063c0c3ee1f14610ef9578063c107330214610f19578063c317e8a614610f3957600080fd5b8063b3ab15fb14610eb2578063b776197514610ed257600080fd5b8063969ce7e511610253578063a86b06e511610207578063ad3cb1cc116101e1578063ad3cb1cc14610e2d578063ae8bd78414610e76578063b280e6a614610e9d57600080fd5b8063a86b06e514610dcd578063a9059cbb14610ded578063ad0d70db14610e0d57600080fd5b8063a2ae87fa11610238578063a2ae87fa14610d6d578063a40f281214610d8d578063a42dce8014610dad57600080fd5b8063969ce7e514610d38578063a0941d0c14610d5857600080fd5b80638c255893116102b5578063950e61c61161028f578063950e61c614610cdc57806395d89b4114610cfc578063963f77ca14610d1157600080fd5b80638c25589314610c5f5780638da5cb5b14610c7f5780639083dd9d14610cbc57600080fd5b806382641e7f116102e657806382641e7f14610bf057806384b0196e14610c105780638781352d14610c3857600080fd5b80637ecebe0014610bb05780637f2bbc0e14610bd057600080fd5b80633ab81ecd1161047e57806359ed0813116103d05780636c4a4cc41161037957806373b16bc71161035357806373b16bc714610b665780637478015c14610b7b5780637d33991214610b9b57600080fd5b80636c4a4cc414610b1c57806370a0823114610b31578063715018a614610b5157600080fd5b806366285967116103aa5780636628596714610ac05780636a42b8f814610ae05780636ab8fc1814610b0757600080fd5b806359ed081314610a605780635deff1bb14610a805780636271cf1814610aa057600080fd5b80634a506553116104325780634f8b45b41161040c5780634f8b45b414610a0b57806352d1902d14610a2b578063570ca73514610a4057600080fd5b80634a506553146109b15780634e1e38e9146109d15780634f1ef286146109f857600080fd5b80633cb747bf116104635780633cb747bf1461095c5780633cbae7771461097c5780633e8b10ff1461099c57600080fd5b80633ab81ecd1461091c5780633c7c9b901461093c57600080fd5b8063225cc29d1161053757806331c3fa8a116104eb57806335251eae116104c557806335251eae146108c057806335dec5d1146108e75780633644e5151461090757600080fd5b806331c3fa8a1461084c578063323ec0b81461086157806332f27584146108a057600080fd5b8063292c21c91161051c578063292c21c9146107f05780632b0e8cd714610810578063313ce5671461083057600080fd5b8063225cc29d146107b057806323b872dd146107d057600080fd5b806311857106116105995780631a14f449116105735780631a14f4491461074e5780631a3b0503146107705780631e89d5451461079057600080fd5b806311857106146106da578063149668e0146106fa57806318160ddd1461071a57600080fd5b806309ff18f0116105ca57806309ff18f0146106415780630f27b9d21461067957806311532e77146106b657600080fd5b806306fdde03146105e6578063095ea7b314610611575b600080fd5b3480156105f257600080fd5b506105fb611206565b6040516106089190614bdc565b60405180910390f35b34801561061d57600080fd5b5061063161062c366004614c0b565b6112c1565b6040519015158152602001610608565b34801561064d57600080fd5b50600054610661906001600160a01b031681565b6040516001600160a01b039091168152602001610608565b34801561068557600080fd5b50600c5461069e9061010090046001600160701b031681565b6040516001600160701b039091168152602001610608565b3480156106c257600080fd5b506106cc60015481565b604051908152602001610608565b3480156106e657600080fd5b50600d54610661906001600160a01b031681565b34801561070657600080fd5b50600f54610661906001600160a01b031681565b34801561072657600080fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02546106cc565b34801561075a57600080fd5b5061076e610769366004614c35565b6112db565b005b34801561077c57600080fd5b5061076e61078b366004614c65565b61132d565b34801561079c57600080fd5b5061076e6107ab366004614ccd565b6113c7565b3480156107bc57600080fd5b5061076e6107cb366004614d79565b611463565b3480156107dc57600080fd5b506106316107eb366004614e13565b6114d2565b3480156107fc57600080fd5b50601254610661906001600160a01b031681565b34801561081c57600080fd5b5061076e61082b366004614c35565b611524565b34801561083c57600080fd5b5060405160098152602001610608565b34801561085857600080fd5b5061076e611696565b34801561086d57600080fd5b50600e5461088890600160a01b90046001600160401b031681565b6040516001600160401b039091168152602001610608565b3480156108ac57600080fd5b50601054610661906001600160a01b031681565b3480156108cc57600080fd5b5060135461088890600160401b90046001600160401b031681565b3480156108f357600080fd5b50600654610661906001600160a01b031681565b34801561091357600080fd5b506106cc6116de565b34801561092857600080fd5b5061076e610937366004614c35565b6116ed565b34801561094857600080fd5b5061076e610957366004614c35565b611853565b34801561096857600080fd5b50600854610661906001600160a01b031681565b34801561098857600080fd5b5061076e610997366004614e4f565b6118a8565b3480156109a857600080fd5b5061076e6118c3565b3480156109bd57600080fd5b5061076e6109cc366004614f34565b611906565b3480156109dd57600080fd5b5060135461088890600160801b90046001600160401b031681565b61076e610a06366004614f34565b6119ac565b348015610a1757600080fd5b506105fb610a26366004614f81565b611aa3565b348015610a3757600080fd5b506106cc611b7f565b348015610a4c57600080fd5b50600454610661906001600160a01b031681565b348015610a6c57600080fd5b5061076e610a7b366004614fda565b611bae565b348015610a8c57600080fd5b5061076e610a9b36600461500a565b611c16565b348015610aac57600080fd5b50601354610888906001600160401b031681565b348015610acc57600080fd5b5061076e610adb366004614c35565b611cfe565b348015610aec57600080fd5b5060025461088890600160b01b90046001600160401b031681565b348015610b1357600080fd5b5061076e611e61565b348015610b2857600080fd5b5061076e611e7f565b348015610b3d57600080fd5b506106cc610b4c366004614c35565b611ec2565b348015610b5d57600080fd5b5061076e611f07565b348015610b7257600080fd5b50610888611f1b565b348015610b8757600080fd5b50600354610888906001600160401b031681565b348015610ba757600080fd5b5061076e611fa7565b348015610bbc57600080fd5b506106cc610bcb366004614c35565b611fea565b348015610bdc57600080fd5b506105fb610beb366004614c65565b611ff5565b348015610bfc57600080fd5b50600754610661906001600160a01b031681565b348015610c1c57600080fd5b50610c25612054565b6040516106089796959493929190615025565b348015610c4457600080fd5b5060055461088890600160a01b90046001600160401b031681565b348015610c6b57600080fd5b5061076e610c7a366004614c65565b612150565b348015610c8b57600080fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316610661565b348015610cc857600080fd5b5061076e610cd7366004614c35565b612165565b348015610ce857600080fd5b50600254610888906001600160401b031681565b348015610d0857600080fd5b506105fb6122c8565b348015610d1d57600080fd5b5060025461069e90600160401b90046001600160701b031681565b348015610d4457600080fd5b50610631610d533660046150da565b612319565b348015610d6457600080fd5b5061076e6124d7565b348015610d7957600080fd5b506105fb610d88366004614c65565b612517565b348015610d9957600080fd5b506106cc610da8366004614fda565b612600565b348015610db957600080fd5b5061076e610dc8366004614c35565b61262c565b348015610dd957600080fd5b50600554610661906001600160a01b031681565b348015610df957600080fd5b50610631610e08366004614c0b565b612792565b348015610e1957600080fd5b5061076e610e28366004615120565b6127d0565b348015610e3957600080fd5b506105fb6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b348015610e8257600080fd5b5060035461088890600160401b90046001600160401b031681565b348015610ea957600080fd5b5061076e6128fb565b348015610ebe57600080fd5b5061076e610ecd366004614c35565b612943565b348015610ede57600080fd5b5060125461088890600160a01b90046001600160401b031681565b348015610f0557600080fd5b5061076e610f14366004614c65565b612aa6565b348015610f2557600080fd5b5061076e610f3436600461500a565b612c95565b348015610f4557600080fd5b50600e54610661906001600160a01b031681565b348015610f6557600080fd5b50601154610661906001600160a01b031681565b348015610f8557600080fd5b50600954610661906001600160a01b031681565b348015610fa557600080fd5b50600c546106319060ff1681565b348015610fbf57600080fd5b506105fb610fce366004614f81565b612e84565b348015610fdf57600080fd5b5060075461088890600160a01b90046001600160401b031681565b34801561100657600080fd5b506106cc611015366004614fda565b600a6020526000908152604090205481565b34801561103357600080fd5b5061076e6110423660046151e7565b612f39565b34801561105357600080fd5b5061076e611062366004614c65565b6130c4565b34801561107357600080fd5b506106cc61108236600461525a565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b3480156110d857600080fd5b5061076e613161565b3480156110ed57600080fd5b5060105461088890600160a01b90046001600160401b031681565b34801561111457600080fd5b5061076e61112336600461528d565b6131a4565b34801561113457600080fd5b5060135461088890600160c01b90046001600160401b031681565b34801561115b57600080fd5b5061076e61116a366004614c35565b613267565b34801561117b57600080fd5b5061076e61118a3660046152fb565b6132bb565b34801561119b57600080fd5b5061076e6111aa366004614c65565b61335d565b3480156111bb57600080fd5b5060095461088890600160a01b90046001600160401b031681565b3480156111e257600080fd5b506106316111f1366004614c35565b600b6020526000908152604090205460ff1681565b606060007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b905080600301805461123d9061533c565b80601f01602080910402602001604051908101604052809291908181526020018280546112699061533c565b80156112b65780601f1061128b576101008083540402835291602001916112b6565b820191906000526020600020905b81548152906001019060200180831161129957829003601f168201915b505050505091505090565b6000336112cf818585613410565b60019150505b92915050565b6112e43361341d565b6001600160a01b0381166000818152600b6020526040808220805460ff19169055517f665918c9e02eb2fd85acca3969cb054fc84c138e60ec4af22ab6ef2fd4c93c279190a250565b6113363361341d565b80600260088282829054906101000a90046001600160701b031661135a9190615386565b92506101000a8154816001600160701b0302191690836001600160701b031602179055507f0dfdae44e38b14db1ba2cb6d7dd04721390e20f97c58e268c486d50a4e51f82f816040516113bc91906001600160701b0391909116815260200190565b60405180910390a150565b828114611400576040517fe551559700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8381101561145c57611453858583818110611420576114206153ad565b90506020020160208101906114359190614c35565b848484818110611447576114476153ad565b90506020020135612792565b50600101611403565b5050505050565b61146b61346f565b6114768787876134e3565b856001600160a01b0316876001600160a01b03167f3b04dd355b44edafaa51d8ee50f4f765b172f2d813a2d7f4d2b6d19f594d0a2e87878787876040516114c19594939291906153ec565b60405180910390a350505050505050565b60006114dd33613542565b306001600160a01b0384160361150657604051630e927f5760e21b815260040160405180910390fd5b61150f84613542565b61151a8484846135a0565b90505b9392505050565b61152c61346f565b611535816135c4565b600e546001600160401b03600160a01b820416906001600160a01b03838116911614801561156b57506001600160401b03811615155b801561157f575042816001600160401b0316105b156115da57600d80546001600160a01b0319166001600160a01b0384169081179091556040519081527f9261c972b118688a0095ed3c9ee6adde042135daad66552cbbf4f791f0404310906020015b60405180910390a15050565b600e80546001600160a01b0319166001600160a01b03841617905560025461161290600160b01b90046001600160401b031642615425565b600e805467ffffffffffffffff60a01b1916600160a01b6001600160401b0393841681029190911791829055600d54604080516001600160a01b039283168152918716602083015291909204909216918101919091527f52c09340cecfbd9b6c1b3072df4b3989e60ff5e7711bd50b82ce82676cf87591906060016115ce565b5050565b6006546001600160a01b031633146116c857604051635a4c7a3b60e01b81523360048201526024015b60405180910390fd5b6005805467ffffffffffffffff60a01b19169055565b60006116e8613604565b905090565b6116f561346f565b6116fe816135c4565b6010546001600160401b03600160a01b820416906001600160a01b03838116911614801561173457506001600160401b03811615155b8015611748575042816001600160401b0316105b1561179b57600f80546001600160a01b0319166001600160a01b0384169081179091556040519081527f6dc054adf0e5a4eafbfa2c23923b60465f2cf24389ace30184f2e252977336ff906020016115ce565b601080546001600160a01b0319166001600160a01b0384161790556002546117d390600160b01b90046001600160401b031642615425565b6010805467ffffffffffffffff60a01b1916600160a01b6001600160401b0393841681029190911791829055600f54604080516001600160a01b039283168152918716602083015291909204909216918101919091527fe52eca438bb1ef7edd7a1f80eb7b672f2e258eca1d5f5ca4dada59dde83e3ce5906060016115ce565b61185c3361341d565b6001600160a01b0381166000818152600b6020526040808220805460ff19166001179055517f406bbf2d8d145125adf1198d2cf8a67c66cc4bb0ab01c37dccd4f7c0aae1e7c79190a250565b6118b061346f565b600c805460ff1916911515919091179055565b6006546001600160a01b031633146118f057604051635a4c7a3b60e01b81523360048201526024016116bf565b6009805467ffffffffffffffff60a01b19169055565b61190e61346f565b611917826135c4565b600080546001600160a01b0319166001600160a01b03841617905580516020820120600155600254600160b01b90046001600160401b03166119599042615425565b6002805467ffffffffffffffff19166001600160401b03929092169190911790556040517fcc54b42f78b332711d2d2b40bd7edb325a1fef0124753b0689728b7209ca1e2e906115ce9084908490615445565b6119b461360e565b6000546001600160a01b038381169116146119fb576040517f9ab1811500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001548151602083012014611a3c576040517fefac8be100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160401b0316801580611a5d575042816001600160401b0316115b15611a94576040517f260343ea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a9e83836136c5565b505050565b6008546060906001600160a01b03163314611ad35760405163ca46148560e01b81523360048201526024016116bf565b600c5460ff1615611b10576040517fb73765ef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b19826136e0565b611b23858361371a565b846001600160a01b03167fa991fe95027fe8f10de89078c1c26def80922af31f4bc9fb2e50b5646fe96a10858585604051611b6093929190615467565b60405180910390a2611b7485858585612e84565b90505b949350505050565b6000611b89613750565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6006546001600160a01b03163314611bdb57604051635a4c7a3b60e01b81523360048201526024016116bf565b6000818152600a60205260408082208290555182917f806dc0290fcdd417bbb174a9f100caca0a3a138dde7f3031430dbf5f80cd51d791a250565b611c1e61346f565b611c2781613799565b6000611c31611f1b565b90506000611c3d6137f3565b601380546fffffffffffffffffffffffffffffffff16600160801b6001600160401b0387811691820277ffffffffffffffffffffffffffffffffffffffffffffffff1692909217600160c01b878416908102919091176fffffffffffffffff00000000000000001916600160401b93861693840217909355604080519182526020820193909352918201529091507f4cf9028c56d37c0bff94ef9db435e32721af26676734c73ba7213ddad3e13d84906060015b60405180910390a1505050565b611d0661346f565b611d0f816135c4565b6009546001600160401b03600160a01b820416906001600160a01b038381169116148015611d4557506001600160401b03811615155b8015611d59575042816001600160401b0316105b15611dac57600880546001600160a01b0319166001600160a01b0384169081179091556040519081527f1eff1dd5ff557eb8ff50923c367fb979543603db3362ae01bd1fa5a15d4b39f7906020016115ce565b600980546001600160a01b0319166001600160a01b038416179055600254600090611de790600160b01b90046001600160401b031642615425565b6009805467ffffffffffffffff60a01b1916600160a01b6001600160401b03841690810291909117909155600854604080516001600160a01b03928316815291871660208301528101919091529091507fb1fcccee531f2873810d3aa626cb3577d8e80b1e0f3136f75ff2daf63e55737490606001611cf1565b611e6961346f565b6007805467ffffffffffffffff60a01b19169055565b6006546001600160a01b03163314611eac57604051635a4c7a3b60e01b81523360048201526024016116bf565b6012805467ffffffffffffffff60a01b19169055565b6000807f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b6001600160a01b0390931660009081526020939093525050604090205490565b611f0f61346f565b611f196000613817565b565b60008062015180601360089054906101000a90046001600160401b0316611f4142613888565b611f4b919061548b565b611f5591906154c1565b60135490915061016d90611f7a908390600160801b90046001600160401b03166154e7565b611f8491906154c1565b601354611fa19190600160c01b90046001600160401b031661548b565b91505090565b6006546001600160a01b03163314611fd457604051635a4c7a3b60e01b81523360048201526024016116bf565b600e805467ffffffffffffffff60a01b19169055565b60006112d5826138c2565b6060612009826001600160701b03166138eb565b604080516001600160701b03841660208201526003910160408051601f198184030181529082905261203e9291602001615512565b6040516020818303038152906040529050919050565b600060608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561209357506001810154155b6120f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064016116bf565b612101613953565b6121096139a4565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6121593361341d565b612162816139ce565b50565b61216d61346f565b612176816135c4565b6007546001600160401b03600160a01b820416906001600160a01b0383811691161480156121ac57506001600160401b03811615155b80156121c0575042816001600160401b0316105b1561221357600680546001600160a01b0319166001600160a01b0384169081179091556040519081527fc1f235bba1c838187a7f50f73c2940cd988836882c74b7dfc478d28a37d79d58906020016115ce565b600780546001600160a01b0319166001600160a01b03841617905560025460009061224e90600160b01b90046001600160401b031642615425565b6007805467ffffffffffffffff60a01b1916600160a01b6001600160401b03841690810291909117909155600654604080516001600160a01b03928316815291871660208301528101919091529091507f8a674bc274bfa5b54e4ea4c4831280b18b2ccbb2aadfc7075f9cec0eecd0fb6490606001611cf1565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace009161123d9061533c565b60006123243361341d565b61232d82613aeb565b604080516001600160a01b03871660208201529081018590526060810184905260009060800160408051601f1981840301815291815281516020928301206000818152600a9093529082205490925090819003612403576002546123a190600160b01b90046001600160401b03164261552b565b6000838152600a60209081526040918290209290925580518881529182018790526001600160a01b038916917f5b5758388c63ddbb027c1c831a65b27d9c8f0cb94b3d4452b9061e541a7a14b3910160405180910390a2600092505050611b77565b4281101561241f576000828152600a602052604081205561246a565b6040517f8cb39b490000000000000000000000000000000000000000000000000000000081526001600160a01b038816600482015260248101879052604481018690526064016116bf565b612473866138eb565b60025461249a90612495908890600160401b90046001600160701b031661553e565b613b55565b600260086101000a8154816001600160701b0302191690836001600160701b031602179055506124ca8787613b89565b5060019695505050505050565b6006546001600160a01b0316331461250457604051635a4c7a3b60e01b81523360048201526024016116bf565b6002805467ffffffffffffffff19169055565b6008546060906001600160a01b031633146125475760405163ca46148560e01b81523360048201526024016116bf565b6125503261341d565b612562826001600160701b03166136e0565b61256b82611ff5565b905081600260088282829054906101000a90046001600160701b03166125919190615551565b92506101000a8154816001600160701b0302191690836001600160701b031602179055507fae1020cbcb1cc75501477d72d538582a5e4db035ee16ffce5c13c67115b081aa826040516125f391906001600160701b0391909116815260200190565b60405180910390a1919050565b6000633b9aca0061260f611f1b565b612622906001600160401b031684615571565b6112d59190615588565b61263461346f565b61263d816135c4565b6012546001600160401b03600160a01b820416906001600160a01b03838116911614801561267357506001600160401b03811615155b8015612687575042816001600160401b0316105b156126da57601180546001600160a01b0319166001600160a01b0384169081179091556040519081527f3f71a3f22985ad24f13299a7e2c1c88b2dc5a668adbd2e2756bfa64c2ae0edf1906020016115ce565b601280546001600160a01b0319166001600160a01b03841617905560025461271290600160b01b90046001600160401b031642615425565b6012805467ffffffffffffffff60a01b1916600160a01b6001600160401b0393841681029190911791829055601154604080516001600160a01b039283168152918716602083015291909204909216918101919091527f7aaca0e9970719843de28babab2214cdae6a08db1c4031702ce597b669874741906060016115ce565b600061279d33613542565b306001600160a01b038416036127c657604051630e927f5760e21b815260040160405180910390fd5b61151d8383613bbf565b60006127da613bcd565b805490915060ff600160401b82041615906001600160401b03166000811580156128015750825b90506000826001600160401b0316600114801561281d5750303b155b90508115801561282b575080155b15612862576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561289157845468ff00000000000000001916600160401b1785555b6128a18d8d8d8d8d8d8d8d613bf6565b83156128ec57845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050505050565b6006546001600160a01b0316331461292857604051635a4c7a3b60e01b81523360048201526024016116bf565b600380546fffffffffffffffff000000000000000019169055565b61294b61346f565b612954816135c4565b6005546001600160401b03600160a01b820416906001600160a01b03838116911614801561298a57506001600160401b03811615155b801561299e575042816001600160401b0316105b156129f157600480546001600160a01b0319166001600160a01b0384169081179091556040519081527f1fac8e1a48aa1912f53ebcb6e8d81f4f8cdf744982c7aa4aaf0152a30c02696e906020016115ce565b600580546001600160a01b0319166001600160a01b038416179055600254600090612a2c90600160b01b90046001600160401b031642615425565b6005805467ffffffffffffffff60a01b1916600160a01b6001600160401b03841690810291909117909155600454604080516001600160a01b03928316815291871660208301528101919091529091507f12b711c994caeaba10a597eb355ca2db4a74639902e3d300f9370caee0da4b0b90606001611cf1565b6011546001600160a01b03163314612aec576040517f0205ca990000000000000000000000000000000000000000000000000000000081523360048201526024016116bf565b612afe816001600160701b03166136e0565b600254600160401b90046001600160701b031615612b48576040517f4ed115a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6013546001600160401b03166000612b5e6137f3565b9050806001600160401b0316826001600160401b031603612bab576040517fbc7facfc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6013805467ffffffffffffffff19166001600160401b038316179055612bd0836139ce565b600254612bee908490600160401b90046001600160701b0316615551565b600280547fffffffffffffffffffff0000000000000000000000000000ffffffffffffffff16600160401b6001600160701b0393841602179055601154612c42916001600160a01b03909116908516613b89565b604080516001600160401b038085168252831660208201526001600160701b038516918101919091527f404f32d1a28715a46df96742ecab9ac59538f55305a4341e2d3ac21cb27109fa90606001611cf1565b612c9d61346f565b610e106001600160401b0382161015612ce2576040517fed75f3c200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6202a3006001600160401b0382161115612d28576040517f1bc4dde000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546001600160401b03600160401b82048116918382169116148015612d5757506001600160401b03811615155b8015612d6b575042816001600160401b0316105b15612ddf57600280547fffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffff16600160b01b6001600160401b038516908102919091179091556040519081527f0ed594aee59a2d00c8a1183779743ed2c0f8e413f761a48b181a72cb86e1a05a906020016115ce565b600254600160b01b90046001600160401b03166000612dfe8242615425565b600380546001600160401b038781166fffffffffffffffffffffffffffffffff199092168217600160401b858316908102919091179093556040805191871682526020820192909252908101919091529091507f8189ce093e30309b5e2dffeabdf7adf977853585d6b56995e8c8098342f6546f9060600160405180910390a150505050565b6060612e8f85613542565b6014839003612eb4576000612ea4848661559c565b60601c9050612eb281613542565b505b60408051606087901b6bffffffffffffffffffffffff191660208201528151601481830301815260348201909252600090612ef99083908890889088906054016155cf565b6040516020818303038152906040529050600281604051602001612f1e929190615512565b60405160208183030381529060405292505050949350505050565b83421115612f76576040517f62791302000000000000000000000000000000000000000000000000000000008152600481018590526024016116bf565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888612fe28c6001600160a01b031660009081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061303d82613c41565b9050600061304d82878787613c89565b9050896001600160a01b0316816001600160a01b0316146130ad576040517f4b800e460000000000000000000000000000000000000000000000000000000081526001600160a01b0380831660048301528b1660248201526044016116bf565b6130b88a8a8a613410565b50505050505050505050565b6130cd3361341d565b600c546000906130ec90839061010090046001600160701b0316615551565b905081600260088282829054906101000a90046001600160701b03166131129190615551565b92506101000a8154816001600160701b0302191690836001600160701b0316021790555080600c60016101000a8154816001600160701b0302191690836001600160701b031602179055505050565b6006546001600160a01b0316331461318e57604051635a4c7a3b60e01b81523360048201526024016116bf565b6010805467ffffffffffffffff60a01b19169055565b6131ad3361341d565b6131b683613aeb565b6004546131cc906001600160a01b03168661371a565b836001600160a01b03167faa42d7f17938b1f871b578d29e9906d689168f23d73e6f3d6ebfae27bb65215986848460405161320993929190615607565b60405180910390a261321a85613b55565b6002805460089061323c908490600160401b90046001600160701b0316615386565b92506101000a8154816001600160701b0302191690836001600160701b031602179055505050505050565b61326f61346f565b6001600160a01b0381166132b2576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024016116bf565b61216281613817565b6008546001600160a01b031633146132e85760405163ca46148560e01b81523360048201526024016116bf565b6000806132f783850185615621565b91509150600282036133115761330c81613cb7565b613357565b600382036133225761330c81613d7a565b6040517f0c46eb14000000000000000000000000000000000000000000000000000000008152600481018390526024016116bf565b50505050565b6133663361341d565b613378816001600160701b03166136e0565b61338a816001600160701b03166138eb565b80600260088282829054906101000a90046001600160701b03166133ae9190615551565b92506101000a8154816001600160701b0302191690836001600160701b031602179055507fe7e49ae780d4f45ca4e569062295752e6c55465477a5124eddc65c41414756e3816040516113bc91906001600160701b0391909116815260200190565b611a9e8383836001613e18565b6004546001600160a01b03828116911614612162576040517f76c6c93a0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016116bf565b336134a17f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614611f19576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016116bf565b6001600160a01b03831661350d57604051634b637e8f60e11b8152600060048201526024016116bf565b6001600160a01b0382166135375760405163ec442f0560e01b8152600060048201526024016116bf565b611a9e838383613f43565b6001600160a01b0381166000908152600b602052604090205460ff1615612162576040517f863248950000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016116bf565b6000336135ae8582856140ac565b6135b98585856134e3565b506001949350505050565b6001600160a01b038116612162576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006116e861415d565b306001600160a01b037f0000000000000000000000005e072c6689610c66e49a3067a4b488b4e27bc7441614806136a757507f0000000000000000000000005e072c6689610c66e49a3067a4b488b4e27bc7446001600160a01b031661369b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b15611f195760405163703e46dd60e11b815260040160405180910390fd5b6136cd61360e565b6136d6826141d1565b61169282826141d9565b80600003612162576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821661374457604051634b637e8f60e11b8152600060048201526024016116bf565b61169282600083613f43565b306001600160a01b037f0000000000000000000000005e072c6689610c66e49a3067a4b488b4e27bc7441614611f195760405163703e46dd60e11b815260040160405180910390fd5b6137a8600a633b9aca006154c1565b6001600160401b0316816001600160401b03161115612162576040517f1c2daa9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000620151808061380342613888565b61380d91906154c1565b6116e891906154e7565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60006001600160401b038211156138be57604080516306dfcc6560e41b81526004810191909152602481018390526044016116bf565b5090565b6000807f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00611ee7565b600254600160401b90046001600160701b0316811115612162576002546040517f75f28f1d000000000000000000000000000000000000000000000000000000008152600160401b9091046001600160701b03166004820152602481018290526044016116bf565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1009161123d9061533c565b606060007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10061122c565b600c546000906139ed90839061010090046001600160701b0316615386565b90506000633b9aca006139fe611f1b565b613a11906001600160401b031684615651565b613a1b9190615674565b6001600160701b031690506000613a306142c1565b905080821315613a76576040517f059378c200000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016116bf565b83600260088282829054906101000a90046001600160701b0316613a9a9190615386565b92506101000a8154816001600160701b0302191690836001600160701b0316021790555082600c60016101000a8154816001600160701b0302191690836001600160701b0316021790555050505050565b6000613af5611f1b565b9050806001600160401b0316826001600160401b031614611692576040517f338c5e1c0000000000000000000000000000000000000000000000000000000081526001600160401b038084166004830152821660248201526044016116bf565b60006001600160701b038211156138be576040516306dfcc6560e41b815260706004820152602481018390526044016116bf565b6001600160a01b038216613bb35760405163ec442f0560e01b8152600060048201526024016116bf565b61169260008383613f43565b6000336112cf8185856134e3565b6000807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a006112d5565b613bfe6143df565b613c0c88888888878761441d565b600d80546001600160a01b039586166001600160a01b0319918216179091556011805492909516911617909255505050505050565b60006112d5613c4e613604565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b600080600080613c9b88888888614454565b925092509250613cab8282614523565b50909695505050505050565b600080600083806020019051810190613cd091906156d3565b9250925092508151601414613d165781516040517f99cc9be00000000000000000000000000000000000000000000000000000000081526004016116bf91815260200190565b6000613d218361573f565b60601c9050613d308183613b89565b806001600160a01b03167f7526cb9032fb1c30951e05f1ac3006e8a7f76f1dfe225b64d7aabab0b27ed3618584604051613d6b92919061577b565b60405180910390a25050505050565b600081806020019051810190613d90919061579d565b905080600260088282829054906101000a90046001600160701b0316613db69190615386565b92506101000a8154816001600160701b0302191690836001600160701b031602179055507f0777cf903e54435115c01edfd1a21759c8a36b3db942df3f306a944922797755816040516115ce91906001600160701b0391909116815260200190565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b038516613e7c576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016116bf565b6001600160a01b038416613ebf576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016116bf565b6001600160a01b0380861660009081526001830160209081526040808320938816835292905220839055811561145c57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051613f3491815260200190565b60405180910390a35050505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b038416613f915781816002016000828254613f86919061552b565b9091555061401c9050565b6001600160a01b03841660009081526020829052604090205482811015613ffd576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b038616600482015260248101829052604481018490526064016116bf565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b03831661403a576002810180548390039055614059565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161409e91815260200190565b60405180910390a350505050565b6001600160a01b0383811660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093861683529290522054600019811015613357578181101561414e576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064016116bf565b61335784848484036000613e18565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f614188614627565b6141906146a3565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61216261346f565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015614233575060408051601f3d908101601f19168201909252614230918101906157ba565b60015b61425b57604051634c9c8ce360e01b81526001600160a01b03831660048201526024016116bf565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146142b7576040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600481018290526024016116bf565b611a9e83836146f9565b6000806000600d60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015614319573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061433d91906157ed565b50935050925050426203f48082614354919061552b565b10156143d957600f60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156143ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143d191906157ed565b509194505050505b50919050565b6143e761474f565b611f19576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6144256143df565b61442f8686614769565b6144388561477b565b614441846147c2565b61444c8383836147d3565b505050505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561448f5750600091506003905082614519565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156144e3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661450f57506000925060019150829050614519565b9250600091508190505b9450945094915050565b60008260038111156145375761453761583d565b03614540575050565b60018260038111156145545761455461583d565b0361458b576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111561459f5761459f61583d565b036145d9576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016116bf565b60038260038111156145ed576145ed61583d565b03611692576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016116bf565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614653613953565b80519091501561466b57805160209091012092915050565b8154801561467a579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816146cf6139a4565b8051909150156146e757805160209091012092915050565b6001820154801561467a579392505050565b614702826148d3565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561474757611a9e828261494a565b6116926149c0565b6000614759613bcd565b54600160401b900460ff16919050565b6147716143df565b61169282826149f8565b6147836143df565b612162816040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250614a5b565b6147ca6143df565b61216281614ace565b6147db6143df565b600480546001600160a01b0319166001600160a01b0385161790556147ff82613799565b633b9aca006001600160401b0382161115614846576040517f220bea5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006148506137f3565b601380546001600160401b03948516600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff968616600160801b02969096166fffffffffffffffffffffffffffffffff600160401b969094169586026fffffffffffffffffffffffffffffffff199092169095171791909116929092179290921790555050565b806001600160a01b03163b60000361490957604051634c9c8ce360e01b81526001600160a01b03821660048201526024016116bf565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516149679190615853565b600060405180830381855af49150503d80600081146149a2576040519150601f19603f3d011682016040523d82523d6000602084013e6149a7565b606091505b50915091506149b7858383614ad6565b95945050505050565b3415611f19576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b614a006143df565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03614a4c84826158b7565b506004810161335783826158b7565b614a636143df565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102614aaf84826158b7565b5060038101614abe83826158b7565b5060008082556001909101555050565b61326f6143df565b606082614aeb57614ae682614b4b565b61151d565b8151158015614b0257506001600160a01b0384163b155b15614b44576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016116bf565b508061151d565b805115614b5a57805160208201fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b83811015614ba7578181015183820152602001614b8f565b50506000910152565b60008151808452614bc8816020860160208601614b8c565b601f01601f19169290920160200192915050565b60208152600061151d6020830184614bb0565b80356001600160a01b0381168114614c0657600080fd5b919050565b60008060408385031215614c1e57600080fd5b614c2783614bef565b946020939093013593505050565b600060208284031215614c4757600080fd5b61151d82614bef565b6001600160701b038116811461216257600080fd5b600060208284031215614c7757600080fd5b813561151d81614c50565b60008083601f840112614c9457600080fd5b5081356001600160401b03811115614cab57600080fd5b6020830191508360208260051b8501011115614cc657600080fd5b9250929050565b60008060008060408587031215614ce357600080fd5b84356001600160401b0380821115614cfa57600080fd5b614d0688838901614c82565b90965094506020870135915080821115614d1f57600080fd5b50614d2c87828801614c82565b95989497509550505050565b60008083601f840112614d4a57600080fd5b5081356001600160401b03811115614d6157600080fd5b602083019150836020828501011115614cc657600080fd5b600080600080600080600060a0888a031215614d9457600080fd5b614d9d88614bef565b9650614dab60208901614bef565b95506040880135945060608801356001600160401b0380821115614dce57600080fd5b614dda8b838c01614d38565b909650945060808a0135915080821115614df357600080fd5b50614e008a828b01614d38565b989b979a50959850939692959293505050565b600080600060608486031215614e2857600080fd5b614e3184614bef565b9250614e3f60208501614bef565b9150604084013590509250925092565b600060208284031215614e6157600080fd5b8135801515811461151d57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614eaf57614eaf614e71565b604052919050565b60006001600160401b03821115614ed057614ed0614e71565b50601f01601f191660200190565b600082601f830112614eef57600080fd5b8135614f02614efd82614eb7565b614e87565b818152846020838601011115614f1757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614f4757600080fd5b614f5083614bef565b915060208301356001600160401b03811115614f6b57600080fd5b614f7785828601614ede565b9150509250929050565b60008060008060608587031215614f9757600080fd5b614fa085614bef565b935060208501356001600160401b03811115614fbb57600080fd5b614fc787828801614d38565b9598909750949560400135949350505050565b600060208284031215614fec57600080fd5b5035919050565b80356001600160401b0381168114614c0657600080fd5b60006020828403121561501c57600080fd5b61151d82614ff3565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e0602084015261506260e084018a614bb0565b8381036040850152615074818a614bb0565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156150c8578351835292840192918401916001016150ac565b50909c9b505050505050505050505050565b600080600080608085870312156150f057600080fd5b6150f985614bef565b9350602085013592506040850135915061511560608601614ff3565b905092959194509250565b600080600080600080600080610100898b03121561513d57600080fd5b88356001600160401b038082111561515457600080fd5b6151608c838d01614ede565b995060208b013591508082111561517657600080fd5b506151838b828c01614ede565b97505061519260408a01614bef565b95506151a060608a01614bef565b94506151ae60808a01614bef565b93506151bc60a08a01614ff3565b92506151ca60c08a01614ff3565b91506151d860e08a01614bef565b90509295985092959890939650565b600080600080600080600060e0888a03121561520257600080fd5b61520b88614bef565b965061521960208901614bef565b95506040880135945060608801359350608088013560ff8116811461523d57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561526d57600080fd5b61527683614bef565b915061528460208401614bef565b90509250929050565b6000806000806000608086880312156152a557600080fd5b853594506152b560208701614bef565b93506152c360408701614ff3565b925060608601356001600160401b038111156152de57600080fd5b6152ea88828901614d38565b969995985093965092949392505050565b6000806020838503121561530e57600080fd5b82356001600160401b0381111561532457600080fd5b61533085828601614d38565b90969095509350505050565b600181811c9082168061535057607f821691505b6020821081036143d957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160701b038181168382160190808211156153a6576153a6615370565b5092915050565b634e487b7160e01b600052603260045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8581526060602082015260006154066060830186886153c3565b82810360408401526154198185876153c3565b98975050505050505050565b6001600160401b038181168382160190808211156153a6576153a6615370565b6001600160a01b038316815260406020820152600061151a6040830184614bb0565b60408152600061547b6040830185876153c3565b9050826020830152949350505050565b6001600160401b038281168282160390808211156153a6576153a6615370565b634e487b7160e01b600052601260045260246000fd5b60006001600160401b03808416806154db576154db6154ab565b92169190910492915050565b6001600160401b0381811683821602808216919082811461550a5761550a615370565b505092915050565b82815260406020820152600061151a6040830184614bb0565b808201808211156112d5576112d5615370565b818103818111156112d5576112d5615370565b6001600160701b038281168282160390808211156153a6576153a6615370565b80820281158282048414176112d5576112d5615370565b600082615597576155976154ab565b500490565b6bffffffffffffffffffffffff19813581811691601485101561550a5760149490940360031b84901b1690921692915050565b6060815260006155e26060830187614bb0565b82810360208401526155f58186886153c3565b91505082604083015295945050505050565b838152604060208201526000611b746040830184866153c3565b6000806040838503121561563457600080fd5b8235915060208301356001600160401b03811115614f6b57600080fd5b6001600160701b0381811683821602808216919082811461550a5761550a615370565b60006001600160701b03808416806154db576154db6154ab565b600082601f83011261569f57600080fd5b81516156ad614efd82614eb7565b8181528460208386010111156156c257600080fd5b611b77826020830160208701614b8c565b6000806000606084860312156156e857600080fd5b83516001600160401b03808211156156ff57600080fd5b61570b8783880161568e565b9450602086015191508082111561572157600080fd5b5061572e8682870161568e565b925050604084015190509250925092565b805160208201516bffffffffffffffffffffffff1980821692919060148310156157735780818460140360031b1b83161693505b505050919050565b60408152600061578e6040830185614bb0565b90508260208301529392505050565b6000602082840312156157af57600080fd5b815161151d81614c50565b6000602082840312156157cc57600080fd5b5051919050565b805169ffffffffffffffffffff81168114614c0657600080fd5b600080600080600060a0868803121561580557600080fd5b61580e866157d3565b9450602086015193506040860151925060608601519150615831608087016157d3565b90509295509295909350565b634e487b7160e01b600052602160045260246000fd5b60008251615865818460208701614b8c565b9190910192915050565b601f821115611a9e576000816000526020600020601f850160051c810160208610156158985750805b601f850160051c820191505b8181101561444c578281556001016158a4565b81516001600160401b038111156158d0576158d0614e71565b6158e4816158de845461533c565b8461586f565b602080601f83116001811461591957600084156159015750858301515b600019600386901b1c1916600185901b17855561444c565b600085815260208120601f198616915b8281101561594857888601518255948401946001909101908401615929565b50858210156159665787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fea26469706673582212205e0d236810d872ea90223c248390aab20735b183837f141e8b6a2e1adac78f4564736f6c63430008180033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"paris","libraries":{},"optimizer":{"enabled":true,"runs":1000},"outputSelection":{"*":{"":["*"],"*":["*"]}}},"optimization_runs":1000,"sourcify_repo_url":null,"decoded_constructor_args":null,"compiler_version":"v0.8.24+commit.e11b9ed9","is_verified_via_verifier_alliance":false,"verified_at":"2026-03-18T19:53:33.816445Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60a06040523060805234801561001457600080fd5b506080516159ac6200003f6000396000818161361901528181613642015261375b01526159ac6000f3fe6080604052600436106105e15760003560e01c80637ecebe0011610301578063b3ab15fb1161019a578063d505accf116100ec578063ea6c077111610095578063f733140e1161006f578063f733140e1461118f578063f8e3fc32146111af578063fbac3951146111d657600080fd5b8063ea6c077114611128578063f2fde38b1461114f578063f6ec1c4d1461116f57600080fd5b8063de9dc8ef116100c6578063de9dc8ef146110cc578063e1420eb2146110e1578063e3dc4dbd1461110857600080fd5b8063d505accf14611027578063d5a5f07214611047578063dd62ed3e1461106757600080fd5b8063c415b95c1161014e578063d017abed11610128578063d017abed14610fb3578063d3c3bbd014610fd3578063d4ecba4f14610ffa57600080fd5b8063c415b95c14610f59578063c62f173f14610f79578063cc9df18414610f9957600080fd5b8063c0c3ee1f1161017f578063c0c3ee1f14610ef9578063c107330214610f19578063c317e8a614610f3957600080fd5b8063b3ab15fb14610eb2578063b776197514610ed257600080fd5b8063969ce7e511610253578063a86b06e511610207578063ad3cb1cc116101e1578063ad3cb1cc14610e2d578063ae8bd78414610e76578063b280e6a614610e9d57600080fd5b8063a86b06e514610dcd578063a9059cbb14610ded578063ad0d70db14610e0d57600080fd5b8063a2ae87fa11610238578063a2ae87fa14610d6d578063a40f281214610d8d578063a42dce8014610dad57600080fd5b8063969ce7e514610d38578063a0941d0c14610d5857600080fd5b80638c255893116102b5578063950e61c61161028f578063950e61c614610cdc57806395d89b4114610cfc578063963f77ca14610d1157600080fd5b80638c25589314610c5f5780638da5cb5b14610c7f5780639083dd9d14610cbc57600080fd5b806382641e7f116102e657806382641e7f14610bf057806384b0196e14610c105780638781352d14610c3857600080fd5b80637ecebe0014610bb05780637f2bbc0e14610bd057600080fd5b80633ab81ecd1161047e57806359ed0813116103d05780636c4a4cc41161037957806373b16bc71161035357806373b16bc714610b665780637478015c14610b7b5780637d33991214610b9b57600080fd5b80636c4a4cc414610b1c57806370a0823114610b31578063715018a614610b5157600080fd5b806366285967116103aa5780636628596714610ac05780636a42b8f814610ae05780636ab8fc1814610b0757600080fd5b806359ed081314610a605780635deff1bb14610a805780636271cf1814610aa057600080fd5b80634a506553116104325780634f8b45b41161040c5780634f8b45b414610a0b57806352d1902d14610a2b578063570ca73514610a4057600080fd5b80634a506553146109b15780634e1e38e9146109d15780634f1ef286146109f857600080fd5b80633cb747bf116104635780633cb747bf1461095c5780633cbae7771461097c5780633e8b10ff1461099c57600080fd5b80633ab81ecd1461091c5780633c7c9b901461093c57600080fd5b8063225cc29d1161053757806331c3fa8a116104eb57806335251eae116104c557806335251eae146108c057806335dec5d1146108e75780633644e5151461090757600080fd5b806331c3fa8a1461084c578063323ec0b81461086157806332f27584146108a057600080fd5b8063292c21c91161051c578063292c21c9146107f05780632b0e8cd714610810578063313ce5671461083057600080fd5b8063225cc29d146107b057806323b872dd146107d057600080fd5b806311857106116105995780631a14f449116105735780631a14f4491461074e5780631a3b0503146107705780631e89d5451461079057600080fd5b806311857106146106da578063149668e0146106fa57806318160ddd1461071a57600080fd5b806309ff18f0116105ca57806309ff18f0146106415780630f27b9d21461067957806311532e77146106b657600080fd5b806306fdde03146105e6578063095ea7b314610611575b600080fd5b3480156105f257600080fd5b506105fb611206565b6040516106089190614bdc565b60405180910390f35b34801561061d57600080fd5b5061063161062c366004614c0b565b6112c1565b6040519015158152602001610608565b34801561064d57600080fd5b50600054610661906001600160a01b031681565b6040516001600160a01b039091168152602001610608565b34801561068557600080fd5b50600c5461069e9061010090046001600160701b031681565b6040516001600160701b039091168152602001610608565b3480156106c257600080fd5b506106cc60015481565b604051908152602001610608565b3480156106e657600080fd5b50600d54610661906001600160a01b031681565b34801561070657600080fd5b50600f54610661906001600160a01b031681565b34801561072657600080fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02546106cc565b34801561075a57600080fd5b5061076e610769366004614c35565b6112db565b005b34801561077c57600080fd5b5061076e61078b366004614c65565b61132d565b34801561079c57600080fd5b5061076e6107ab366004614ccd565b6113c7565b3480156107bc57600080fd5b5061076e6107cb366004614d79565b611463565b3480156107dc57600080fd5b506106316107eb366004614e13565b6114d2565b3480156107fc57600080fd5b50601254610661906001600160a01b031681565b34801561081c57600080fd5b5061076e61082b366004614c35565b611524565b34801561083c57600080fd5b5060405160098152602001610608565b34801561085857600080fd5b5061076e611696565b34801561086d57600080fd5b50600e5461088890600160a01b90046001600160401b031681565b6040516001600160401b039091168152602001610608565b3480156108ac57600080fd5b50601054610661906001600160a01b031681565b3480156108cc57600080fd5b5060135461088890600160401b90046001600160401b031681565b3480156108f357600080fd5b50600654610661906001600160a01b031681565b34801561091357600080fd5b506106cc6116de565b34801561092857600080fd5b5061076e610937366004614c35565b6116ed565b34801561094857600080fd5b5061076e610957366004614c35565b611853565b34801561096857600080fd5b50600854610661906001600160a01b031681565b34801561098857600080fd5b5061076e610997366004614e4f565b6118a8565b3480156109a857600080fd5b5061076e6118c3565b3480156109bd57600080fd5b5061076e6109cc366004614f34565b611906565b3480156109dd57600080fd5b5060135461088890600160801b90046001600160401b031681565b61076e610a06366004614f34565b6119ac565b348015610a1757600080fd5b506105fb610a26366004614f81565b611aa3565b348015610a3757600080fd5b506106cc611b7f565b348015610a4c57600080fd5b50600454610661906001600160a01b031681565b348015610a6c57600080fd5b5061076e610a7b366004614fda565b611bae565b348015610a8c57600080fd5b5061076e610a9b36600461500a565b611c16565b348015610aac57600080fd5b50601354610888906001600160401b031681565b348015610acc57600080fd5b5061076e610adb366004614c35565b611cfe565b348015610aec57600080fd5b5060025461088890600160b01b90046001600160401b031681565b348015610b1357600080fd5b5061076e611e61565b348015610b2857600080fd5b5061076e611e7f565b348015610b3d57600080fd5b506106cc610b4c366004614c35565b611ec2565b348015610b5d57600080fd5b5061076e611f07565b348015610b7257600080fd5b50610888611f1b565b348015610b8757600080fd5b50600354610888906001600160401b031681565b348015610ba757600080fd5b5061076e611fa7565b348015610bbc57600080fd5b506106cc610bcb366004614c35565b611fea565b348015610bdc57600080fd5b506105fb610beb366004614c65565b611ff5565b348015610bfc57600080fd5b50600754610661906001600160a01b031681565b348015610c1c57600080fd5b50610c25612054565b6040516106089796959493929190615025565b348015610c4457600080fd5b5060055461088890600160a01b90046001600160401b031681565b348015610c6b57600080fd5b5061076e610c7a366004614c65565b612150565b348015610c8b57600080fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316610661565b348015610cc857600080fd5b5061076e610cd7366004614c35565b612165565b348015610ce857600080fd5b50600254610888906001600160401b031681565b348015610d0857600080fd5b506105fb6122c8565b348015610d1d57600080fd5b5060025461069e90600160401b90046001600160701b031681565b348015610d4457600080fd5b50610631610d533660046150da565b612319565b348015610d6457600080fd5b5061076e6124d7565b348015610d7957600080fd5b506105fb610d88366004614c65565b612517565b348015610d9957600080fd5b506106cc610da8366004614fda565b612600565b348015610db957600080fd5b5061076e610dc8366004614c35565b61262c565b348015610dd957600080fd5b50600554610661906001600160a01b031681565b348015610df957600080fd5b50610631610e08366004614c0b565b612792565b348015610e1957600080fd5b5061076e610e28366004615120565b6127d0565b348015610e3957600080fd5b506105fb6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b348015610e8257600080fd5b5060035461088890600160401b90046001600160401b031681565b348015610ea957600080fd5b5061076e6128fb565b348015610ebe57600080fd5b5061076e610ecd366004614c35565b612943565b348015610ede57600080fd5b5060125461088890600160a01b90046001600160401b031681565b348015610f0557600080fd5b5061076e610f14366004614c65565b612aa6565b348015610f2557600080fd5b5061076e610f3436600461500a565b612c95565b348015610f4557600080fd5b50600e54610661906001600160a01b031681565b348015610f6557600080fd5b50601154610661906001600160a01b031681565b348015610f8557600080fd5b50600954610661906001600160a01b031681565b348015610fa557600080fd5b50600c546106319060ff1681565b348015610fbf57600080fd5b506105fb610fce366004614f81565b612e84565b348015610fdf57600080fd5b5060075461088890600160a01b90046001600160401b031681565b34801561100657600080fd5b506106cc611015366004614fda565b600a6020526000908152604090205481565b34801561103357600080fd5b5061076e6110423660046151e7565b612f39565b34801561105357600080fd5b5061076e611062366004614c65565b6130c4565b34801561107357600080fd5b506106cc61108236600461525a565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b3480156110d857600080fd5b5061076e613161565b3480156110ed57600080fd5b5060105461088890600160a01b90046001600160401b031681565b34801561111457600080fd5b5061076e61112336600461528d565b6131a4565b34801561113457600080fd5b5060135461088890600160c01b90046001600160401b031681565b34801561115b57600080fd5b5061076e61116a366004614c35565b613267565b34801561117b57600080fd5b5061076e61118a3660046152fb565b6132bb565b34801561119b57600080fd5b5061076e6111aa366004614c65565b61335d565b3480156111bb57600080fd5b5060095461088890600160a01b90046001600160401b031681565b3480156111e257600080fd5b506106316111f1366004614c35565b600b6020526000908152604090205460ff1681565b606060007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b905080600301805461123d9061533c565b80601f01602080910402602001604051908101604052809291908181526020018280546112699061533c565b80156112b65780601f1061128b576101008083540402835291602001916112b6565b820191906000526020600020905b81548152906001019060200180831161129957829003601f168201915b505050505091505090565b6000336112cf818585613410565b60019150505b92915050565b6112e43361341d565b6001600160a01b0381166000818152600b6020526040808220805460ff19169055517f665918c9e02eb2fd85acca3969cb054fc84c138e60ec4af22ab6ef2fd4c93c279190a250565b6113363361341d565b80600260088282829054906101000a90046001600160701b031661135a9190615386565b92506101000a8154816001600160701b0302191690836001600160701b031602179055507f0dfdae44e38b14db1ba2cb6d7dd04721390e20f97c58e268c486d50a4e51f82f816040516113bc91906001600160701b0391909116815260200190565b60405180910390a150565b828114611400576040517fe551559700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8381101561145c57611453858583818110611420576114206153ad565b90506020020160208101906114359190614c35565b848484818110611447576114476153ad565b90506020020135612792565b50600101611403565b5050505050565b61146b61346f565b6114768787876134e3565b856001600160a01b0316876001600160a01b03167f3b04dd355b44edafaa51d8ee50f4f765b172f2d813a2d7f4d2b6d19f594d0a2e87878787876040516114c19594939291906153ec565b60405180910390a350505050505050565b60006114dd33613542565b306001600160a01b0384160361150657604051630e927f5760e21b815260040160405180910390fd5b61150f84613542565b61151a8484846135a0565b90505b9392505050565b61152c61346f565b611535816135c4565b600e546001600160401b03600160a01b820416906001600160a01b03838116911614801561156b57506001600160401b03811615155b801561157f575042816001600160401b0316105b156115da57600d80546001600160a01b0319166001600160a01b0384169081179091556040519081527f9261c972b118688a0095ed3c9ee6adde042135daad66552cbbf4f791f0404310906020015b60405180910390a15050565b600e80546001600160a01b0319166001600160a01b03841617905560025461161290600160b01b90046001600160401b031642615425565b600e805467ffffffffffffffff60a01b1916600160a01b6001600160401b0393841681029190911791829055600d54604080516001600160a01b039283168152918716602083015291909204909216918101919091527f52c09340cecfbd9b6c1b3072df4b3989e60ff5e7711bd50b82ce82676cf87591906060016115ce565b5050565b6006546001600160a01b031633146116c857604051635a4c7a3b60e01b81523360048201526024015b60405180910390fd5b6005805467ffffffffffffffff60a01b19169055565b60006116e8613604565b905090565b6116f561346f565b6116fe816135c4565b6010546001600160401b03600160a01b820416906001600160a01b03838116911614801561173457506001600160401b03811615155b8015611748575042816001600160401b0316105b1561179b57600f80546001600160a01b0319166001600160a01b0384169081179091556040519081527f6dc054adf0e5a4eafbfa2c23923b60465f2cf24389ace30184f2e252977336ff906020016115ce565b601080546001600160a01b0319166001600160a01b0384161790556002546117d390600160b01b90046001600160401b031642615425565b6010805467ffffffffffffffff60a01b1916600160a01b6001600160401b0393841681029190911791829055600f54604080516001600160a01b039283168152918716602083015291909204909216918101919091527fe52eca438bb1ef7edd7a1f80eb7b672f2e258eca1d5f5ca4dada59dde83e3ce5906060016115ce565b61185c3361341d565b6001600160a01b0381166000818152600b6020526040808220805460ff19166001179055517f406bbf2d8d145125adf1198d2cf8a67c66cc4bb0ab01c37dccd4f7c0aae1e7c79190a250565b6118b061346f565b600c805460ff1916911515919091179055565b6006546001600160a01b031633146118f057604051635a4c7a3b60e01b81523360048201526024016116bf565b6009805467ffffffffffffffff60a01b19169055565b61190e61346f565b611917826135c4565b600080546001600160a01b0319166001600160a01b03841617905580516020820120600155600254600160b01b90046001600160401b03166119599042615425565b6002805467ffffffffffffffff19166001600160401b03929092169190911790556040517fcc54b42f78b332711d2d2b40bd7edb325a1fef0124753b0689728b7209ca1e2e906115ce9084908490615445565b6119b461360e565b6000546001600160a01b038381169116146119fb576040517f9ab1811500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001548151602083012014611a3c576040517fefac8be100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160401b0316801580611a5d575042816001600160401b0316115b15611a94576040517f260343ea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a9e83836136c5565b505050565b6008546060906001600160a01b03163314611ad35760405163ca46148560e01b81523360048201526024016116bf565b600c5460ff1615611b10576040517fb73765ef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b19826136e0565b611b23858361371a565b846001600160a01b03167fa991fe95027fe8f10de89078c1c26def80922af31f4bc9fb2e50b5646fe96a10858585604051611b6093929190615467565b60405180910390a2611b7485858585612e84565b90505b949350505050565b6000611b89613750565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6006546001600160a01b03163314611bdb57604051635a4c7a3b60e01b81523360048201526024016116bf565b6000818152600a60205260408082208290555182917f806dc0290fcdd417bbb174a9f100caca0a3a138dde7f3031430dbf5f80cd51d791a250565b611c1e61346f565b611c2781613799565b6000611c31611f1b565b90506000611c3d6137f3565b601380546fffffffffffffffffffffffffffffffff16600160801b6001600160401b0387811691820277ffffffffffffffffffffffffffffffffffffffffffffffff1692909217600160c01b878416908102919091176fffffffffffffffff00000000000000001916600160401b93861693840217909355604080519182526020820193909352918201529091507f4cf9028c56d37c0bff94ef9db435e32721af26676734c73ba7213ddad3e13d84906060015b60405180910390a1505050565b611d0661346f565b611d0f816135c4565b6009546001600160401b03600160a01b820416906001600160a01b038381169116148015611d4557506001600160401b03811615155b8015611d59575042816001600160401b0316105b15611dac57600880546001600160a01b0319166001600160a01b0384169081179091556040519081527f1eff1dd5ff557eb8ff50923c367fb979543603db3362ae01bd1fa5a15d4b39f7906020016115ce565b600980546001600160a01b0319166001600160a01b038416179055600254600090611de790600160b01b90046001600160401b031642615425565b6009805467ffffffffffffffff60a01b1916600160a01b6001600160401b03841690810291909117909155600854604080516001600160a01b03928316815291871660208301528101919091529091507fb1fcccee531f2873810d3aa626cb3577d8e80b1e0f3136f75ff2daf63e55737490606001611cf1565b611e6961346f565b6007805467ffffffffffffffff60a01b19169055565b6006546001600160a01b03163314611eac57604051635a4c7a3b60e01b81523360048201526024016116bf565b6012805467ffffffffffffffff60a01b19169055565b6000807f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b6001600160a01b0390931660009081526020939093525050604090205490565b611f0f61346f565b611f196000613817565b565b60008062015180601360089054906101000a90046001600160401b0316611f4142613888565b611f4b919061548b565b611f5591906154c1565b60135490915061016d90611f7a908390600160801b90046001600160401b03166154e7565b611f8491906154c1565b601354611fa19190600160c01b90046001600160401b031661548b565b91505090565b6006546001600160a01b03163314611fd457604051635a4c7a3b60e01b81523360048201526024016116bf565b600e805467ffffffffffffffff60a01b19169055565b60006112d5826138c2565b6060612009826001600160701b03166138eb565b604080516001600160701b03841660208201526003910160408051601f198184030181529082905261203e9291602001615512565b6040516020818303038152906040529050919050565b600060608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561209357506001810154155b6120f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064016116bf565b612101613953565b6121096139a4565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6121593361341d565b612162816139ce565b50565b61216d61346f565b612176816135c4565b6007546001600160401b03600160a01b820416906001600160a01b0383811691161480156121ac57506001600160401b03811615155b80156121c0575042816001600160401b0316105b1561221357600680546001600160a01b0319166001600160a01b0384169081179091556040519081527fc1f235bba1c838187a7f50f73c2940cd988836882c74b7dfc478d28a37d79d58906020016115ce565b600780546001600160a01b0319166001600160a01b03841617905560025460009061224e90600160b01b90046001600160401b031642615425565b6007805467ffffffffffffffff60a01b1916600160a01b6001600160401b03841690810291909117909155600654604080516001600160a01b03928316815291871660208301528101919091529091507f8a674bc274bfa5b54e4ea4c4831280b18b2ccbb2aadfc7075f9cec0eecd0fb6490606001611cf1565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace009161123d9061533c565b60006123243361341d565b61232d82613aeb565b604080516001600160a01b03871660208201529081018590526060810184905260009060800160408051601f1981840301815291815281516020928301206000818152600a9093529082205490925090819003612403576002546123a190600160b01b90046001600160401b03164261552b565b6000838152600a60209081526040918290209290925580518881529182018790526001600160a01b038916917f5b5758388c63ddbb027c1c831a65b27d9c8f0cb94b3d4452b9061e541a7a14b3910160405180910390a2600092505050611b77565b4281101561241f576000828152600a602052604081205561246a565b6040517f8cb39b490000000000000000000000000000000000000000000000000000000081526001600160a01b038816600482015260248101879052604481018690526064016116bf565b612473866138eb565b60025461249a90612495908890600160401b90046001600160701b031661553e565b613b55565b600260086101000a8154816001600160701b0302191690836001600160701b031602179055506124ca8787613b89565b5060019695505050505050565b6006546001600160a01b0316331461250457604051635a4c7a3b60e01b81523360048201526024016116bf565b6002805467ffffffffffffffff19169055565b6008546060906001600160a01b031633146125475760405163ca46148560e01b81523360048201526024016116bf565b6125503261341d565b612562826001600160701b03166136e0565b61256b82611ff5565b905081600260088282829054906101000a90046001600160701b03166125919190615551565b92506101000a8154816001600160701b0302191690836001600160701b031602179055507fae1020cbcb1cc75501477d72d538582a5e4db035ee16ffce5c13c67115b081aa826040516125f391906001600160701b0391909116815260200190565b60405180910390a1919050565b6000633b9aca0061260f611f1b565b612622906001600160401b031684615571565b6112d59190615588565b61263461346f565b61263d816135c4565b6012546001600160401b03600160a01b820416906001600160a01b03838116911614801561267357506001600160401b03811615155b8015612687575042816001600160401b0316105b156126da57601180546001600160a01b0319166001600160a01b0384169081179091556040519081527f3f71a3f22985ad24f13299a7e2c1c88b2dc5a668adbd2e2756bfa64c2ae0edf1906020016115ce565b601280546001600160a01b0319166001600160a01b03841617905560025461271290600160b01b90046001600160401b031642615425565b6012805467ffffffffffffffff60a01b1916600160a01b6001600160401b0393841681029190911791829055601154604080516001600160a01b039283168152918716602083015291909204909216918101919091527f7aaca0e9970719843de28babab2214cdae6a08db1c4031702ce597b669874741906060016115ce565b600061279d33613542565b306001600160a01b038416036127c657604051630e927f5760e21b815260040160405180910390fd5b61151d8383613bbf565b60006127da613bcd565b805490915060ff600160401b82041615906001600160401b03166000811580156128015750825b90506000826001600160401b0316600114801561281d5750303b155b90508115801561282b575080155b15612862576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561289157845468ff00000000000000001916600160401b1785555b6128a18d8d8d8d8d8d8d8d613bf6565b83156128ec57845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050505050565b6006546001600160a01b0316331461292857604051635a4c7a3b60e01b81523360048201526024016116bf565b600380546fffffffffffffffff000000000000000019169055565b61294b61346f565b612954816135c4565b6005546001600160401b03600160a01b820416906001600160a01b03838116911614801561298a57506001600160401b03811615155b801561299e575042816001600160401b0316105b156129f157600480546001600160a01b0319166001600160a01b0384169081179091556040519081527f1fac8e1a48aa1912f53ebcb6e8d81f4f8cdf744982c7aa4aaf0152a30c02696e906020016115ce565b600580546001600160a01b0319166001600160a01b038416179055600254600090612a2c90600160b01b90046001600160401b031642615425565b6005805467ffffffffffffffff60a01b1916600160a01b6001600160401b03841690810291909117909155600454604080516001600160a01b03928316815291871660208301528101919091529091507f12b711c994caeaba10a597eb355ca2db4a74639902e3d300f9370caee0da4b0b90606001611cf1565b6011546001600160a01b03163314612aec576040517f0205ca990000000000000000000000000000000000000000000000000000000081523360048201526024016116bf565b612afe816001600160701b03166136e0565b600254600160401b90046001600160701b031615612b48576040517f4ed115a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6013546001600160401b03166000612b5e6137f3565b9050806001600160401b0316826001600160401b031603612bab576040517fbc7facfc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6013805467ffffffffffffffff19166001600160401b038316179055612bd0836139ce565b600254612bee908490600160401b90046001600160701b0316615551565b600280547fffffffffffffffffffff0000000000000000000000000000ffffffffffffffff16600160401b6001600160701b0393841602179055601154612c42916001600160a01b03909116908516613b89565b604080516001600160401b038085168252831660208201526001600160701b038516918101919091527f404f32d1a28715a46df96742ecab9ac59538f55305a4341e2d3ac21cb27109fa90606001611cf1565b612c9d61346f565b610e106001600160401b0382161015612ce2576040517fed75f3c200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6202a3006001600160401b0382161115612d28576040517f1bc4dde000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546001600160401b03600160401b82048116918382169116148015612d5757506001600160401b03811615155b8015612d6b575042816001600160401b0316105b15612ddf57600280547fffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffff16600160b01b6001600160401b038516908102919091179091556040519081527f0ed594aee59a2d00c8a1183779743ed2c0f8e413f761a48b181a72cb86e1a05a906020016115ce565b600254600160b01b90046001600160401b03166000612dfe8242615425565b600380546001600160401b038781166fffffffffffffffffffffffffffffffff199092168217600160401b858316908102919091179093556040805191871682526020820192909252908101919091529091507f8189ce093e30309b5e2dffeabdf7adf977853585d6b56995e8c8098342f6546f9060600160405180910390a150505050565b6060612e8f85613542565b6014839003612eb4576000612ea4848661559c565b60601c9050612eb281613542565b505b60408051606087901b6bffffffffffffffffffffffff191660208201528151601481830301815260348201909252600090612ef99083908890889088906054016155cf565b6040516020818303038152906040529050600281604051602001612f1e929190615512565b60405160208183030381529060405292505050949350505050565b83421115612f76576040517f62791302000000000000000000000000000000000000000000000000000000008152600481018590526024016116bf565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888612fe28c6001600160a01b031660009081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061303d82613c41565b9050600061304d82878787613c89565b9050896001600160a01b0316816001600160a01b0316146130ad576040517f4b800e460000000000000000000000000000000000000000000000000000000081526001600160a01b0380831660048301528b1660248201526044016116bf565b6130b88a8a8a613410565b50505050505050505050565b6130cd3361341d565b600c546000906130ec90839061010090046001600160701b0316615551565b905081600260088282829054906101000a90046001600160701b03166131129190615551565b92506101000a8154816001600160701b0302191690836001600160701b0316021790555080600c60016101000a8154816001600160701b0302191690836001600160701b031602179055505050565b6006546001600160a01b0316331461318e57604051635a4c7a3b60e01b81523360048201526024016116bf565b6010805467ffffffffffffffff60a01b19169055565b6131ad3361341d565b6131b683613aeb565b6004546131cc906001600160a01b03168661371a565b836001600160a01b03167faa42d7f17938b1f871b578d29e9906d689168f23d73e6f3d6ebfae27bb65215986848460405161320993929190615607565b60405180910390a261321a85613b55565b6002805460089061323c908490600160401b90046001600160701b0316615386565b92506101000a8154816001600160701b0302191690836001600160701b031602179055505050505050565b61326f61346f565b6001600160a01b0381166132b2576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024016116bf565b61216281613817565b6008546001600160a01b031633146132e85760405163ca46148560e01b81523360048201526024016116bf565b6000806132f783850185615621565b91509150600282036133115761330c81613cb7565b613357565b600382036133225761330c81613d7a565b6040517f0c46eb14000000000000000000000000000000000000000000000000000000008152600481018390526024016116bf565b50505050565b6133663361341d565b613378816001600160701b03166136e0565b61338a816001600160701b03166138eb565b80600260088282829054906101000a90046001600160701b03166133ae9190615551565b92506101000a8154816001600160701b0302191690836001600160701b031602179055507fe7e49ae780d4f45ca4e569062295752e6c55465477a5124eddc65c41414756e3816040516113bc91906001600160701b0391909116815260200190565b611a9e8383836001613e18565b6004546001600160a01b03828116911614612162576040517f76c6c93a0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016116bf565b336134a17f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614611f19576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016116bf565b6001600160a01b03831661350d57604051634b637e8f60e11b8152600060048201526024016116bf565b6001600160a01b0382166135375760405163ec442f0560e01b8152600060048201526024016116bf565b611a9e838383613f43565b6001600160a01b0381166000908152600b602052604090205460ff1615612162576040517f863248950000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016116bf565b6000336135ae8582856140ac565b6135b98585856134e3565b506001949350505050565b6001600160a01b038116612162576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006116e861415d565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806136a757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661369b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b15611f195760405163703e46dd60e11b815260040160405180910390fd5b6136cd61360e565b6136d6826141d1565b61169282826141d9565b80600003612162576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821661374457604051634b637e8f60e11b8152600060048201526024016116bf565b61169282600083613f43565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611f195760405163703e46dd60e11b815260040160405180910390fd5b6137a8600a633b9aca006154c1565b6001600160401b0316816001600160401b03161115612162576040517f1c2daa9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000620151808061380342613888565b61380d91906154c1565b6116e891906154e7565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60006001600160401b038211156138be57604080516306dfcc6560e41b81526004810191909152602481018390526044016116bf565b5090565b6000807f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00611ee7565b600254600160401b90046001600160701b0316811115612162576002546040517f75f28f1d000000000000000000000000000000000000000000000000000000008152600160401b9091046001600160701b03166004820152602481018290526044016116bf565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1009161123d9061533c565b606060007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10061122c565b600c546000906139ed90839061010090046001600160701b0316615386565b90506000633b9aca006139fe611f1b565b613a11906001600160401b031684615651565b613a1b9190615674565b6001600160701b031690506000613a306142c1565b905080821315613a76576040517f059378c200000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016116bf565b83600260088282829054906101000a90046001600160701b0316613a9a9190615386565b92506101000a8154816001600160701b0302191690836001600160701b0316021790555082600c60016101000a8154816001600160701b0302191690836001600160701b0316021790555050505050565b6000613af5611f1b565b9050806001600160401b0316826001600160401b031614611692576040517f338c5e1c0000000000000000000000000000000000000000000000000000000081526001600160401b038084166004830152821660248201526044016116bf565b60006001600160701b038211156138be576040516306dfcc6560e41b815260706004820152602481018390526044016116bf565b6001600160a01b038216613bb35760405163ec442f0560e01b8152600060048201526024016116bf565b61169260008383613f43565b6000336112cf8185856134e3565b6000807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a006112d5565b613bfe6143df565b613c0c88888888878761441d565b600d80546001600160a01b039586166001600160a01b0319918216179091556011805492909516911617909255505050505050565b60006112d5613c4e613604565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b600080600080613c9b88888888614454565b925092509250613cab8282614523565b50909695505050505050565b600080600083806020019051810190613cd091906156d3565b9250925092508151601414613d165781516040517f99cc9be00000000000000000000000000000000000000000000000000000000081526004016116bf91815260200190565b6000613d218361573f565b60601c9050613d308183613b89565b806001600160a01b03167f7526cb9032fb1c30951e05f1ac3006e8a7f76f1dfe225b64d7aabab0b27ed3618584604051613d6b92919061577b565b60405180910390a25050505050565b600081806020019051810190613d90919061579d565b905080600260088282829054906101000a90046001600160701b0316613db69190615386565b92506101000a8154816001600160701b0302191690836001600160701b031602179055507f0777cf903e54435115c01edfd1a21759c8a36b3db942df3f306a944922797755816040516115ce91906001600160701b0391909116815260200190565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b038516613e7c576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016116bf565b6001600160a01b038416613ebf576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016116bf565b6001600160a01b0380861660009081526001830160209081526040808320938816835292905220839055811561145c57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051613f3491815260200190565b60405180910390a35050505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b038416613f915781816002016000828254613f86919061552b565b9091555061401c9050565b6001600160a01b03841660009081526020829052604090205482811015613ffd576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b038616600482015260248101829052604481018490526064016116bf565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b03831661403a576002810180548390039055614059565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161409e91815260200190565b60405180910390a350505050565b6001600160a01b0383811660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093861683529290522054600019811015613357578181101561414e576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064016116bf565b61335784848484036000613e18565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f614188614627565b6141906146a3565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61216261346f565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015614233575060408051601f3d908101601f19168201909252614230918101906157ba565b60015b61425b57604051634c9c8ce360e01b81526001600160a01b03831660048201526024016116bf565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146142b7576040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600481018290526024016116bf565b611a9e83836146f9565b6000806000600d60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015614319573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061433d91906157ed565b50935050925050426203f48082614354919061552b565b10156143d957600f60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156143ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143d191906157ed565b509194505050505b50919050565b6143e761474f565b611f19576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6144256143df565b61442f8686614769565b6144388561477b565b614441846147c2565b61444c8383836147d3565b505050505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561448f5750600091506003905082614519565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156144e3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661450f57506000925060019150829050614519565b9250600091508190505b9450945094915050565b60008260038111156145375761453761583d565b03614540575050565b60018260038111156145545761455461583d565b0361458b576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111561459f5761459f61583d565b036145d9576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016116bf565b60038260038111156145ed576145ed61583d565b03611692576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016116bf565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614653613953565b80519091501561466b57805160209091012092915050565b8154801561467a579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816146cf6139a4565b8051909150156146e757805160209091012092915050565b6001820154801561467a579392505050565b614702826148d3565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561474757611a9e828261494a565b6116926149c0565b6000614759613bcd565b54600160401b900460ff16919050565b6147716143df565b61169282826149f8565b6147836143df565b612162816040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250614a5b565b6147ca6143df565b61216281614ace565b6147db6143df565b600480546001600160a01b0319166001600160a01b0385161790556147ff82613799565b633b9aca006001600160401b0382161115614846576040517f220bea5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006148506137f3565b601380546001600160401b03948516600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff968616600160801b02969096166fffffffffffffffffffffffffffffffff600160401b969094169586026fffffffffffffffffffffffffffffffff199092169095171791909116929092179290921790555050565b806001600160a01b03163b60000361490957604051634c9c8ce360e01b81526001600160a01b03821660048201526024016116bf565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516149679190615853565b600060405180830381855af49150503d80600081146149a2576040519150601f19603f3d011682016040523d82523d6000602084013e6149a7565b606091505b50915091506149b7858383614ad6565b95945050505050565b3415611f19576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b614a006143df565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03614a4c84826158b7565b506004810161335783826158b7565b614a636143df565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102614aaf84826158b7565b5060038101614abe83826158b7565b5060008082556001909101555050565b61326f6143df565b606082614aeb57614ae682614b4b565b61151d565b8151158015614b0257506001600160a01b0384163b155b15614b44576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016116bf565b508061151d565b805115614b5a57805160208201fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b83811015614ba7578181015183820152602001614b8f565b50506000910152565b60008151808452614bc8816020860160208601614b8c565b601f01601f19169290920160200192915050565b60208152600061151d6020830184614bb0565b80356001600160a01b0381168114614c0657600080fd5b919050565b60008060408385031215614c1e57600080fd5b614c2783614bef565b946020939093013593505050565b600060208284031215614c4757600080fd5b61151d82614bef565b6001600160701b038116811461216257600080fd5b600060208284031215614c7757600080fd5b813561151d81614c50565b60008083601f840112614c9457600080fd5b5081356001600160401b03811115614cab57600080fd5b6020830191508360208260051b8501011115614cc657600080fd5b9250929050565b60008060008060408587031215614ce357600080fd5b84356001600160401b0380821115614cfa57600080fd5b614d0688838901614c82565b90965094506020870135915080821115614d1f57600080fd5b50614d2c87828801614c82565b95989497509550505050565b60008083601f840112614d4a57600080fd5b5081356001600160401b03811115614d6157600080fd5b602083019150836020828501011115614cc657600080fd5b600080600080600080600060a0888a031215614d9457600080fd5b614d9d88614bef565b9650614dab60208901614bef565b95506040880135945060608801356001600160401b0380821115614dce57600080fd5b614dda8b838c01614d38565b909650945060808a0135915080821115614df357600080fd5b50614e008a828b01614d38565b989b979a50959850939692959293505050565b600080600060608486031215614e2857600080fd5b614e3184614bef565b9250614e3f60208501614bef565b9150604084013590509250925092565b600060208284031215614e6157600080fd5b8135801515811461151d57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614eaf57614eaf614e71565b604052919050565b60006001600160401b03821115614ed057614ed0614e71565b50601f01601f191660200190565b600082601f830112614eef57600080fd5b8135614f02614efd82614eb7565b614e87565b818152846020838601011115614f1757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614f4757600080fd5b614f5083614bef565b915060208301356001600160401b03811115614f6b57600080fd5b614f7785828601614ede565b9150509250929050565b60008060008060608587031215614f9757600080fd5b614fa085614bef565b935060208501356001600160401b03811115614fbb57600080fd5b614fc787828801614d38565b9598909750949560400135949350505050565b600060208284031215614fec57600080fd5b5035919050565b80356001600160401b0381168114614c0657600080fd5b60006020828403121561501c57600080fd5b61151d82614ff3565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e0602084015261506260e084018a614bb0565b8381036040850152615074818a614bb0565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156150c8578351835292840192918401916001016150ac565b50909c9b505050505050505050505050565b600080600080608085870312156150f057600080fd5b6150f985614bef565b9350602085013592506040850135915061511560608601614ff3565b905092959194509250565b600080600080600080600080610100898b03121561513d57600080fd5b88356001600160401b038082111561515457600080fd5b6151608c838d01614ede565b995060208b013591508082111561517657600080fd5b506151838b828c01614ede565b97505061519260408a01614bef565b95506151a060608a01614bef565b94506151ae60808a01614bef565b93506151bc60a08a01614ff3565b92506151ca60c08a01614ff3565b91506151d860e08a01614bef565b90509295985092959890939650565b600080600080600080600060e0888a03121561520257600080fd5b61520b88614bef565b965061521960208901614bef565b95506040880135945060608801359350608088013560ff8116811461523d57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561526d57600080fd5b61527683614bef565b915061528460208401614bef565b90509250929050565b6000806000806000608086880312156152a557600080fd5b853594506152b560208701614bef565b93506152c360408701614ff3565b925060608601356001600160401b038111156152de57600080fd5b6152ea88828901614d38565b969995985093965092949392505050565b6000806020838503121561530e57600080fd5b82356001600160401b0381111561532457600080fd5b61533085828601614d38565b90969095509350505050565b600181811c9082168061535057607f821691505b6020821081036143d957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160701b038181168382160190808211156153a6576153a6615370565b5092915050565b634e487b7160e01b600052603260045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8581526060602082015260006154066060830186886153c3565b82810360408401526154198185876153c3565b98975050505050505050565b6001600160401b038181168382160190808211156153a6576153a6615370565b6001600160a01b038316815260406020820152600061151a6040830184614bb0565b60408152600061547b6040830185876153c3565b9050826020830152949350505050565b6001600160401b038281168282160390808211156153a6576153a6615370565b634e487b7160e01b600052601260045260246000fd5b60006001600160401b03808416806154db576154db6154ab565b92169190910492915050565b6001600160401b0381811683821602808216919082811461550a5761550a615370565b505092915050565b82815260406020820152600061151a6040830184614bb0565b808201808211156112d5576112d5615370565b818103818111156112d5576112d5615370565b6001600160701b038281168282160390808211156153a6576153a6615370565b80820281158282048414176112d5576112d5615370565b600082615597576155976154ab565b500490565b6bffffffffffffffffffffffff19813581811691601485101561550a5760149490940360031b84901b1690921692915050565b6060815260006155e26060830187614bb0565b82810360208401526155f58186886153c3565b91505082604083015295945050505050565b838152604060208201526000611b746040830184866153c3565b6000806040838503121561563457600080fd5b8235915060208301356001600160401b03811115614f6b57600080fd5b6001600160701b0381811683821602808216919082811461550a5761550a615370565b60006001600160701b03808416806154db576154db6154ab565b600082601f83011261569f57600080fd5b81516156ad614efd82614eb7565b8181528460208386010111156156c257600080fd5b611b77826020830160208701614b8c565b6000806000606084860312156156e857600080fd5b83516001600160401b03808211156156ff57600080fd5b61570b8783880161568e565b9450602086015191508082111561572157600080fd5b5061572e8682870161568e565b925050604084015190509250925092565b805160208201516bffffffffffffffffffffffff1980821692919060148310156157735780818460140360031b1b83161693505b505050919050565b60408152600061578e6040830185614bb0565b90508260208301529392505050565b6000602082840312156157af57600080fd5b815161151d81614c50565b6000602082840312156157cc57600080fd5b5051919050565b805169ffffffffffffffffffff81168114614c0657600080fd5b600080600080600060a0868803121561580557600080fd5b61580e866157d3565b9450602086015193506040860151925060608601519150615831608087016157d3565b90509295509295909350565b634e487b7160e01b600052602160045260246000fd5b60008251615865818460208701614b8c565b9190910192915050565b601f821115611a9e576000816000526020600020601f850160051c810160208610156158985750805b601f850160051c820191505b8181101561444c578281556001016158a4565b81516001600160401b038111156158d0576158d0614e71565b6158e4816158de845461533c565b8461586f565b602080601f83116001811461591957600084156159015750858301515b600019600386901b1c1916600185901b17855561444c565b600085815260208120601f198616915b8281101561594857888601518255948401946001909101908401615929565b50858210156159665787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fea26469706673582212205e0d236810d872ea90223c248390aab20735b183837f141e8b6a2e1adac78f4564736f6c63430008180033","name":"MTokenMain","is_blueprint":false,"license_type":"none","is_fully_verified":true,"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":"@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// solhint-disable-next-line interface-starts-with-i\ninterface AggregatorV3Interface {\n  function decimals() external view returns (uint8);\n\n  function description() external view returns (string memory);\n\n  function version() external view returns (uint256);\n\n  function getRoundData(\n    uint80 _roundId\n  ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\n\n  function latestRoundData()\n    external\n    view\n    returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\n}\n"},{"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/token/ERC20/ERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IERC20Metadata} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {ContextUpgradeable} from \"../../utils/ContextUpgradeable.sol\";\nimport {IERC20Errors} from \"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors {\n    /// @custom:storage-location erc7201:openzeppelin.storage.ERC20\n    struct ERC20Storage {\n        mapping(address account => uint256) _balances;\n\n        mapping(address account => mapping(address spender => uint256)) _allowances;\n\n        uint256 _totalSupply;\n\n        string _name;\n        string _symbol;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ERC20\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00;\n\n    function _getERC20Storage() private pure returns (ERC20Storage storage $) {\n        assembly {\n            $.slot := ERC20StorageLocation\n        }\n    }\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * Both values are immutable: they can only be set once during construction.\n     */\n    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n        __ERC20_init_unchained(name_, symbol_);\n    }\n\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n        ERC20Storage storage $ = _getERC20Storage();\n        $._name = name_;\n        $._symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual returns (string memory) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual returns (string memory) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the default value returned by this function, unless\n     * it's overridden.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual returns (uint8) {\n        return 18;\n    }\n\n    /// @inheritdoc IERC20\n    function totalSupply() public view virtual returns (uint256) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._totalSupply;\n    }\n\n    /// @inheritdoc IERC20\n    function balanceOf(address account) public view virtual returns (uint256) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - the caller must have a balance of at least `value`.\n     */\n    function transfer(address to, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, value);\n        return true;\n    }\n\n    /// @inheritdoc IERC20\n    function allowance(address owner, address spender) public view virtual returns (uint256) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n     * `transferFrom`. This is semantically equivalent to an infinite approval.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, value);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Skips emitting an {Approval} event indicating an allowance update. This is not\n     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n     *\n     * NOTE: Does not update the allowance if the current allowance\n     * is the maximum `uint256`.\n     *\n     * Requirements:\n     *\n     * - `from` and `to` cannot be the zero address.\n     * - `from` must have a balance of at least `value`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `value`.\n     */\n    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, value);\n        _transfer(from, to, value);\n        return true;\n    }\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _transfer(address from, address to, uint256 value) internal {\n        if (from == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        if (to == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(from, to, value);\n    }\n\n    /**\n     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n     * this function.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _update(address from, address to, uint256 value) internal virtual {\n        ERC20Storage storage $ = _getERC20Storage();\n        if (from == address(0)) {\n            // Overflow check required: The rest of the code assumes that totalSupply never overflows\n            $._totalSupply += value;\n        } else {\n            uint256 fromBalance = $._balances[from];\n            if (fromBalance < value) {\n                revert ERC20InsufficientBalance(from, fromBalance, value);\n            }\n            unchecked {\n                // Overflow not possible: value <= fromBalance <= totalSupply.\n                $._balances[from] = fromBalance - value;\n            }\n        }\n\n        if (to == address(0)) {\n            unchecked {\n                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n                $._totalSupply -= value;\n            }\n        } else {\n            unchecked {\n                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n                $._balances[to] += value;\n            }\n        }\n\n        emit Transfer(from, to, value);\n    }\n\n    /**\n     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n     * Relies on the `_update` mechanism\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _mint(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(address(0), account, value);\n    }\n\n    /**\n     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n     * Relies on the `_update` mechanism.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead\n     */\n    function _burn(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        _update(account, address(0), value);\n    }\n\n    /**\n     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     *\n     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n     */\n    function _approve(address owner, address spender, uint256 value) internal {\n        _approve(owner, spender, value, true);\n    }\n\n    /**\n     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n     *\n     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n     * `Approval` event during `transferFrom` operations.\n     *\n     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n     * true using the following override:\n     *\n     * ```solidity\n     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n     *     super._approve(owner, spender, value, true);\n     * }\n     * ```\n     *\n     * Requirements are the same as {_approve}.\n     */\n    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n        ERC20Storage storage $ = _getERC20Storage();\n        if (owner == address(0)) {\n            revert ERC20InvalidApprover(address(0));\n        }\n        if (spender == address(0)) {\n            revert ERC20InvalidSpender(address(0));\n        }\n        $._allowances[owner][spender] = value;\n        if (emitEvent) {\n            emit Approval(owner, spender, value);\n        }\n    }\n\n    /**\n     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n     *\n     * Does not update the allowance value in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Does not emit an {Approval} event.\n     */\n    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance < type(uint256).max) {\n            if (currentAllowance < value) {\n                revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n            }\n            unchecked {\n                _approve(owner, spender, currentAllowance - value, false);\n            }\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC20Permit.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20Permit} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\";\nimport {ERC20Upgradeable} from \"../ERC20Upgradeable.sol\";\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {EIP712Upgradeable} from \"../../../utils/cryptography/EIP712Upgradeable.sol\";\nimport {NoncesUpgradeable} from \"../../../utils/NoncesUpgradeable.sol\";\nimport {Initializable} from \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20Permit, EIP712Upgradeable, NoncesUpgradeable {\n    bytes32 private constant PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n    /**\n     * @dev Permit deadline has expired.\n     */\n    error ERC2612ExpiredSignature(uint256 deadline);\n\n    /**\n     * @dev Mismatched signature.\n     */\n    error ERC2612InvalidSigner(address signer, address owner);\n\n    /**\n     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n     *\n     * It's a good idea to use the same `name` that is defined as the ERC-20 token name.\n     */\n    function __ERC20Permit_init(string memory name) internal onlyInitializing {\n        __EIP712_init_unchained(name, \"1\");\n    }\n\n    function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n    /// @inheritdoc IERC20Permit\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        if (block.timestamp > deadline) {\n            revert ERC2612ExpiredSignature(deadline);\n        }\n\n        bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n        bytes32 hash = _hashTypedDataV4(structHash);\n\n        address signer = ECDSA.recover(hash, v, r, s);\n        if (signer != owner) {\n            revert ERC2612InvalidSigner(signer, owner);\n        }\n\n        _approve(owner, spender, value);\n    }\n\n    /// @inheritdoc IERC20Permit\n    function nonces(address owner) public view virtual override(IERC20Permit, NoncesUpgradeable) returns (uint256) {\n        return super.nonces(owner);\n    }\n\n    /// @inheritdoc IERC20Permit\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\n        return _domainSeparatorV4();\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-upgradeable/utils/NoncesUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides tracking nonces for addresses. Nonces will only increment.\n */\nabstract contract NoncesUpgradeable is Initializable {\n    /**\n     * @dev The nonce used for an `account` is not the expected current nonce.\n     */\n    error InvalidAccountNonce(address account, uint256 currentNonce);\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.Nonces\n    struct NoncesStorage {\n        mapping(address account => uint256) _nonces;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Nonces\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant NoncesStorageLocation = 0x5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00;\n\n    function _getNoncesStorage() private pure returns (NoncesStorage storage $) {\n        assembly {\n            $.slot := NoncesStorageLocation\n        }\n    }\n\n    function __Nonces_init() internal onlyInitializing {\n    }\n\n    function __Nonces_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Returns the next unused nonce for an address.\n     */\n    function nonces(address owner) public view virtual returns (uint256) {\n        NoncesStorage storage $ = _getNoncesStorage();\n        return $._nonces[owner];\n    }\n\n    /**\n     * @dev Consumes a nonce.\n     *\n     * Returns the current value and increments nonce.\n     */\n    function _useNonce(address owner) internal virtual returns (uint256) {\n        NoncesStorage storage $ = _getNoncesStorage();\n        // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be\n        // decremented or reset. This guarantees that the nonce never overflows.\n        unchecked {\n            // It is important to do x++ and not ++x here.\n            return $._nonces[owner]++;\n        }\n    }\n\n    /**\n     * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.\n     */\n    function _useCheckedNonce(address owner, uint256 nonce) internal virtual {\n        uint256 current = _useNonce(owner);\n        if (nonce != current) {\n            revert InvalidAccountNonce(owner, current);\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: The upgradeable version of this contract does not use an immutable cache and recomputes the domain separator\n * each time {_domainSeparatorV4} is called. That is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n    bytes32 private constant TYPE_HASH =\n        keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n    struct EIP712Storage {\n        /// @custom:oz-renamed-from _HASHED_NAME\n        bytes32 _hashedName;\n        /// @custom:oz-renamed-from _HASHED_VERSION\n        bytes32 _hashedVersion;\n\n        string _name;\n        string _version;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n    function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n        assembly {\n            $.slot := EIP712StorageLocation\n        }\n    }\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n        __EIP712_init_unchained(name, version);\n    }\n\n    function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n        EIP712Storage storage $ = _getEIP712Storage();\n        $._name = name;\n        $._version = version;\n\n        // Reset prior values in storage if upgrading\n        $._hashedName = 0;\n        $._hashedVersion = 0;\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        return _buildDomainSeparator();\n    }\n\n    function _buildDomainSeparator() private view returns (bytes32) {\n        return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n\n    /// @inheritdoc IERC5267\n    function eip712Domain()\n        public\n        view\n        virtual\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        )\n    {\n        EIP712Storage storage $ = _getEIP712Storage();\n        // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n        // and the EIP712 domain is not reliable, as it will be missing name and version.\n        require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n        return (\n            hex\"0f\", // 01111\n            _EIP712Name(),\n            _EIP712Version(),\n            block.chainid,\n            address(this),\n            bytes32(0),\n            new uint256[](0)\n        );\n    }\n\n    /**\n     * @dev The name parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712Name() internal view virtual returns (string memory) {\n        EIP712Storage storage $ = _getEIP712Storage();\n        return $._name;\n    }\n\n    /**\n     * @dev The version parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712Version() internal view virtual returns (string memory) {\n        EIP712Storage storage $ = _getEIP712Storage();\n        return $._version;\n    }\n\n    /**\n     * @dev The hash of the name parameter for the EIP712 domain.\n     *\n     * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n     */\n    function _EIP712NameHash() internal view returns (bytes32) {\n        EIP712Storage storage $ = _getEIP712Storage();\n        string memory name = _EIP712Name();\n        if (bytes(name).length > 0) {\n            return keccak256(bytes(name));\n        } else {\n            // If the name is empty, the contract may have been upgraded without initializing the new storage.\n            // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n            bytes32 hashedName = $._hashedName;\n            if (hashedName != 0) {\n                return hashedName;\n            } else {\n                return keccak256(\"\");\n            }\n        }\n    }\n\n    /**\n     * @dev The hash of the version parameter for the EIP712 domain.\n     *\n     * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n     */\n    function _EIP712VersionHash() internal view returns (bytes32) {\n        EIP712Storage storage $ = _getEIP712Storage();\n        string memory version = _EIP712Version();\n        if (bytes(version).length > 0) {\n            return keccak256(bytes(version));\n        } else {\n            // If the version is empty, the contract may have been upgraded without initializing the new storage.\n            // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n            bytes32 hashedVersion = $._hashedVersion;\n            if (hashedVersion != 0) {\n                return hashedVersion;\n            } else {\n                return keccak256(\"\");\n            }\n        }\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/IERC5267.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC5267.sol)\n\npragma solidity >=0.4.16;\n\ninterface IERC5267 {\n    /**\n     * @dev MAY be emitted to signal that the domain could have changed.\n     */\n    event EIP712DomainChanged();\n\n    /**\n     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n     * signature.\n     */\n    function eip712Domain()\n        external\n        view\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        );\n}\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/interfaces/draft-IERC6093.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)\npragma solidity >=0.8.4;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC20InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC20InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     * @param allowance Amount of tokens a `spender` is allowed to operate with.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC20InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n    /**\n     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n     * Used in balance queries.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721InvalidOwner(address owner);\n\n    /**\n     * @dev Indicates a `tokenId` whose `owner` is the zero address.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721NonexistentToken(uint256 tokenId);\n\n    /**\n     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param tokenId Identifier number of a token.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC721InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC721InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC721InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC1155InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC1155InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC1155MissingApprovalForAll(address operator, address owner);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC1155InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC1155InvalidOperator(address operator);\n\n    /**\n     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n     * Used in batch transfers.\n     * @param idsLength Length of the array of token identifiers\n     * @param valuesLength Length of the array of token amounts\n     */\n    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\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/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 \"../../interfaces/draft-IERC1822.sol\";\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.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 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    /**\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/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/token/ERC20/extensions/IERC20Metadata.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},{"file_path":"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n *     doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n *     token.safeTransferFrom(msg.sender, address(this), value);\n *     ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     *\n     * CAUTION: See Security Considerations above.\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\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/Panic.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\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":"@openzeppelin/contracts/utils/Strings.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    using SafeCast for *;\n\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n    uint256 private constant SPECIAL_CHARS_LOOKUP =\n        (1 << 0x08) | // backspace\n            (1 << 0x09) | // tab\n            (1 << 0x0a) | // newline\n            (1 << 0x0c) | // form feed\n            (1 << 0x0d) | // carriage return\n            (1 << 0x22) | // double quote\n            (1 << 0x5c); // backslash\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev The string being parsed contains characters that are not in scope of the given base.\n     */\n    error StringsInvalidChar();\n\n    /**\n     * @dev The string being parsed is not a properly formatted address.\n     */\n    error StringsInvalidAddressFormat();\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            assembly (\"memory-safe\") {\n                ptr := add(add(buffer, 0x20), length)\n            }\n            while (true) {\n                ptr--;\n                assembly (\"memory-safe\") {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n     * representation, according to EIP-55.\n     */\n    function toChecksumHexString(address addr) internal pure returns (string memory) {\n        bytes memory buffer = bytes(toHexString(addr));\n\n        // hash the hex part of buffer (skip length + 2 bytes, length 40)\n        uint256 hashValue;\n        assembly (\"memory-safe\") {\n            hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n        }\n\n        for (uint256 i = 41; i > 1; --i) {\n            // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n            if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n                // case shift by xoring with 0x20\n                buffer[i] ^= 0x20;\n            }\n            hashValue >>= 4;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input) internal pure returns (uint256) {\n        return parseUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        uint256 result = 0;\n        for (uint256 i = begin; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 9) return (false, 0);\n            result *= 10;\n            result += chr;\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `int256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input) internal pure returns (int256) {\n        return parseInt(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n        (bool success, int256 value) = tryParseInt(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n     * the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n        return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n    /**\n     * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character or if the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, int256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseIntUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseIntUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, int256 value) {\n        bytes memory buffer = bytes(input);\n\n        // Check presence of a negative sign.\n        bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        bool positiveSign = sign == bytes1(\"+\");\n        bool negativeSign = sign == bytes1(\"-\");\n        uint256 offset = (positiveSign || negativeSign).toUint();\n\n        (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n        if (absSuccess && absValue < ABS_MIN_INT256) {\n            return (true, negativeSign ? -int256(absValue) : int256(absValue));\n        } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n            return (true, type(int256).min);\n        } else return (false, 0);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input) internal pure returns (uint256) {\n        return parseHexUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n     * invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseHexUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseHexUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        // skip 0x prefix if present\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 offset = hasPrefix.toUint() * 2;\n\n        uint256 result = 0;\n        for (uint256 i = begin + offset; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 15) return (false, 0);\n            result *= 16;\n            unchecked {\n                // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n                // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n                result += chr;\n            }\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input) internal pure returns (address) {\n        return parseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n        (bool success, address value) = tryParseAddress(input, begin, end);\n        if (!success) revert StringsInvalidAddressFormat();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n     * formatted address. See {parseAddress-string} requirements.\n     */\n    function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n        return tryParseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n     * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n     */\n    function tryParseAddress(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, address value) {\n        if (end > bytes(input).length || begin > end) return (false, address(0));\n\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n        // check that input is the correct length\n        if (end - begin == expectedLength) {\n            // length guarantees that this does not overflow, and value is at most type(uint160).max\n            (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n            return (s, address(uint160(v)));\n        } else {\n            return (false, address(0));\n        }\n    }\n\n    function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n        uint8 value = uint8(chr);\n\n        // Try to parse `chr`:\n        // - Case 1: [0-9]\n        // - Case 2: [a-f]\n        // - Case 3: [A-F]\n        // - otherwise not supported\n        unchecked {\n            if (value > 47 && value < 58) value -= 48;\n            else if (value > 96 && value < 103) value -= 87;\n            else if (value > 64 && value < 71) value -= 55;\n            else return type(uint8).max;\n        }\n\n        return value;\n    }\n\n    /**\n     * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n     *\n     * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n     *\n     * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n     * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n     * characters that are not in this range, but other tooling may provide different results.\n     */\n    function escapeJSON(string memory input) internal pure returns (string memory) {\n        bytes memory buffer = bytes(input);\n        bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n        uint256 outputLength = 0;\n\n        for (uint256 i; i < buffer.length; ++i) {\n            bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n            if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n                output[outputLength++] = \"\\\\\";\n                if (char == 0x08) output[outputLength++] = \"b\";\n                else if (char == 0x09) output[outputLength++] = \"t\";\n                else if (char == 0x0a) output[outputLength++] = \"n\";\n                else if (char == 0x0c) output[outputLength++] = \"f\";\n                else if (char == 0x0d) output[outputLength++] = \"r\";\n                else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n                else if (char == 0x22) {\n                    // solhint-disable-next-line quotes\n                    output[outputLength++] = '\"';\n                }\n            } else {\n                output[outputLength++] = char;\n            }\n        }\n        // write the actual length and deallocate unused memory\n        assembly (\"memory-safe\") {\n            mstore(output, outputLength)\n            mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n        }\n\n        return string(output);\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/utils/cryptography/ECDSA.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS\n    }\n\n    /**\n     * @dev The signature derives the `address(0)`.\n     */\n    error ECDSAInvalidSignature();\n\n    /**\n     * @dev The signature has an invalid length.\n     */\n    error ECDSAInvalidSignatureLength(uint256 length);\n\n    /**\n     * @dev The signature has an S value that is in the upper half order.\n     */\n    error ECDSAInvalidSignatureS(bytes32 s);\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n     * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n     * and a bytes32 providing additional information about the error.\n     *\n     * If no error is returned, then the address can be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes memory signature\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            assembly (\"memory-safe\") {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        unchecked {\n            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n            // We do not check for an overflow here since the shift operation results in 0 or 1.\n            uint8 v = uint8((uint256(vs) >> 255) + 27);\n            return tryRecover(hash, v, r, s);\n        }\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     */\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS, s);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature, bytes32(0));\n        }\n\n        return (signer, RecoverError.NoError, bytes32(0));\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n     */\n    function _throwError(RecoverError error, bytes32 errorArg) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert ECDSAInvalidSignature();\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert ECDSAInvalidSignatureLength(uint256(errorArg));\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert ECDSAInvalidSignatureS(errorArg);\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing a bytes32 `messageHash` with\n     * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n     * keccak256, although any bytes32 value can be safely used because the final digest will\n     * be re-hashed.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing an arbitrary `message` with\n     * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n        return\n            keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x00` (data with intended validator).\n     *\n     * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n     * `validator` address. Then hashing the result.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n    }\n\n    /**\n     * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n     */\n    function toDataWithIntendedValidatorHash(\n        address validator,\n        bytes32 messageHash\n    ) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, hex\"19_00\")\n            mstore(0x02, shl(96, validator))\n            mstore(0x16, messageHash)\n            digest := keccak256(0x00, 0x36)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n     *\n     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n     * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, hex\"19_01\")\n            mstore(add(ptr, 0x02), domainSeparator)\n            mstore(add(ptr, 0x22), structHash)\n            digest := keccak256(ptr, 0x42)\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/utils/math/Math.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Return the 512-bit addition of two uint256.\n     *\n     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n     */\n    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        assembly (\"memory-safe\") {\n            low := add(a, b)\n            high := lt(low, a)\n        }\n    }\n\n    /**\n     * @dev Return the 512-bit multiplication of two uint256.\n     *\n     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n     */\n    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n        // variables such that product = high * 2²⁵⁶ + low.\n        assembly (\"memory-safe\") {\n            let mm := mulmod(a, b, not(0))\n            low := mul(a, b)\n            high := sub(sub(mm, low), lt(mm, low))\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            success = c >= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a - b;\n            success = c <= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a * b;\n            assembly (\"memory-safe\") {\n                // Only true when the multiplication doesn't overflow\n                // (c / a == b) || (a == 0)\n                success := or(eq(div(c, a), b), iszero(a))\n            }\n            // equivalent to: success ? c : 0\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `DIV` opcode returns zero when the denominator is 0.\n                result := div(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `MOD` opcode returns zero when the denominator is 0.\n                result := mod(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryAdd(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n     */\n    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n        (, uint256 result) = trySub(a, b);\n        return result;\n    }\n\n    /**\n     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryMul(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (high == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return low / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= high) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [high low].\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                high := sub(high, gt(remainder, low))\n                low := sub(low, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly (\"memory-safe\") {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [high low] by twos.\n                low := div(low, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from high into low.\n            low |= high * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n            // is no longer required.\n            result = low * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n            if (high >= 1 << n) {\n                Panic.panic(Panic.UNDER_OVERFLOW);\n            }\n            return (high << (256 - n)) | (low >> n);\n        }\n    }\n\n    /**\n     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n        for (uint256 i = 0; i < byteArray.length; ++i) {\n            if (byteArray[i] != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // If upper 8 bits of 16-bit half set, add 8 to result\n        r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n        // If upper 4 bits of 8-bit half set, add 4 to result\n        r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n        // Shifts value right by the current result and use it as an index into this lookup table:\n        //\n        // | x (4 bits) |  index  | table[index] = MSB position |\n        // |------------|---------|-----------------------------|\n        // |    0000    |    0    |        table[0] = 0         |\n        // |    0001    |    1    |        table[1] = 0         |\n        // |    0010    |    2    |        table[2] = 1         |\n        // |    0011    |    3    |        table[3] = 1         |\n        // |    0100    |    4    |        table[4] = 2         |\n        // |    0101    |    5    |        table[5] = 2         |\n        // |    0110    |    6    |        table[6] = 2         |\n        // |    0111    |    7    |        table[7] = 2         |\n        // |    1000    |    8    |        table[8] = 3         |\n        // |    1001    |    9    |        table[9] = 3         |\n        // |    1010    |   10    |        table[10] = 3        |\n        // |    1011    |   11    |        table[11] = 3        |\n        // |    1100    |   12    |        table[12] = 3        |\n        // |    1101    |   13    |        table[13] = 3        |\n        // |    1110    |   14    |        table[14] = 3        |\n        // |    1111    |   15    |        table[15] = 3        |\n        //\n        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n        assembly (\"memory-safe\") {\n            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/utils/math/SafeCast.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/utils/math/SignedMath.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n            // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n            // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n            // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n            // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n            int256 mask = n >> 255;\n\n            // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n            return uint256((n + mask) ^ mask);\n        }\n    }\n}\n"},{"file_path":"contracts/DelayedUpgradeable.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.24;\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol\";\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n// note: using OwnableUpgradeable instead of Ownable2StepUpgradeable by design for now\nabstract contract DelayedUpgradeable is OwnableUpgradeable, UUPSUpgradeable {\n    // upgradeToAndCall() is delayed\n    address public nextImplementation;\n    bytes32 public nextUpgradeToAndCallDataHash;\n    uint64 public etNextUpgradeToAndCall; //effective time\n\n    event UpgradeToAndCallRequest(address newImplementation, bytes data);\n\n    error InvalidUpgradeToAndCallImpl();\n    error InvalidUpgradeToAndCallData();\n    error TooEarlyToUpgradeToAndCall();\n    error ZeroAddress();\n\n    function getDelay() internal virtual returns (uint64);\n\n    function requestUpgradeToAndCall(\n        address _newImplementation,\n        bytes memory _data\n    ) public onlyOwner {\n        _checkZeroAddress(_newImplementation);\n        nextImplementation = _newImplementation;\n        nextUpgradeToAndCallDataHash = keccak256(_data);\n        etNextUpgradeToAndCall = uint64(block.timestamp) + getDelay();\n        emit UpgradeToAndCallRequest(_newImplementation, _data);\n    }\n\n    function upgradeToAndCall(\n        address _newImplementation,\n        bytes memory _data\n    ) public payable override onlyProxy {\n        if (_newImplementation != nextImplementation) {\n            revert InvalidUpgradeToAndCallImpl();\n        }\n        if (keccak256(_data) != nextUpgradeToAndCallDataHash) {\n            revert InvalidUpgradeToAndCallData();\n        }\n\n        uint64 et = etNextUpgradeToAndCall;\n        if (et == 0 || et > block.timestamp) {\n            revert TooEarlyToUpgradeToAndCall();\n        }\n\n        // _authorizeUpgrade(newImplementation);\n        // _upgradeToAndCallUUPS(newImplementation, data);\n        super.upgradeToAndCall(_newImplementation, _data);\n    }\n\n    function _authorizeUpgrade(\n        address newImplementation\n    ) internal override onlyOwner {}\n\n    function _checkZeroAddress(address _addr) internal pure {\n        if (_addr == address(0)) {\n            revert ZeroAddress();\n        }\n    }\n}\n"},{"file_path":"contracts/MToken.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.24;\n\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {ERC20PermitUpgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol\";\nimport {DelayedUpgradeable} from \"./DelayedUpgradeable.sol\";\nimport {ICCClient} from \"./interfaces/ICCClient.sol\";\n// import \"hardhat/console.sol\";\n\nabstract contract MTokenBase is ERC20PermitUpgradeable, DelayedUpgradeable {\n    // every chain has its own mintBudget, operator can move mintBudget from one chain to another\n    uint112 public mintBudget;\n\n    // sensitive operation must be delayed before taking effect\n    uint64 public delay;\n    uint64 public nextDelay;\n    uint64 public etNextDelay; //effective time\n\n    // the operator takes care of everyday operations\n    address public operator;\n    address public nextOperator;\n    uint64 public etNextOperator; //effective time\n\n    // a revoker can delete delayed operations before they taking effect\n    address public revoker;\n    address public nextRevoker;\n    uint64 public etNextRevoker; //effective time\n\n    // the messenger contract takes care of cross-chain task\n    address public messenger;\n    address public nextMessenger;\n    uint64 public etNextMessenger; //effective time\n\n    // the delayed minting requests are stored in requestMap\n    mapping(bytes32 requestHash => uint256 effectiveTime) public requestMap;\n\n    // suspicious accounts can be blocked\n    mapping(address account => bool blocked) public isBlocked;\n\n    bool public disableCcSend;\n\n    /* Main Chain */\n\n    // totalTokenObligation = Sum of each chain's totalSupply and mintBudget\n    // totalTokenObligation * ozPerToken <= Chainlink's PoR\n    uint112 public totalTokenObligation;\n\n    // ChainLink PoR\n    address public reserveFeed;\n    address public nextReserveFeed;\n    uint64 public etNextReserveFeed; //effective time\n    address public fallbackFeed;\n    address public nextFallbackFeed;\n    uint64 public etNextFallbackFeed; //effective time\n\n    // the address that collects the fee tokens\n    address public feeCollector;\n    address public nextFeeCollector;\n    uint64 public etNextFeeCollector; //effective time\n\n    uint64 public lastReconcileTime; // timestamp of the last reconcile (fee minting), rounded to daily boundary\n    uint64 public ozPerTokenBaseTime; // timestamp of the update of annualFeeRate & ozPerTokenBase, rounded to daily boundary\n    uint64 public annualFeeRate; // the annual fee rate, 9 decimals\n    uint64 public ozPerTokenBase; // calculated when annualFeeRate is updated, 9 decimals\n}\n\n// this contract will be deployed on EVM-compatible chains other than Ethereum\ncontract MToken is MTokenBase, ICCClient {\n    using SafeCast for uint256;\n\n    uint64 constant MIN_DELAY = 1 hours;\n    uint64 constant MAX_DELAY = 48 hours;\n\n    uint256 constant TAG_SEND_TOKEN = 2;\n    uint256 constant TAG_SEND_MINT_BUDGET = 3;\n\n    uint64 constant SECONDS_PER_DAY = 24 * 3600; // lastReconcileTime & ozPerTokenBaseTime are rounded to daily boundary\n    uint64 constant DAYS_PER_YEAR = 365; // dailyFeeRate is annualFeeRate / DAYS_PER_YEAR\n    uint64 constant FEE_RATE_BASE = 10 ** 9; // feeRate is 9 decimals\n    uint64 constant OZ_RATIO_BASE = 10 ** 9; // ozPerToken is 9 decimals\n    uint64 constant MAX_ANNUAL_FEE_RATE = FEE_RATE_BASE / 10; // 10%\n\n    event SetDelayRequest(uint64 oldDelay, uint64 newDelay, uint64 et);\n    event SetDelayEffected(uint64 newDelay);\n    event SetOperatorRequest(address oldAddr, address newAddr, uint64 et);\n    event SetOperatorEffected(address newAddr);\n    event SetRevokerRequest(address oldAddr, address newAddr, uint64 et);\n    event SetRevokerEffected(address newAddr);\n    event SetMessengerRequest(address oldAddr, address newAddr, uint64 et);\n    event SetMessengerEffected(address newAddr);\n    event BlockPlaced(address indexed _user);\n    event BlockReleased(address indexed _user);\n    event CCSendToken(address indexed sender, bytes receiver, uint256 value);\n    event CCSendMintBudget(uint112 value);\n    event CCSendMintBudgetManually(uint112 value);\n    event CCReceiveToken(bytes sender, address indexed receiver, uint256 value);\n    event CCReceiveMintBudget(uint112 value);\n    event CCReceiveMintBudgetManually(uint112 value);\n    event Redeem(address indexed customer, uint256 amount, bytes data);\n    event MintRequest(address indexed receiver, uint256 amount, uint256 nonce);\n    event RequestRevoked(bytes32 indexed req);\n    event UpdateAnnualFeeRate(\n        uint64 newAnnualFeeRate,\n        uint64 newOzPerTokenBase,\n        uint64 roundedUpdateTime\n    );\n    event ForcedTransfer(\n        address indexed _from,\n        address indexed _to,\n        uint256 _value,\n        bytes _data,\n        bytes _operatorData\n    );\n\n    error BlockedAccount(address);\n    error NotOperator(address);\n    error NotRevoker(address);\n    error NotMessenger(address);\n    error MintBudgetNotEnough(uint256 budget, uint256 amount);\n    error TransferToContract();\n    error ZeroValue();\n    error ArgsMismatch();\n    error TooEarlyToExecute(address receiver, uint256 amount, uint256 nonce);\n    error CcSendDisabled();\n    error InvalidMsg(uint256 tag);\n    error DelayTooSmall();\n    error DelayTooLarge();\n    error InvalidReceiver(uint256 length);\n    error AnnualFeeRateTooLarge();\n    error OzPerTokenBaseTooLarge();\n    error UnexpectedOzPerToken(uint64 expectedOzPerToken, uint64 actualOzPerToken);\n\n    modifier onlyNotBlocked() {\n        _checkBlocked(_msgSender());\n        _;\n    }\n\n    modifier onlyOperator() {\n        _checkOperator(msg.sender);\n        _;\n    }\n\n    modifier onlyRevoker() {\n        if (msg.sender != revoker) {\n            revert NotRevoker(msg.sender);\n        }\n        _;\n    }\n\n    modifier onlyMessenger() {\n        if (msg.sender != messenger) {\n            revert NotMessenger(msg.sender);\n        }\n        _;\n    }\n\n    function _checkBlocked(address addr) private view {\n        if (isBlocked[addr]) {\n            revert BlockedAccount(addr);\n        }\n    }\n\n    function _checkOperator(address addr) private view {\n        if (addr != operator) {\n            revert NotOperator(addr);\n        }\n    }\n\n    function _checkMintBudget(uint256 amount) private view {\n        if (amount > mintBudget) {\n            revert MintBudgetNotEnough(mintBudget, amount);\n        }\n    }\n\n    function _checkZeroValue(uint256 value) internal pure {\n        if (value == 0) {\n            revert ZeroValue();\n        }\n    }\n\n    function _checkOzPerToken(uint64 expectedOzPerToken) private view {\n        uint64 actualOzPerToken = ozPerToken();\n        if (expectedOzPerToken != actualOzPerToken) {\n            revert UnexpectedOzPerToken(expectedOzPerToken, actualOzPerToken);\n        }\n    }\n\n    function __MTOKEN_init(\n        string memory name,\n        string memory symbol,\n        address _owner,\n        address _operator,\n        uint64 _annualFeeRate,\n        uint64 _ozPerTokenBase\n    ) internal onlyInitializing {\n        __ERC20_init(name, symbol);\n        __ERC20Permit_init(symbol);\n        __Ownable_init(_owner);\n        __MTOKEN_init_unchained(_operator, _annualFeeRate, _ozPerTokenBase);\n    }\n\n    function __MTOKEN_init_unchained(\n        address _operator,\n        uint64 _annualFeeRate,\n        uint64 _ozPerTokenBase\n    ) internal onlyInitializing {\n        operator = _operator;\n\n        checkAnnualFeeRate(_annualFeeRate);\n        if (_ozPerTokenBase > OZ_RATIO_BASE) {\n            revert OzPerTokenBaseTooLarge();\n        }\n\n        uint64 _currDayStartTime = currentDayStartTime();\n        lastReconcileTime = _currDayStartTime;\n        ozPerTokenBaseTime = _currDayStartTime;\n        annualFeeRate = _annualFeeRate;\n        ozPerTokenBase = _ozPerTokenBase;\n    }\n\n    function decimals() public pure override returns (uint8) {\n        return 9;\n    }\n\n    // _annualFeeRate can not be greater than MAX_ANNUAL_FEE_RATE (10%)\n    function checkAnnualFeeRate(uint64 _annualFeeRate) private pure {\n        if (_annualFeeRate > MAX_ANNUAL_FEE_RATE) {\n            revert AnnualFeeRateTooLarge();\n        }\n    }\n\n    // current day start time, rounded to daily boundary\n    function currentDayStartTime() internal view returns (uint64) {\n        return (block.timestamp.toUint64() / SECONDS_PER_DAY) * SECONDS_PER_DAY;\n    }\n\n    // ozPerTokenBase - annualFeeRate*daysElapsed/365\n    function ozPerToken() public view returns (uint64) {\n        uint64 daysElapsed = (block.timestamp.toUint64() - ozPerTokenBaseTime) / SECONDS_PER_DAY;\n        return ozPerTokenBase - (annualFeeRate * daysElapsed) / DAYS_PER_YEAR;\n    }\n\n    // get oz amount from token amount\n    function getOzAmount(uint256 tokenAmount) public view returns (uint256) {\n        return (tokenAmount * ozPerToken()) / OZ_RATIO_BASE;\n    }\n\n    function updateAnnualFeeRate(uint64 _annualFeeRate) public onlyOwner {\n        checkAnnualFeeRate(_annualFeeRate);\n        uint64 _ozPerTokenBase = ozPerToken();\n        uint64 _ozPerTokenBaseTime = currentDayStartTime();\n\n        annualFeeRate = _annualFeeRate;\n        ozPerTokenBase = _ozPerTokenBase;\n        ozPerTokenBaseTime = _ozPerTokenBaseTime;\n        emit UpdateAnnualFeeRate(_annualFeeRate, _ozPerTokenBase, _ozPerTokenBaseTime);\n    }\n\n    function setDisableCcSend(bool b) public onlyOwner {\n        // note: missing event to be added in future update\n        disableCcSend = b;\n    }\n\n    function setDelay(uint64 _delay) public onlyOwner {\n        if (_delay < MIN_DELAY) {\n            revert DelayTooSmall();\n        }\n        if (_delay > MAX_DELAY) {\n            revert DelayTooLarge();\n        }\n\n        uint64 et = etNextDelay;\n        if (_delay == nextDelay && et != 0 && et < block.timestamp) {\n            delay = _delay;\n            emit SetDelayEffected(_delay);\n        } else {\n            uint64 _currDelay = delay;\n            uint64 _etNextDelay = uint64(block.timestamp) + _currDelay;\n            nextDelay = _delay;\n            etNextDelay = _etNextDelay;\n            emit SetDelayRequest(_currDelay, _delay, _etNextDelay);\n        }\n    }\n\n    function setMessenger(address _messenger) public onlyOwner {\n        _checkZeroAddress(_messenger);\n        uint64 et = etNextMessenger;\n        if (_messenger == nextMessenger && et != 0 && et < block.timestamp) {\n            messenger = _messenger;\n            emit SetMessengerEffected(_messenger);\n        } else {\n            nextMessenger = _messenger;\n            uint64 _etNextMessenger = uint64(block.timestamp) + delay;\n            etNextMessenger = _etNextMessenger;\n            emit SetMessengerRequest(messenger, _messenger, _etNextMessenger);\n        }\n    }\n\n    function setRevoker(address _revoker) public onlyOwner {\n        _checkZeroAddress(_revoker);\n        uint64 et = etNextRevoker;\n        if (_revoker == nextRevoker && et != 0 && et < block.timestamp) {\n            revoker = _revoker;\n            emit SetRevokerEffected(_revoker);\n        } else {\n            nextRevoker = _revoker;\n            uint64 _etNextRevoker = uint64(block.timestamp) + delay;\n            etNextRevoker = _etNextRevoker;\n            emit SetRevokerRequest(revoker, _revoker, _etNextRevoker);\n        }\n    }\n\n    function setOperator(address _operator) public onlyOwner {\n        _checkZeroAddress(_operator);\n        uint64 et = etNextOperator;\n        if (_operator == nextOperator && et != 0 && et < block.timestamp) {\n            operator = _operator;\n            emit SetOperatorEffected(_operator);\n        } else {\n            nextOperator = _operator;\n            uint64 _etNextOperator = uint64(block.timestamp) + delay;\n            etNextOperator = _etNextOperator;\n            emit SetOperatorRequest(operator, _operator, _etNextOperator);\n        }\n    }\n\n    function getDelay() internal view override returns (uint64) {\n        return delay;\n    }\n\n    function revokeRequest(bytes32 req) public onlyRevoker {\n        delete requestMap[req];\n        emit RequestRevoked(req);\n    }\n\n    function revokeNextDelay() public onlyRevoker {\n        // note: missing event to be added in future update\n        etNextDelay = 0;\n    }\n\n    function revokeNextOperator() public onlyRevoker {\n        // note: missing event to be added in future update\n        etNextOperator = 0;\n    }\n\n    function revokeNextMessenger() public onlyRevoker {\n        // note: missing event to be added in future update\n        etNextMessenger = 0;\n    }\n\n    function revokeNextRevoker() public onlyOwner {\n        // note: missing event to be added in future update\n        etNextRevoker = 0;\n    }\n\n    function revokeNextUpgrade() public onlyRevoker {\n        // note: missing event to be added in future update\n        etNextUpgradeToAndCall = 0;\n    }\n\n    function addToBlockedList(address _user) public onlyOperator {\n        isBlocked[_user] = true;\n        emit BlockPlaced(_user);\n    }\n\n    function removeFromBlockedList(address _user) public onlyOperator {\n        isBlocked[_user] = false;\n        emit BlockReleased(_user);\n    }\n\n    // mint new tokens to 'receiver'\n    // note: allows minting to blocked recipient by design\n    // note: nonce used off-chain only, no on-chain validation by design\n    function mintTo(\n        address receiver,\n        uint256 amount,\n        uint256 nonce,\n        uint64 expectedOzPerToken\n    ) public onlyOperator returns (bool) {\n        _checkOzPerToken(expectedOzPerToken);\n\n        bytes32 req = keccak256(abi.encode(receiver, amount, nonce));\n        uint256 et = requestMap[req];\n        if (et == 0) {\n            // add a record for this mint-request and exit\n            requestMap[req] = block.timestamp + delay;\n            emit MintRequest(receiver, amount, nonce);\n            return false;\n        } else {\n            if (et < block.timestamp) {\n                delete requestMap[req]; // clear the record\n            } else {\n                revert TooEarlyToExecute(receiver, amount, nonce);\n            }\n        }\n\n        _checkMintBudget(amount);\n        mintBudget = (mintBudget - amount).toUint112();\n        _mint(receiver, amount);\n        return true;\n    }\n\n    // redeem tokens owned by operator\n    // note: allows redeeming for blocked customer by design\n    function redeem(\n        uint256 amount,\n        address customer,\n        uint64 expectedOzPerToken,\n        bytes calldata data\n    ) public onlyOperator {\n        _checkOzPerToken(expectedOzPerToken);\n        _burn(operator, amount);\n        emit Redeem(customer, amount, data);\n        mintBudget += amount.toUint112();\n    }\n\n    // note: allows transfer to blocked recipient by design\n    function transfer(\n        address _recipient,\n        uint256 _amount\n    ) public virtual override onlyNotBlocked returns (bool) {\n        if (_recipient == address(this)) {\n            revert TransferToContract();\n        }\n        return super.transfer(_recipient, _amount);\n    }\n\n    // note: allows transfer to blocked recipient by design\n    function transferFrom(\n        address _sender,\n        address _recipient,\n        uint256 _amount\n    ) public virtual override onlyNotBlocked returns (bool) {\n        if (_recipient == address(this)) {\n            revert TransferToContract();\n        }\n        _checkBlocked(_sender);\n        return super.transferFrom(_sender, _recipient, _amount);\n    }\n\n    // note: allows transfer to blocked recipient by design\n    function multiTransfer(\n        address[] calldata _recipients,\n        uint256[] calldata _values\n    ) public {\n        if (_recipients.length != _values.length) {\n            revert ArgsMismatch();\n        }\n        for (uint256 i = 0; i < _recipients.length; i++) {\n            transfer(_recipients[i], _values[i]);\n        }\n    }\n\n    // forced transfer by owner\n    function forcedTransfer(\n        address _from,\n        address _to,\n        uint256 _value,\n        bytes calldata _data,\n        bytes calldata _extraData\n    ) external onlyOwner {\n        _transfer(_from, _to, _value);\n        emit ForcedTransfer(_from, _to, _value, _data, _extraData);\n    }\n\n    //-------------\n\n    // get cross-chain message to estimate cross-chain fees\n    function msgOfCcSendToken(\n        address sender,\n        bytes calldata receiverBytes,\n        uint256 value\n    ) public view returns (bytes memory message) {\n        _checkBlocked(sender);\n        // note: blocked receiver only checked for EVM chains by design\n        if (receiverBytes.length == 20) {\n            address receiver = address(bytes20(receiverBytes));\n            _checkBlocked(receiver);\n        }\n        bytes memory senderBytes = abi.encodePacked(sender);\n        bytes memory body = abi.encode(senderBytes, receiverBytes, value);\n        return abi.encode(TAG_SEND_TOKEN, body);\n    }\n\n    // called by the messenger contract to initialize a cross-chain token transfer\n    function ccSendToken(\n        address sender,\n        bytes calldata receiver,\n        uint256 value\n    ) public onlyMessenger returns (bytes memory message) {\n        if (disableCcSend) {\n            revert CcSendDisabled();\n        }\n        _checkZeroValue(value);\n        _burn(sender, value);\n        emit CCSendToken(sender, receiver, value);\n        return msgOfCcSendToken(sender, receiver, value);\n    }\n\n    function msgOfCcSendMintBudget(\n        uint112 value\n    ) public view returns (bytes memory message) {\n        _checkMintBudget(value);\n        return abi.encode(TAG_SEND_MINT_BUDGET, abi.encode(value));\n    }\n\n    // called by the messenger contract to initialize a cross-chain mint-budget transfer\n    function ccSendMintBudget(\n        uint112 value\n    ) public onlyMessenger returns (bytes memory message) {\n        // note: we are very careful with any third-party contracts the operator calls\n        // to avoid unintended shuffling of cross-chain mint budgets\n        _checkOperator(tx.origin);\n        _checkZeroValue(value);\n        message = msgOfCcSendMintBudget(value);\n        mintBudget -= value;\n        emit CCSendMintBudget(value);\n    }\n\n    // finish a cross-chain token transfer\n    // note: mints tokens without checking chain's mintBudget; it is by design\n    // that a chain's totalSupply can exceed its mintBudget via cross-chain transfers\n    // note: allows minting to blocked receiver by design\n    function ccReceiveToken(bytes memory message) internal {\n        (bytes memory senderBytes, bytes memory receiverBytes, uint256 value) = abi\n            .decode(message, (bytes, bytes, uint256));\n        if (receiverBytes.length != 20) {\n            revert InvalidReceiver(receiverBytes.length);\n        }\n        address receiver = address(bytes20(receiverBytes));\n        _mint(receiver, value);\n        emit CCReceiveToken(senderBytes, receiver, value);\n    }\n\n    // finish a cross-chain mint-budget transfer\n    function ccReceiveMintBudget(bytes memory message) internal {\n        uint112 value = abi.decode(message, (uint112));\n        mintBudget += value;\n        emit CCReceiveMintBudget(value);\n    }\n\n    // called by the messenger contract to handle a received cross-chain message\n    function ccReceive(bytes calldata message) public onlyMessenger {\n        (uint256 tag, bytes memory data) = abi.decode(message, (uint256, bytes));\n        if (tag == TAG_SEND_TOKEN) {\n            ccReceiveToken(data);\n        } else if (tag == TAG_SEND_MINT_BUDGET) {\n            ccReceiveMintBudget(data);\n        } else {\n            revert InvalidMsg(tag);\n        }\n    }\n\n    //-------------\n    // when cross-chain bridge is not available,\n    // we can use these functions to manually send and receive mint budget\n\n    function ccSendMintBudgetManually(uint112 value) public onlyOperator {\n        _checkZeroValue(value);\n        _checkMintBudget(value);\n        mintBudget -= value;\n        emit CCSendMintBudgetManually(value);\n    }\n\n    function ccReceiveMintBudgetManually(uint112 value) public onlyOperator {\n        mintBudget += value;\n        emit CCReceiveMintBudgetManually(value);\n    }\n}\n"},{"file_path":"contracts/interfaces/ICCClient.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.24;\n\ninterface ICCClient {\n    function ccReceive(bytes calldata message) external;\n\n    function msgOfCcSendToken(\n        address sender,\n        bytes calldata receiver,\n        uint256 value\n    ) external view returns (bytes memory message);\n\n    function ccSendToken(\n        address sender,\n        bytes calldata receiver,\n        uint256 value\n    ) external returns (bytes memory message);\n\n    function msgOfCcSendMintBudget(\n        uint112 value\n    ) external view returns (bytes memory message);\n\n    function ccSendMintBudget(\n        uint112 value\n    ) external returns (bytes memory message);\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"AnnualFeeRateTooLarge","type":"error"},{"inputs":[],"name":"ArgsMismatch","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"BlockedAccount","type":"error"},{"inputs":[],"name":"CcSendDisabled","type":"error"},{"inputs":[],"name":"DelayTooLarge","type":"error"},{"inputs":[],"name":"DelayTooSmall","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[{"internalType":"uint256","name":"tag","type":"uint256"}],"name":"InvalidMsg","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"InvalidReceiver","type":"error"},{"inputs":[],"name":"InvalidUpgradeToAndCallData","type":"error"},{"inputs":[],"name":"InvalidUpgradeToAndCallImpl","type":"error"},{"inputs":[{"internalType":"uint256","name":"budget","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MintBudgetNotEnough","type":"error"},{"inputs":[],"name":"MintBudgetNotZero","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"NotFeeCollector","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"NotMessenger","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"NotOperator","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"NotRevoker","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":"OzPerTokenBaseTooLarge","type":"error"},{"inputs":[{"internalType":"int256","name":"maxOzAmount","type":"int256"},{"internalType":"uint256","name":"ozAmount","type":"uint256"}],"name":"ReserveNotEnough","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"TooEarlyToExecute","type":"error"},{"inputs":[],"name":"TooEarlyToReconcile","type":"error"},{"inputs":[],"name":"TooEarlyToUpgradeToAndCall","type":"error"},{"inputs":[],"name":"TransferToContract","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[{"internalType":"uint64","name":"expectedOzPerToken","type":"uint64"},{"internalType":"uint64","name":"actualOzPerToken","type":"uint64"}],"name":"UnexpectedOzPerToken","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroValue","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":"_user","type":"address"}],"name":"BlockPlaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"}],"name":"BlockReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"value","type":"uint112"}],"name":"CCReceiveMintBudget","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"value","type":"uint112"}],"name":"CCReceiveMintBudgetManually","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"sender","type":"bytes"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"CCReceiveToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"value","type":"uint112"}],"name":"CCSendMintBudget","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"value","type":"uint112"}],"name":"CCSendMintBudgetManually","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"bytes","name":"receiver","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"CCSendToken","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","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":"bytes","name":"_data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_operatorData","type":"bytes"}],"name":"ForcedTransfer","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":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"MintRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"lastReconcileTime","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"thisReconcileTime","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReconcileSupply","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"customer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"req","type":"bytes32"}],"name":"RequestRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"newDelay","type":"uint64"}],"name":"SetDelayEffected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"oldDelay","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"newDelay","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"et","type":"uint64"}],"name":"SetDelayRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddr","type":"address"}],"name":"SetFallbackFeedEffected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":false,"internalType":"address","name":"newAddr","type":"address"},{"indexed":false,"internalType":"uint64","name":"et","type":"uint64"}],"name":"SetFallbackFeedRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddr","type":"address"}],"name":"SetFeeCollectorEffected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":false,"internalType":"address","name":"newAddr","type":"address"},{"indexed":false,"internalType":"uint64","name":"et","type":"uint64"}],"name":"SetFeeCollectorRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddr","type":"address"}],"name":"SetMessengerEffected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":false,"internalType":"address","name":"newAddr","type":"address"},{"indexed":false,"internalType":"uint64","name":"et","type":"uint64"}],"name":"SetMessengerRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddr","type":"address"}],"name":"SetOperatorEffected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":false,"internalType":"address","name":"newAddr","type":"address"},{"indexed":false,"internalType":"uint64","name":"et","type":"uint64"}],"name":"SetOperatorRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddr","type":"address"}],"name":"SetReserveFeedEffected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":false,"internalType":"address","name":"newAddr","type":"address"},{"indexed":false,"internalType":"uint64","name":"et","type":"uint64"}],"name":"SetReserveFeedRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddr","type":"address"}],"name":"SetRevokerEffected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":false,"internalType":"address","name":"newAddr","type":"address"},{"indexed":false,"internalType":"uint64","name":"et","type":"uint64"}],"name":"SetRevokerRequest","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":false,"internalType":"uint64","name":"newAnnualFeeRate","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"newOzPerTokenBase","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"roundedUpdateTime","type":"uint64"}],"name":"UpdateAnnualFeeRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"UpgradeToAndCallRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"addToBlockedList","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":[],"name":"annualFeeRate","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"message","type":"bytes"}],"name":"ccReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint112","name":"value","type":"uint112"}],"name":"ccReceiveMintBudgetManually","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint112","name":"value","type":"uint112"}],"name":"ccSendMintBudget","outputs":[{"internalType":"bytes","name":"message","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint112","name":"value","type":"uint112"}],"name":"ccSendMintBudgetManually","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes","name":"receiver","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"ccSendToken","outputs":[{"internalType":"bytes","name":"message","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint112","name":"mintBudgetDelta","type":"uint112"}],"name":"decreaseMintBudget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"delay","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableCcSend","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etNextDelay","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etNextFallbackFeed","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etNextFeeCollector","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etNextMessenger","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etNextOperator","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etNextReserveFeed","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etNextRevoker","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etNextUpgradeToAndCall","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fallbackFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"forcedTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"getOzAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint112","name":"mintBudgetDelta","type":"uint112"}],"name":"increaseMintBudget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_reserveFeed","type":"address"},{"internalType":"uint64","name":"_annualFeeRate","type":"uint64"},{"internalType":"uint64","name":"_ozPerTokenBase","type":"uint64"},{"internalType":"address","name":"_feeCollector","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isBlocked","outputs":[{"internalType":"bool","name":"blocked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastReconcileTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messenger","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintBudget","outputs":[{"internalType":"uint112","name":"","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint64","name":"expectedOzPerToken","type":"uint64"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint112","name":"value","type":"uint112"}],"name":"msgOfCcSendMintBudget","outputs":[{"internalType":"bytes","name":"message","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes","name":"receiverBytes","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"msgOfCcSendToken","outputs":[{"internalType":"bytes","name":"message","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_recipients","type":"address[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"multiTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextDelay","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextFallbackFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextFeeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextMessenger","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextReserveFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextRevoker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextUpgradeToAndCallDataHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ozPerToken","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ozPerTokenBase","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ozPerTokenBaseTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint112","name":"amount","type":"uint112"}],"name":"reconcileSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"customer","type":"address"},{"internalType":"uint64","name":"expectedOzPerToken","type":"uint64"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"removeFromBlockedList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestHash","type":"bytes32"}],"name":"requestMap","outputs":[{"internalType":"uint256","name":"effectiveTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newImplementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"requestUpgradeToAndCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revokeFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeNextDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeNextFallbackFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeNextMessenger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeNextOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeNextReserveFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeNextRevoker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeNextUpgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"req","type":"bytes32"}],"name":"revokeRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revoker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_delay","type":"uint64"}],"name":"setDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"b","type":"bool"}],"name":"setDisableCcSend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setFallbackFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_messenger","type":"address"}],"name":"setMessenger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setReserveFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_revoker","type":"address"}],"name":"setRevoker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenObligation","outputs":[{"internalType":"uint112","name":"","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","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":[{"internalType":"uint64","name":"_annualFeeRate","type":"uint64"}],"name":"updateAnnualFeeRate","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"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":null}