{"file_path":"src/UsdscToken.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.26;\n\nimport {MYieldToOne} from \"evm-m-extensions/projects/yieldToOne/MYieldToOne.sol\";\n\n/**\n *\n * ██╗   ██╗███████╗██████╗ ███████╗ ██████╗\n * ██║   ██║██╔════╝██╔══██╗██╔════╝██╔════╝\n * ██║   ██║███████╗██║  ██║███████╗██║\n * ██║   ██║╚════██║██║  ██║╚════██║██║\n * ╚██████╔╝███████║██████╔╝███████║╚██████╗\n *  ╚═════╝ ╚══════╝╚═════╝ ╚══════╝ ╚═════╝\n *\n */\n\n/**\n * @title UsdscToken\n * @notice M extension for the USDSC token.\n * @author M0 labs, Startale\n */\ncontract UsdscToken is MYieldToOne {\n    /* ============ Custom Errors ============ */\n    error YieldClaimerCannotBeZeroAddress();\n\n    /* ============ Variables ============ */\n    bytes32 public constant YIELD_CLAIMER_ROLE = keccak256(\"YIELD_CLAIMER_ROLE\");\n\n    /* ============ Constructor ============ */\n    /// @custom:oz-upgrades-unsafe-allow constructor\n    constructor(address mToken_, address swapFacility_) MYieldToOne(mToken_, swapFacility_) {\n        _disableInitializers();\n    }\n\n    /* ============ Initializer ============ */\n    /**\n     * @notice Initializes the USDSC token.\n     * @param name The name of the token.\n     * @param symbol The symbol of the token.\n     * @param yieldRecipient The address to send the yield to.\n     * @param admin The address of the admin.\n     * @param freezeManager The address of the freeze manager.\n     * @param yieldRecipientManager The address of the yield recipient manager.\n     * @param yieldClaimer The address of the yield claimer. Must be granted the YIELD_CLAIMER_ROLE.\n     */\n    function initialize(\n        string memory name,\n        string memory symbol,\n        address yieldRecipient,\n        address admin,\n        address freezeManager,\n        address yieldRecipientManager,\n        address yieldClaimer\n    ) external initializer {\n        if (yieldClaimer == address(0)) revert YieldClaimerCannotBeZeroAddress();\n        __MYieldToOne_init(\n            name, // \"Startale USD\"\n            symbol, // \"USDSC\"\n            yieldRecipient, // Where all the yield is sent to\n            admin, // Default admin address\n            freezeManager, // Freeze manager address\n            yieldRecipientManager // Yield recipient manager address\n        );\n        _grantRole(YIELD_CLAIMER_ROLE, yieldClaimer);\n    }\n\n    /**\n     * @dev Hook called before claiming yield.\n     * @dev MUST only be callable by the `YIELD_CLAIMER_ROLE`.\n     */\n    function _beforeClaimYield() internal view override onlyRole(YIELD_CLAIMER_ROLE) {}\n}\n","deployed_bytecode":"0x608060405234801561000f575f80fd5b5060043610610372575f3560e01c80638d1fdf2f116101d4578063c3b6f93911610109578063d547741f116100a9578063e56f2fe411610079578063e56f2fe4146109db578063e5839836146109ee578063e94a010214610a45578063ef55bec614610aa9575f80fd5b8063d547741f1461092a578063d91694871461093d578063dd62ed3e14610964578063e3ee160e146109c8575f80fd5b8063c967891a116100e4578063c967891a146108bf578063cc4c5b64146108c7578063cf09299514610904578063d505accf14610917575f80fd5b8063c3b6f9391461087d578063c9144ddb146108a4578063c91f0c53146108ac575f80fd5b8063a8afc01f11610174578063ace150a51161014f578063ace150a5146107f8578063ae06b7e41461080b578063b7b7289914610857578063bf376c7a1461086a575f80fd5b8063a8afc01f146107ca578063a9059cbb146107d2578063aad12029146107e5575f80fd5b80639fd5a6cf116101af5780639fd5a6cf14610776578063a08cb48b14610789578063a0cc6a681461079c578063a217fddf146107c3575f80fd5b80638d1fdf2f146106f757806391d148541461070a57806395d89b411461076e575f80fd5b806336568abe116102aa5780635a049a701161024a5780637ecebe00116102255780637ecebe001461064e5780637f2eecc3146106a257806384b0196e146106c957806388b7ab63146106e4575f80fd5b80635a049a70146105c057806363f15649146105d357806370a08231146105fa575f80fd5b80634259dff9116102855780634259dff91461056057806345c8b1a61461058757806345cf012d1461059a578063532992c5146105ad575f80fd5b806336568abe1461053257806339f4769314610545578063406cf22914610558575f80fd5b8063248a9ca3116103155780632f2ff15d116102f05780632f2ff15d146104bc57806330adf81f146104cf578063313ce567146104f65780633644e5151461052a575f80fd5b8063248a9ca31461044a57806326987b601461048b57806328593984146104b4575f80fd5b80630cc01180116103505780630cc01180146103c6578063170e2070146103fb57806318160ddd1461041057806323b872dd14610437575f80fd5b806301ffc9a71461037657806306fdde031461039e578063095ea7b3146103b3575b5f80fd5b6103896103843660046139bc565b610abc565b60405190151581526020015b60405180910390f35b6103a6610b54565b6040516103959190613a47565b6103896103c1366004613a7a565b610c07565b6103ed7f2a2b1d77eeac958af6746e7b01f9bca503b7874430c64ff501c9b54aeb1a732e81565b604051908152602001610395565b61040e610409366004613aa4565b610c1c565b005b7fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af100546103ed565b610389610445366004613b15565b610cb0565b6103ed610458366004613b53565b5f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b610493610dbf565b6040516fffffffffffffffffffffffffffffffff9091168152602001610395565b6103ed610e52565b61040e6104ca366004613b6a565b610ea2565b6103ed7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b7fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da1015460405160ff9091168152602001610395565b6103ed610eeb565b61040e610540366004613b6a565b610f30565b61040e610553366004613a7a565b610f8e565b6103ed611077565b6103ed7f4a5e9eb1ba56d04185ff75ebf0f4f42a3d7c88c35b4a90fa278437e0c9bdceca81565b61040e610595366004613b98565b611118565b61040e6105a8366004613b98565b61116c565b61040e6105bb366004613bb3565b6111a8565b61040e6105ce366004613bfb565b6111c7565b6103ed7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3581565b6103ed610608366004613b98565b73ffffffffffffffffffffffffffffffffffffffff165f9081527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af102602052604090205490565b6103ed61065c366004613b98565b73ffffffffffffffffffffffffffffffffffffffff165f9081527f1b21ba3f0a2135d61c468900b54084f04af8111bce0f8bbb6ab8c46d11afbd00602052604090205490565b6103ed7fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de881565b6106d16111e7565b6040516103959796959493929190613c47565b61040e6106f2366004613de2565b611342565b61040e610705366004613b98565b611371565b610389610718366004613b6a565b5f9182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6103a66113c5565b61040e610784366004613e65565b6113ed565b61040e610797366004613ed6565b6113fd565b6103ed7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b6103ed5f81565b61040e611427565b6103896107e0366004613a7a565b611548565b61040e6107f3366004613aa4565b611554565b61040e610806366004613ed6565b6115e1565b6108327f000000000000000000000000b6807116b3b1b321a390594e31ecd6e0076f627881565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610395565b61040e610865366004613f3c565b611601565b61040e610878366004613a7a565b611619565b6108327f000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b81565b6103896116ff565b61040e6108ba366004613f91565b6117ad565b61040e611999565b7fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1015473ffffffffffffffffffffffffffffffffffffffff16610832565b61040e610912366004613de2565b611a8a565b61040e610925366004614052565b611aaa565b61040e610938366004613b6a565b611aba565b6103ed7f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b6103ed6109723660046140bc565b73ffffffffffffffffffffffffffffffffffffffff9182165f9081527fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da1006020908152604080832093909416825291909152205490565b61040e6109d63660046140e8565b611afd565b61040e6109e9366004614167565b611b28565b6103896109fc366004613b98565b73ffffffffffffffffffffffffffffffffffffffff165f9081527f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce00602052604090205460ff1690565b610389610a53366004613a7a565b73ffffffffffffffffffffffffffffffffffffffff919091165f9081527f1116a1d33aa5fb91b2652b3b0fdb63704173742d6dbecaf4256ebe33a488860060209081526040808320938352929052205460ff1690565b61040e610ab73660046140e8565b611c9b565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610b4e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60607f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea1005b6002018054610b8690614215565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb290614215565b8015610bfd5780601f10610bd457610100808354040283529160200191610bfd565b820191905f5260205f20905b815481529060010190602001808311610be057829003601f168201915b5050505050905090565b5f610c13338484611cbb565b50600192915050565b7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b35610c4681611cd1565b7f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce005f5b83811015610ca957610ca182868684818110610c8757610c87614266565b9050602002016020810190610c9c9190613b98565b611cde565b600101610c69565b5050505050565b73ffffffffffffffffffffffffffffffffffffffff83165f9081527fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da100602081815260408084203385529091528220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610da85783811015610d75576040517f192b9e4e00000000000000000000000000000000000000000000000000000000815233600482015260248101829052604481018590526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff86165f90815260208381526040808320338452909152902084820390555b610db3868686611d8f565b50600195945050505050565b5f7f000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b73ffffffffffffffffffffffffffffffffffffffff166326987b606040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e29573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e4d9190614293565b905090565b5f80610e5d30611e7d565b90505f610e887fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1005490565b9050808211610e97575f610e9b565b8082035b9250505090565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154610edb81611cd1565b610ee58383611f2f565b50505050565b7f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea10080545f91904614610f2457610f1f61204d565b610f2a565b80600101545b91505090565b73ffffffffffffffffffffffffffffffffffffffff81163314610f7f576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f898282612108565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000b6807116b3b1b321a390594e31ecd6e0076f62781614610ffd576040517f2bfe1b5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110733373ffffffffffffffffffffffffffffffffffffffff1663d737d0c76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611049573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061106d91906142c2565b826121e4565b5050565b5f6110806122bf565b5f611089610e52565b9050805f03611099575f91505090565b6040518181527fd1c22369a95f91ae16576036bba6372736ba109f257ad94dccb89e141762e2659060200160405180910390a161111361110d7fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1015473ffffffffffffffffffffffffffffffffffffffff1690565b826122e9565b919050565b7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3561114281611cd1565b6110737f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce0083611cde565b7f4a5e9eb1ba56d04185ff75ebf0f4f42a3d7c88c35b4a90fa278437e0c9bdceca61119681611cd1565b61119e611077565b5061107382612396565b6111bd846111b686866124bc565b8484612537565b610ee5848461254b565b6111dd856111d587876124bc565b8585856125f8565b610ca9858561254b565b5f606080828080837f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea10060020146305f80604051908082528060200260200182016040528015611240578160200160208202803683370190505b507f0f00000000000000000000000000000000000000000000000000000000000000949392919084805461127390614215565b80601f016020809104026020016040519081016040528092919081815260200182805461129f90614215565b80156112ea5780601f106112c1576101008083540402835291602001916112ea565b820191905f5260205f20905b8154815290600101906020018083116112cd57829003601f168201915b505050505094506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525093929190965096509650965096509650965090919293949596565b61135a87611354898989898989612608565b8361268f565b6113688787878787876126da565b50505050505050565b7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3561139b81611cd1565b6110737f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce008361275d565b60607fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da100610b78565b610ca9856113548787878761280d565b61140f886111b68a8a8a8a8a8a612608565b61141d8888888888886126da565b5050505050505050565b61142f6116ff565b611465576040517fb019ea3500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fee580fdb4da10ea17aa673e6f5c8c2370b4166d6a94bc88900e5a96d0589e3ce61148e610dbf565b6040516fffffffffffffffffffffffffffffffff909116815260200160405180910390a16040517f81399be40000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b73ffffffffffffffffffffffffffffffffffffffff16906381399be4906024015f604051808303815f87803b158015611536575f80fd5b505af1158015610ee5573d5f803e3d5ffd5b5f610c13338484611d8f565b7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3561157e81611cd1565b7f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce005f5b83811015610ca9576115d9828686848181106115bf576115bf614266565b90506020020160208101906115d49190613b98565b61275d565b6001016115a1565b6115f3886111b68a8a8a8a8a8a6128d7565b61141d888888888888612953565b61160f8361135485856124bc565b610f89838361254b565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000b6807116b3b1b321a390594e31ecd6e0076f62781614611688576040517f2bfe1b5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110733373ffffffffffffffffffffffffffffffffffffffff1663d737d0c76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f891906142c2565b8383612a8b565b6040517f84af270f0000000000000000000000000000000000000000000000000000000081523060048201525f907f000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b73ffffffffffffffffffffffffffffffffffffffff16906384af270f90602401602060405180830381865afa158015611789573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e4d91906142dd565b5f6117b6612b6d565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156117e25750825b90505f8267ffffffffffffffff1660011480156117fe5750303b155b90508115801561180c575080155b15611843576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156118a45784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b73ffffffffffffffffffffffffffffffffffffffff86166118f1576040517f21c4e3d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118ff8c8c8c8c8c8c612b95565b6119297f2a2b1d77eeac958af6746e7b01f9bca503b7874430c64ff501c9b54aeb1a732e87611f2f565b50831561198b5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050565b6119a16116ff565b156119d8576040517f7a42736800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f5098de6eb11dbd1127cf4dcd5e960e3944d48a7570b9b1939cff715cb35c5a18611a01610dbf565b6040516fffffffffffffffffffffffffffffffff909116815260200160405180910390a17f000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b73ffffffffffffffffffffffffffffffffffffffff1663a36e40fc6040518163ffffffff1660e01b81526004015f604051808303815f87803b158015611536575f80fd5b611a9c876113548989898989896128d7565b611368878787878787612953565b611368876111d58989898961280d565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154611af381611cd1565b610ee58383612108565b611b0f896111d58b8b8b8b8b8b6128d7565b611b1d898989898989612953565b505050505050505050565b5f611b31612b6d565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f81158015611b5d5750825b90505f8267ffffffffffffffff166001148015611b795750303b155b905081158015611b87575080155b15611bbe576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315611c1f5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b611c2d8b8b8b8b8b8b612b95565b8315611c8e5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b611cad896111d58b8b8b8b8b8b612608565b611b1d8989898989896126da565b611cc6838383612c88565b610f89838383612cbd565b611cdb8133612d41565b50565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020839052604090205460ff16611d0e575050565b73ffffffffffffffffffffffffffffffffffffffff81165f818152602084815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905590514281527f07d647ad688e085159820c1d8d030e5765cdc5274d4ee4065c6066b388a2ef5991015b60405180910390a25050565b611d9882612de7565b611da3838383612e4c565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611e0291815260200190565b60405180910390a3805f03611e1657505050565b611e208382612e81565b73ffffffffffffffffffffffffffffffffffffffff8084165f9081527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af102602052604080822080548590039055918416815220805482019055505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301525f917f000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b909116906370a0823190602401602060405180830381865afa158015611f0b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b4e91906142fc565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff16612044575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055611fe03390565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610b4e565b5f915050610b4e565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea1006002016040516120a09190614313565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff1615612044575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610b4e565b6121ed81612f25565b6121f78282612f61565b6122013382612e81565b61220b3382612f8b565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b73ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303815f875af115801561229b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f8991906142dd565b7f2a2b1d77eeac958af6746e7b01f9bca503b7874430c64ff501c9b54aeb1a732e611cdb81611cd1565b73ffffffffffffffffffffffffffffffffffffffff82165f8181527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af102602090815260408083208054860190557fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1008054860181559051858152909392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff81166123e3576040517f5dfd400c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af101547fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1009073ffffffffffffffffffffffffffffffffffffffff9081169083160361244b575050565b6001810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091556040517f77f12a3c9f87d4602fe59bb8d2b68c7b516e0cacba414a53e74ea75d435dc18d905f90a25050565b604080517f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429602082015273ffffffffffffffffffffffffffffffffffffffff841691810191909152606081018290525f90612530906080015b60405160208183030381529060405280519060200120613030565b9392505050565b610ee561254685858585613091565b6130cc565b6125558282613290565b73ffffffffffffffffffffffffffffffffffffffff82165f8181527f1116a1d33aa5fb91b2652b3b0fdb63704173742d6dbecaf4256ebe33a48886006020908152604080832085845290915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055518392917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a35050565b610ca96125468686868686613338565b604080517fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8602082015273ffffffffffffffffffffffffffffffffffffffff8089169282019290925290861660608201526080810185905260a0810184905260c0810183905260e081018290525f906126849061010001612515565b979650505050505050565b5f61269b848484613380565b90505f8160058111156126b0576126b06143a2565b036126bb5750505050565b6126c68484846133c4565b156126d15750505050565b610ee5816130cc565b3373ffffffffffffffffffffffffffffffffffffffff861614612747576040517f1c5939f300000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff86166024820152604401610d6c565b612755868686868686612953565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020839052604090205460ff161561278e575050565b73ffffffffffffffffffffffffffffffffffffffff81165f818152602084905260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f68e0d8c112165d0949ce87205b719ed7d98c7401866c34a159f7c67c6f5620e790611d839042815260200190565b5f6128178261350c565b612822858585611cbb565b73ffffffffffffffffffffffffffffffffffffffff8086165f8181527f1b21ba3f0a2135d61c468900b54084f04af8111bce0f8bbb6ab8c46d11afbd00602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928101929092529181019290925291861660608201526080810185905260a081019190915260c081018390526128ce9060e001612515565b95945050505050565b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267602082015273ffffffffffffffffffffffffffffffffffffffff8089169282019290925290861660608201526080810185905260a0810184905260c0810183905260e081018290525f906126849061010001612515565b824211612995576040517f498ff9a200000000000000000000000000000000000000000000000000000000815242600482015260248101849052604401610d6c565b8142106129d7576040517fb3fcd33e00000000000000000000000000000000000000000000000000000000815242600482015260248101839052604401610d6c565b6129e18682613290565b73ffffffffffffffffffffffffffffffffffffffff86165f8181527f1116a1d33aa5fb91b2652b3b0fdb63704173742d6dbecaf4256ebe33a48886006020908152604080832085845290915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055518392917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a3612755868686611d8f565b612a9482612de7565b612a9d81612f25565b612aa8838383612c88565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b73ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303815f875af1158015612b3e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b6291906142dd565b50610f8982826122e9565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b4e565b612b9d61354f565b73ffffffffffffffffffffffffffffffffffffffff8116612bea576040517f09d50edf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316612c37576040517f7289db0e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612c41868661358f565b612c4a826135a3565b612c5384612396565b612c5d5f84611f2f565b506113687f4a5e9eb1ba56d04185ff75ebf0f4f42a3d7c88c35b4a90fa278437e0c9bdceca82611f2f565b7f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce00612cb38185613622565b610ee58184613622565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181527fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da100602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101612389565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16611073576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610d6c565b73ffffffffffffffffffffffffffffffffffffffff8116611cdb576040517f17858bbe00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610d6c565b7f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce00612e778133613622565b612cb38185613622565b73ffffffffffffffffffffffffffffffffffffffff82165f9081527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af102602052604090205481811015610f89576040517fdb42144d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401610d6c565b805f03611cdb576040517f77b8dde300000000000000000000000000000000000000000000000000000000815260048101829052602401610d6c565b6110737f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce0083613622565b73ffffffffffffffffffffffffffffffffffffffff82165f8181527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af10260209081526040808320805486900390557fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1008054869003815590518581529093917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101612389565b5f613039610eeb565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b5f805f61309f868686613699565b90925090505f8260058111156130b7576130b76143a2565b146130c25781612684565b61268487826136e0565b5f8160058111156130df576130df6143a2565b036130e75750565b60018160058111156130fb576130fb6143a2565b03613132576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002816005811115613146576131466143a2565b0361317d576040517f4be6321b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003816005811115613191576131916143a2565b036131c8576040517fbf4bf5b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048160058111156131dc576131dc6143a2565b03613213576040517fff551e8900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005816005811115613227576132276143a2565b0361325e576040517f10c74b0300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f9081527f1116a1d33aa5fb91b2652b3b0fdb63704173742d6dbecaf4256ebe33a48886006020908152604080832084845290915290205460ff1615611073576040517fd309466d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260248101829052604401610d6c565b5f805f61334787878787613723565b90925090505f82600581111561335f5761335f6143a2565b1461336a5781613374565b61337488826136e0565b98975050505050505050565b5f805f61338d8585613830565b90925090505f8260058111156133a5576133a56143a2565b146133b057816133ba565b6133ba86826136e0565b9695505050505050565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1685856040516024016133f19291906143cf565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e000000000000000000000000000000000000000000000000000000001790525161347291906143ef565b5f60405180830381855afa9150503d805f81146134aa576040519150601f19603f3d011682016040523d82523d5f602084013e6134af565b606091505b50915091508180156134c357506020815110155b80156133ba575080517f1626ba7e000000000000000000000000000000000000000000000000000000009061350190830160209081019084016142fc565b149695505050505050565b80421115611cdb576040517ff88f049000000000000000000000000000000000000000000000000000000000815260048101829052426024820152604401610d6c565b613557613874565b61358d576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61359761354f565b61107382826006613892565b6135ab61354f565b73ffffffffffffffffffffffffffffffffffffffff81166135f8576040517f6cbbd1d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110737f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3582611f2f565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020839052604090205460ff1615611073576040517f4f2a367e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610d6c565b5f80601b60ff84901c017f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84166136d287838884613723565b935093505050935093915050565b5f8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461371b576005612530565b505f92915050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156137585750600390505f613827565b8460ff16601b1415801561377057508460ff16601c14155b156137805750600490505f613827565b604080515f81526020810180835288905260ff871691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa1580156137d0573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161561381e575f81613822565b60015f5b915091505b94509492505050565b5f8082516041146138465750600290505f61386d565b6020830151604084015160608501515f1a919061386587848484613723565b945094505050505b9250929050565b5f61387d612b6d565b5468010000000000000000900460ff16919050565b61389a61354f565b6138a38361393b565b7fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da10180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff83161790557fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da1007fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da102610ca98482614449565b61394361354f565b611cdb8161394f61354f565b611cdb8161395b61354f565b7f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea1007f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea1026139a78382614449565b504681556139b361204d565b60019091015550565b5f602082840312156139cc575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612530575f80fd5b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61253060208301846139fb565b73ffffffffffffffffffffffffffffffffffffffff81168114611cdb575f80fd5b5f8060408385031215613a8b575f80fd5b8235613a9681613a59565b946020939093013593505050565b5f8060208385031215613ab5575f80fd5b823567ffffffffffffffff811115613acb575f80fd5b8301601f81018513613adb575f80fd5b803567ffffffffffffffff811115613af1575f80fd5b8560208260051b8401011115613b05575f80fd5b6020919091019590945092505050565b5f805f60608486031215613b27575f80fd5b8335613b3281613a59565b92506020840135613b4281613a59565b929592945050506040919091013590565b5f60208284031215613b63575f80fd5b5035919050565b5f8060408385031215613b7b575f80fd5b823591506020830135613b8d81613a59565b809150509250929050565b5f60208284031215613ba8575f80fd5b813561253081613a59565b5f805f8060808587031215613bc6575f80fd5b8435613bd181613a59565b966020860135965060408601359560600135945092505050565b803560ff81168114611113575f80fd5b5f805f805f60a08688031215613c0f575f80fd5b8535613c1a81613a59565b945060208601359350613c2f60408701613beb565b94979396509394606081013594506080013592915050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613c8160e08301896139fb565b8281036040840152613c9381896139fb565b6060840188905273ffffffffffffffffffffffffffffffffffffffff8716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015613cf5578351835260209384019390920191600101613cd7565b50909b9a5050505050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f830112613d42575f80fd5b8135602083015f8067ffffffffffffffff841115613d6257613d62613d06565b506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85018116603f0116810181811067ffffffffffffffff82111715613daf57613daf613d06565b604052838152905080828401871015613dc6575f80fd5b838360208301375f602085830101528094505050505092915050565b5f805f805f805f60e0888a031215613df8575f80fd5b8735613e0381613a59565b96506020880135613e1381613a59565b955060408801359450606088013593506080880135925060a0880135915060c088013567ffffffffffffffff811115613e4a575f80fd5b613e568a828b01613d33565b91505092959891949750929550565b5f805f805f60a08688031215613e79575f80fd5b8535613e8481613a59565b94506020860135613e9481613a59565b93506040860135925060608601359150608086013567ffffffffffffffff811115613ebd575f80fd5b613ec988828901613d33565b9150509295509295909350565b5f805f805f805f80610100898b031215613eee575f80fd5b8835613ef981613a59565b97506020890135613f0981613a59565b979a9799505050506040860135956060810135956080820135955060a0820135945060c0820135935060e0909101359150565b5f805f60608486031215613f4e575f80fd5b8335613f5981613a59565b925060208401359150604084013567ffffffffffffffff811115613f7b575f80fd5b613f8786828701613d33565b9150509250925092565b5f805f805f805f60e0888a031215613fa7575f80fd5b873567ffffffffffffffff811115613fbd575f80fd5b613fc98a828b01613d33565b975050602088013567ffffffffffffffff811115613fe5575f80fd5b613ff18a828b01613d33565b965050604088013561400281613a59565b9450606088013561401281613a59565b9350608088013561402281613a59565b925060a088013561403281613a59565b915060c088013561404281613a59565b8091505092959891949750929550565b5f805f805f805f60e0888a031215614068575f80fd5b873561407381613a59565b9650602088013561408381613a59565b9550604088013594506060880135935061409f60808901613beb565b9699959850939692959460a0840135945060c09093013592915050565b5f80604083850312156140cd575f80fd5b82356140d881613a59565b91506020830135613b8d81613a59565b5f805f805f805f805f6101208a8c031215614101575f80fd5b893561410c81613a59565b985060208a013561411c81613a59565b975060408a0135965060608a0135955060808a0135945060a08a0135935061414660c08b01613beb565b989b979a50959894979396929550929360e081013593506101000135919050565b5f805f805f8060c0878903121561417c575f80fd5b863567ffffffffffffffff811115614192575f80fd5b61419e89828a01613d33565b965050602087013567ffffffffffffffff8111156141ba575f80fd5b6141c689828a01613d33565b95505060408701356141d781613a59565b935060608701356141e781613a59565b925060808701356141f781613a59565b915060a087013561420781613a59565b809150509295509295509295565b600181811c9082168061422957607f821691505b602082108103614260577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f602082840312156142a3575f80fd5b81516fffffffffffffffffffffffffffffffff81168114612530575f80fd5b5f602082840312156142d2575f80fd5b815161253081613a59565b5f602082840312156142ed575f80fd5b81518015158114612530575f80fd5b5f6020828403121561430c575f80fd5b5051919050565b5f80835461432081614215565b600182168015614337576001811461436a57614397565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083168652811515820286019350614397565b865f5260205f205f5b8381101561438f57815488820152600190910190602001614373565b505081860193505b509195945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b828152604060208201525f6143e760408301846139fb565b949350505050565b5f82518060208501845e5f920191825250919050565b601f821115610f8957805f5260205f20601f840160051c8101602085101561442a5750805b601f840160051c820191505b81811015610ca9575f8155600101614436565b815167ffffffffffffffff81111561446357614463613d06565b614477816144718454614215565b84614405565b6020601f8211600181146144c8575f83156144925750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455610ca9565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b8281101561451557878501518255602094850194600190920191016144f5565b508482101561455157868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b0190555056fea264697066735822122008143f4ba872985ebc59e5d66ea604d07d621c3b2dd6f2e3f75257f8c97dc22264736f6c634300081a0033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"cancun","libraries":{},"metadata":{"appendCBOR":true,"bytecodeHash":"ipfs","useLiteralContent":false},"optimizer":{"enabled":true,"runs":999999},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["@m0-foundation/=lib/evm-m-extensions/src/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@openzeppelin/contracts-upgradeable/=lib/evm-m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/foundry-upgrades/=lib/evm-m-extensions/lib/openzeppelin-foundry-upgrades/","common/=lib/evm-m-extensions/lib/common/","evm-m-extensions/=lib/evm-m-extensions/src/","evm-m-extensions/script/=lib/evm-m-extensions/script/","forge-std/=lib/forge-std/src/","@ensdomains/=lib/evm-m-extensions/lib/uniswap-v4-periphery/lib/v4-core/node_modules/@ensdomains/","@uniswap/v4-core/=lib/evm-m-extensions/lib/uniswap-v4-periphery/lib/v4-core/","ds-test/=lib/evm-m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","forge-gas-snapshot/=lib/evm-m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/src/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","hardhat/=lib/evm-m-extensions/lib/uniswap-v4-periphery/lib/v4-core/node_modules/hardhat/","openzeppelin-contracts-upgradeable/=lib/evm-m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","openzeppelin-foundry-upgrades/=lib/evm-m-extensions/lib/openzeppelin-foundry-upgrades/src/","permit2/=lib/evm-m-extensions/lib/uniswap-v4-periphery/lib/permit2/","solmate/=lib/evm-m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/solmate/","uniswap-v4-periphery/=lib/evm-m-extensions/lib/uniswap-v4-periphery/","v4-core/=lib/evm-m-extensions/lib/uniswap-v4-periphery/lib/v4-core/src/","wrapped-m-token/=lib/evm-m-extensions/lib/wrapped-m-token/"],"viaIR":false},"optimization_runs":999999,"sourcify_repo_url":null,"decoded_constructor_args":[["0x866A2BF4E572CbcF37D5071A7a58503Bfb36be1b",{"internalType":"address","name":"mToken_","type":"address"}],["0xB6807116b3B1B321a390594e31ECD6e0076f6278",{"internalType":"address","name":"swapFacility_","type":"address"}]],"compiler_version":"v0.8.26+commit.8a97fa7a","is_verified_via_verifier_alliance":false,"verified_at":"2025-11-19T15:52:44.011782Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60c060405234801561000f575f80fd5b5060405161479f38038061479f83398101604081905261002e91610178565b8181818161003a6100ab565b6001600160a01b03821660808190526100665760405163b01d5e2b60e01b815260040160405180910390fd5b6001600160a01b03811660a081905261009257604051636880ffc960e11b815260040160405180910390fd5b505050506100a46100ab60201b60201c565b50506101a9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100fb5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161461015a5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b80516001600160a01b0381168114610173575f80fd5b919050565b5f8060408385031215610189575f80fd5b6101928361015d565b91506101a06020840161015d565b90509250929050565b60805160a0516145966102095f395f818161081001528181610fa6015261163101525f818161088201528181610dc2015281816114e00152818161172f01528181611a2701528181611ec4015281816122400152612ae301526145965ff3fe608060405234801561000f575f80fd5b5060043610610372575f3560e01c80638d1fdf2f116101d4578063c3b6f93911610109578063d547741f116100a9578063e56f2fe411610079578063e56f2fe4146109db578063e5839836146109ee578063e94a010214610a45578063ef55bec614610aa9575f80fd5b8063d547741f1461092a578063d91694871461093d578063dd62ed3e14610964578063e3ee160e146109c8575f80fd5b8063c967891a116100e4578063c967891a146108bf578063cc4c5b64146108c7578063cf09299514610904578063d505accf14610917575f80fd5b8063c3b6f9391461087d578063c9144ddb146108a4578063c91f0c53146108ac575f80fd5b8063a8afc01f11610174578063ace150a51161014f578063ace150a5146107f8578063ae06b7e41461080b578063b7b7289914610857578063bf376c7a1461086a575f80fd5b8063a8afc01f146107ca578063a9059cbb146107d2578063aad12029146107e5575f80fd5b80639fd5a6cf116101af5780639fd5a6cf14610776578063a08cb48b14610789578063a0cc6a681461079c578063a217fddf146107c3575f80fd5b80638d1fdf2f146106f757806391d148541461070a57806395d89b411461076e575f80fd5b806336568abe116102aa5780635a049a701161024a5780637ecebe00116102255780637ecebe001461064e5780637f2eecc3146106a257806384b0196e146106c957806388b7ab63146106e4575f80fd5b80635a049a70146105c057806363f15649146105d357806370a08231146105fa575f80fd5b80634259dff9116102855780634259dff91461056057806345c8b1a61461058757806345cf012d1461059a578063532992c5146105ad575f80fd5b806336568abe1461053257806339f4769314610545578063406cf22914610558575f80fd5b8063248a9ca3116103155780632f2ff15d116102f05780632f2ff15d146104bc57806330adf81f146104cf578063313ce567146104f65780633644e5151461052a575f80fd5b8063248a9ca31461044a57806326987b601461048b57806328593984146104b4575f80fd5b80630cc01180116103505780630cc01180146103c6578063170e2070146103fb57806318160ddd1461041057806323b872dd14610437575f80fd5b806301ffc9a71461037657806306fdde031461039e578063095ea7b3146103b3575b5f80fd5b6103896103843660046139bc565b610abc565b60405190151581526020015b60405180910390f35b6103a6610b54565b6040516103959190613a47565b6103896103c1366004613a7a565b610c07565b6103ed7f2a2b1d77eeac958af6746e7b01f9bca503b7874430c64ff501c9b54aeb1a732e81565b604051908152602001610395565b61040e610409366004613aa4565b610c1c565b005b7fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af100546103ed565b610389610445366004613b15565b610cb0565b6103ed610458366004613b53565b5f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b610493610dbf565b6040516fffffffffffffffffffffffffffffffff9091168152602001610395565b6103ed610e52565b61040e6104ca366004613b6a565b610ea2565b6103ed7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b7fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da1015460405160ff9091168152602001610395565b6103ed610eeb565b61040e610540366004613b6a565b610f30565b61040e610553366004613a7a565b610f8e565b6103ed611077565b6103ed7f4a5e9eb1ba56d04185ff75ebf0f4f42a3d7c88c35b4a90fa278437e0c9bdceca81565b61040e610595366004613b98565b611118565b61040e6105a8366004613b98565b61116c565b61040e6105bb366004613bb3565b6111a8565b61040e6105ce366004613bfb565b6111c7565b6103ed7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3581565b6103ed610608366004613b98565b73ffffffffffffffffffffffffffffffffffffffff165f9081527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af102602052604090205490565b6103ed61065c366004613b98565b73ffffffffffffffffffffffffffffffffffffffff165f9081527f1b21ba3f0a2135d61c468900b54084f04af8111bce0f8bbb6ab8c46d11afbd00602052604090205490565b6103ed7fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de881565b6106d16111e7565b6040516103959796959493929190613c47565b61040e6106f2366004613de2565b611342565b61040e610705366004613b98565b611371565b610389610718366004613b6a565b5f9182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6103a66113c5565b61040e610784366004613e65565b6113ed565b61040e610797366004613ed6565b6113fd565b6103ed7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b6103ed5f81565b61040e611427565b6103896107e0366004613a7a565b611548565b61040e6107f3366004613aa4565b611554565b61040e610806366004613ed6565b6115e1565b6108327f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610395565b61040e610865366004613f3c565b611601565b61040e610878366004613a7a565b611619565b6108327f000000000000000000000000000000000000000000000000000000000000000081565b6103896116ff565b61040e6108ba366004613f91565b6117ad565b61040e611999565b7fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1015473ffffffffffffffffffffffffffffffffffffffff16610832565b61040e610912366004613de2565b611a8a565b61040e610925366004614052565b611aaa565b61040e610938366004613b6a565b611aba565b6103ed7f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b6103ed6109723660046140bc565b73ffffffffffffffffffffffffffffffffffffffff9182165f9081527fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da1006020908152604080832093909416825291909152205490565b61040e6109d63660046140e8565b611afd565b61040e6109e9366004614167565b611b28565b6103896109fc366004613b98565b73ffffffffffffffffffffffffffffffffffffffff165f9081527f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce00602052604090205460ff1690565b610389610a53366004613a7a565b73ffffffffffffffffffffffffffffffffffffffff919091165f9081527f1116a1d33aa5fb91b2652b3b0fdb63704173742d6dbecaf4256ebe33a488860060209081526040808320938352929052205460ff1690565b61040e610ab73660046140e8565b611c9b565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610b4e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60607f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea1005b6002018054610b8690614215565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb290614215565b8015610bfd5780601f10610bd457610100808354040283529160200191610bfd565b820191905f5260205f20905b815481529060010190602001808311610be057829003601f168201915b5050505050905090565b5f610c13338484611cbb565b50600192915050565b7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b35610c4681611cd1565b7f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce005f5b83811015610ca957610ca182868684818110610c8757610c87614266565b9050602002016020810190610c9c9190613b98565b611cde565b600101610c69565b5050505050565b73ffffffffffffffffffffffffffffffffffffffff83165f9081527fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da100602081815260408084203385529091528220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610da85783811015610d75576040517f192b9e4e00000000000000000000000000000000000000000000000000000000815233600482015260248101829052604481018590526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff86165f90815260208381526040808320338452909152902084820390555b610db3868686611d8f565b50600195945050505050565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166326987b606040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e29573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e4d9190614293565b905090565b5f80610e5d30611e7d565b90505f610e887fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1005490565b9050808211610e97575f610e9b565b8082035b9250505090565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154610edb81611cd1565b610ee58383611f2f565b50505050565b7f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea10080545f91904614610f2457610f1f61204d565b610f2a565b80600101545b91505090565b73ffffffffffffffffffffffffffffffffffffffff81163314610f7f576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f898282612108565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ffd576040517f2bfe1b5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110733373ffffffffffffffffffffffffffffffffffffffff1663d737d0c76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611049573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061106d91906142c2565b826121e4565b5050565b5f6110806122bf565b5f611089610e52565b9050805f03611099575f91505090565b6040518181527fd1c22369a95f91ae16576036bba6372736ba109f257ad94dccb89e141762e2659060200160405180910390a161111361110d7fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1015473ffffffffffffffffffffffffffffffffffffffff1690565b826122e9565b919050565b7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3561114281611cd1565b6110737f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce0083611cde565b7f4a5e9eb1ba56d04185ff75ebf0f4f42a3d7c88c35b4a90fa278437e0c9bdceca61119681611cd1565b61119e611077565b5061107382612396565b6111bd846111b686866124bc565b8484612537565b610ee5848461254b565b6111dd856111d587876124bc565b8585856125f8565b610ca9858561254b565b5f606080828080837f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea10060020146305f80604051908082528060200260200182016040528015611240578160200160208202803683370190505b507f0f00000000000000000000000000000000000000000000000000000000000000949392919084805461127390614215565b80601f016020809104026020016040519081016040528092919081815260200182805461129f90614215565b80156112ea5780601f106112c1576101008083540402835291602001916112ea565b820191905f5260205f20905b8154815290600101906020018083116112cd57829003601f168201915b505050505094506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525093929190965096509650965096509650965090919293949596565b61135a87611354898989898989612608565b8361268f565b6113688787878787876126da565b50505050505050565b7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3561139b81611cd1565b6110737f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce008361275d565b60607fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da100610b78565b610ca9856113548787878761280d565b61140f886111b68a8a8a8a8a8a612608565b61141d8888888888886126da565b5050505050505050565b61142f6116ff565b611465576040517fb019ea3500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fee580fdb4da10ea17aa673e6f5c8c2370b4166d6a94bc88900e5a96d0589e3ce61148e610dbf565b6040516fffffffffffffffffffffffffffffffff909116815260200160405180910390a16040517f81399be40000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906381399be4906024015f604051808303815f87803b158015611536575f80fd5b505af1158015610ee5573d5f803e3d5ffd5b5f610c13338484611d8f565b7f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3561157e81611cd1565b7f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce005f5b83811015610ca9576115d9828686848181106115bf576115bf614266565b90506020020160208101906115d49190613b98565b61275d565b6001016115a1565b6115f3886111b68a8a8a8a8a8a6128d7565b61141d888888888888612953565b61160f8361135485856124bc565b610f89838361254b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611688576040517f2bfe1b5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110733373ffffffffffffffffffffffffffffffffffffffff1663d737d0c76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f891906142c2565b8383612a8b565b6040517f84af270f0000000000000000000000000000000000000000000000000000000081523060048201525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906384af270f90602401602060405180830381865afa158015611789573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e4d91906142dd565b5f6117b6612b6d565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156117e25750825b90505f8267ffffffffffffffff1660011480156117fe5750303b155b90508115801561180c575080155b15611843576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156118a45784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b73ffffffffffffffffffffffffffffffffffffffff86166118f1576040517f21c4e3d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118ff8c8c8c8c8c8c612b95565b6119297f2a2b1d77eeac958af6746e7b01f9bca503b7874430c64ff501c9b54aeb1a732e87611f2f565b50831561198b5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050565b6119a16116ff565b156119d8576040517f7a42736800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f5098de6eb11dbd1127cf4dcd5e960e3944d48a7570b9b1939cff715cb35c5a18611a01610dbf565b6040516fffffffffffffffffffffffffffffffff909116815260200160405180910390a17f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a36e40fc6040518163ffffffff1660e01b81526004015f604051808303815f87803b158015611536575f80fd5b611a9c876113548989898989896128d7565b611368878787878787612953565b611368876111d58989898961280d565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154611af381611cd1565b610ee58383612108565b611b0f896111d58b8b8b8b8b8b6128d7565b611b1d898989898989612953565b505050505050505050565b5f611b31612b6d565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f81158015611b5d5750825b90505f8267ffffffffffffffff166001148015611b795750303b155b905081158015611b87575080155b15611bbe576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315611c1f5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b611c2d8b8b8b8b8b8b612b95565b8315611c8e5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b611cad896111d58b8b8b8b8b8b612608565b611b1d8989898989896126da565b611cc6838383612c88565b610f89838383612cbd565b611cdb8133612d41565b50565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020839052604090205460ff16611d0e575050565b73ffffffffffffffffffffffffffffffffffffffff81165f818152602084815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905590514281527f07d647ad688e085159820c1d8d030e5765cdc5274d4ee4065c6066b388a2ef5991015b60405180910390a25050565b611d9882612de7565b611da3838383612e4c565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611e0291815260200190565b60405180910390a3805f03611e1657505050565b611e208382612e81565b73ffffffffffffffffffffffffffffffffffffffff8084165f9081527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af102602052604080822080548590039055918416815220805482019055505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015611f0b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b4e91906142fc565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff16612044575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055611fe03390565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610b4e565b5f915050610b4e565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea1006002016040516120a09190614313565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff1615612044575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610b4e565b6121ed81612f25565b6121f78282612f61565b6122013382612e81565b61220b3382612f8b565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303815f875af115801561229b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f8991906142dd565b7f2a2b1d77eeac958af6746e7b01f9bca503b7874430c64ff501c9b54aeb1a732e611cdb81611cd1565b73ffffffffffffffffffffffffffffffffffffffff82165f8181527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af102602090815260408083208054860190557fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1008054860181559051858152909392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff81166123e3576040517f5dfd400c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af101547fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1009073ffffffffffffffffffffffffffffffffffffffff9081169083160361244b575050565b6001810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091556040517f77f12a3c9f87d4602fe59bb8d2b68c7b516e0cacba414a53e74ea75d435dc18d905f90a25050565b604080517f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429602082015273ffffffffffffffffffffffffffffffffffffffff841691810191909152606081018290525f90612530906080015b60405160208183030381529060405280519060200120613030565b9392505050565b610ee561254685858585613091565b6130cc565b6125558282613290565b73ffffffffffffffffffffffffffffffffffffffff82165f8181527f1116a1d33aa5fb91b2652b3b0fdb63704173742d6dbecaf4256ebe33a48886006020908152604080832085845290915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055518392917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a35050565b610ca96125468686868686613338565b604080517fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8602082015273ffffffffffffffffffffffffffffffffffffffff8089169282019290925290861660608201526080810185905260a0810184905260c0810183905260e081018290525f906126849061010001612515565b979650505050505050565b5f61269b848484613380565b90505f8160058111156126b0576126b06143a2565b036126bb5750505050565b6126c68484846133c4565b156126d15750505050565b610ee5816130cc565b3373ffffffffffffffffffffffffffffffffffffffff861614612747576040517f1c5939f300000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff86166024820152604401610d6c565b612755868686868686612953565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020839052604090205460ff161561278e575050565b73ffffffffffffffffffffffffffffffffffffffff81165f818152602084905260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f68e0d8c112165d0949ce87205b719ed7d98c7401866c34a159f7c67c6f5620e790611d839042815260200190565b5f6128178261350c565b612822858585611cbb565b73ffffffffffffffffffffffffffffffffffffffff8086165f8181527f1b21ba3f0a2135d61c468900b54084f04af8111bce0f8bbb6ab8c46d11afbd00602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928101929092529181019290925291861660608201526080810185905260a081019190915260c081018390526128ce9060e001612515565b95945050505050565b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267602082015273ffffffffffffffffffffffffffffffffffffffff8089169282019290925290861660608201526080810185905260a0810184905260c0810183905260e081018290525f906126849061010001612515565b824211612995576040517f498ff9a200000000000000000000000000000000000000000000000000000000815242600482015260248101849052604401610d6c565b8142106129d7576040517fb3fcd33e00000000000000000000000000000000000000000000000000000000815242600482015260248101839052604401610d6c565b6129e18682613290565b73ffffffffffffffffffffffffffffffffffffffff86165f8181527f1116a1d33aa5fb91b2652b3b0fdb63704173742d6dbecaf4256ebe33a48886006020908152604080832085845290915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055518392917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a3612755868686611d8f565b612a9482612de7565b612a9d81612f25565b612aa8838383612c88565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303815f875af1158015612b3e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b6291906142dd565b50610f8982826122e9565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b4e565b612b9d61354f565b73ffffffffffffffffffffffffffffffffffffffff8116612bea576040517f09d50edf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316612c37576040517f7289db0e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612c41868661358f565b612c4a826135a3565b612c5384612396565b612c5d5f84611f2f565b506113687f4a5e9eb1ba56d04185ff75ebf0f4f42a3d7c88c35b4a90fa278437e0c9bdceca82611f2f565b7f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce00612cb38185613622565b610ee58184613622565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181527fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da100602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101612389565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16611073576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610d6c565b73ffffffffffffffffffffffffffffffffffffffff8116611cdb576040517f17858bbe00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610d6c565b7f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce00612e778133613622565b612cb38185613622565b73ffffffffffffffffffffffffffffffffffffffff82165f9081527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af102602052604090205481811015610f89576040517fdb42144d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401610d6c565b805f03611cdb576040517f77b8dde300000000000000000000000000000000000000000000000000000000815260048101829052602401610d6c565b6110737f2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce0083613622565b73ffffffffffffffffffffffffffffffffffffffff82165f8181527fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af10260209081526040808320805486900390557fee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af1008054869003815590518581529093917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101612389565b5f613039610eeb565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b5f805f61309f868686613699565b90925090505f8260058111156130b7576130b76143a2565b146130c25781612684565b61268487826136e0565b5f8160058111156130df576130df6143a2565b036130e75750565b60018160058111156130fb576130fb6143a2565b03613132576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002816005811115613146576131466143a2565b0361317d576040517f4be6321b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003816005811115613191576131916143a2565b036131c8576040517fbf4bf5b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048160058111156131dc576131dc6143a2565b03613213576040517fff551e8900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005816005811115613227576132276143a2565b0361325e576040517f10c74b0300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f9081527f1116a1d33aa5fb91b2652b3b0fdb63704173742d6dbecaf4256ebe33a48886006020908152604080832084845290915290205460ff1615611073576040517fd309466d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260248101829052604401610d6c565b5f805f61334787878787613723565b90925090505f82600581111561335f5761335f6143a2565b1461336a5781613374565b61337488826136e0565b98975050505050505050565b5f805f61338d8585613830565b90925090505f8260058111156133a5576133a56143a2565b146133b057816133ba565b6133ba86826136e0565b9695505050505050565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1685856040516024016133f19291906143cf565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e000000000000000000000000000000000000000000000000000000001790525161347291906143ef565b5f60405180830381855afa9150503d805f81146134aa576040519150601f19603f3d011682016040523d82523d5f602084013e6134af565b606091505b50915091508180156134c357506020815110155b80156133ba575080517f1626ba7e000000000000000000000000000000000000000000000000000000009061350190830160209081019084016142fc565b149695505050505050565b80421115611cdb576040517ff88f049000000000000000000000000000000000000000000000000000000000815260048101829052426024820152604401610d6c565b613557613874565b61358d576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61359761354f565b61107382826006613892565b6135ab61354f565b73ffffffffffffffffffffffffffffffffffffffff81166135f8576040517f6cbbd1d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110737f109b88c1c8d528799ca6f455418979dd2a552493f14553ce44443b23f7df8b3582611f2f565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020839052604090205460ff1615611073576040517f4f2a367e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610d6c565b5f80601b60ff84901c017f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84166136d287838884613723565b935093505050935093915050565b5f8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461371b576005612530565b505f92915050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156137585750600390505f613827565b8460ff16601b1415801561377057508460ff16601c14155b156137805750600490505f613827565b604080515f81526020810180835288905260ff871691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa1580156137d0573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161561381e575f81613822565b60015f5b915091505b94509492505050565b5f8082516041146138465750600290505f61386d565b6020830151604084015160608501515f1a919061386587848484613723565b945094505050505b9250929050565b5f61387d612b6d565b5468010000000000000000900460ff16919050565b61389a61354f565b6138a38361393b565b7fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da10180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff83161790557fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da1007fcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da102610ca98482614449565b61394361354f565b611cdb8161394f61354f565b611cdb8161395b61354f565b7f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea1007f103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea1026139a78382614449565b504681556139b361204d565b60019091015550565b5f602082840312156139cc575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612530575f80fd5b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61253060208301846139fb565b73ffffffffffffffffffffffffffffffffffffffff81168114611cdb575f80fd5b5f8060408385031215613a8b575f80fd5b8235613a9681613a59565b946020939093013593505050565b5f8060208385031215613ab5575f80fd5b823567ffffffffffffffff811115613acb575f80fd5b8301601f81018513613adb575f80fd5b803567ffffffffffffffff811115613af1575f80fd5b8560208260051b8401011115613b05575f80fd5b6020919091019590945092505050565b5f805f60608486031215613b27575f80fd5b8335613b3281613a59565b92506020840135613b4281613a59565b929592945050506040919091013590565b5f60208284031215613b63575f80fd5b5035919050565b5f8060408385031215613b7b575f80fd5b823591506020830135613b8d81613a59565b809150509250929050565b5f60208284031215613ba8575f80fd5b813561253081613a59565b5f805f8060808587031215613bc6575f80fd5b8435613bd181613a59565b966020860135965060408601359560600135945092505050565b803560ff81168114611113575f80fd5b5f805f805f60a08688031215613c0f575f80fd5b8535613c1a81613a59565b945060208601359350613c2f60408701613beb565b94979396509394606081013594506080013592915050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613c8160e08301896139fb565b8281036040840152613c9381896139fb565b6060840188905273ffffffffffffffffffffffffffffffffffffffff8716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015613cf5578351835260209384019390920191600101613cd7565b50909b9a5050505050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f830112613d42575f80fd5b8135602083015f8067ffffffffffffffff841115613d6257613d62613d06565b506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85018116603f0116810181811067ffffffffffffffff82111715613daf57613daf613d06565b604052838152905080828401871015613dc6575f80fd5b838360208301375f602085830101528094505050505092915050565b5f805f805f805f60e0888a031215613df8575f80fd5b8735613e0381613a59565b96506020880135613e1381613a59565b955060408801359450606088013593506080880135925060a0880135915060c088013567ffffffffffffffff811115613e4a575f80fd5b613e568a828b01613d33565b91505092959891949750929550565b5f805f805f60a08688031215613e79575f80fd5b8535613e8481613a59565b94506020860135613e9481613a59565b93506040860135925060608601359150608086013567ffffffffffffffff811115613ebd575f80fd5b613ec988828901613d33565b9150509295509295909350565b5f805f805f805f80610100898b031215613eee575f80fd5b8835613ef981613a59565b97506020890135613f0981613a59565b979a9799505050506040860135956060810135956080820135955060a0820135945060c0820135935060e0909101359150565b5f805f60608486031215613f4e575f80fd5b8335613f5981613a59565b925060208401359150604084013567ffffffffffffffff811115613f7b575f80fd5b613f8786828701613d33565b9150509250925092565b5f805f805f805f60e0888a031215613fa7575f80fd5b873567ffffffffffffffff811115613fbd575f80fd5b613fc98a828b01613d33565b975050602088013567ffffffffffffffff811115613fe5575f80fd5b613ff18a828b01613d33565b965050604088013561400281613a59565b9450606088013561401281613a59565b9350608088013561402281613a59565b925060a088013561403281613a59565b915060c088013561404281613a59565b8091505092959891949750929550565b5f805f805f805f60e0888a031215614068575f80fd5b873561407381613a59565b9650602088013561408381613a59565b9550604088013594506060880135935061409f60808901613beb565b9699959850939692959460a0840135945060c09093013592915050565b5f80604083850312156140cd575f80fd5b82356140d881613a59565b91506020830135613b8d81613a59565b5f805f805f805f805f6101208a8c031215614101575f80fd5b893561410c81613a59565b985060208a013561411c81613a59565b975060408a0135965060608a0135955060808a0135945060a08a0135935061414660c08b01613beb565b989b979a50959894979396929550929360e081013593506101000135919050565b5f805f805f8060c0878903121561417c575f80fd5b863567ffffffffffffffff811115614192575f80fd5b61419e89828a01613d33565b965050602087013567ffffffffffffffff8111156141ba575f80fd5b6141c689828a01613d33565b95505060408701356141d781613a59565b935060608701356141e781613a59565b925060808701356141f781613a59565b915060a087013561420781613a59565b809150509295509295509295565b600181811c9082168061422957607f821691505b602082108103614260577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f602082840312156142a3575f80fd5b81516fffffffffffffffffffffffffffffffff81168114612530575f80fd5b5f602082840312156142d2575f80fd5b815161253081613a59565b5f602082840312156142ed575f80fd5b81518015158114612530575f80fd5b5f6020828403121561430c575f80fd5b5051919050565b5f80835461432081614215565b600182168015614337576001811461436a57614397565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083168652811515820286019350614397565b865f5260205f205f5b8381101561438f57815488820152600190910190602001614373565b505081860193505b509195945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b828152604060208201525f6143e760408301846139fb565b949350505050565b5f82518060208501845e5f920191825250919050565b601f821115610f8957805f5260205f20601f840160051c8101602085101561442a5750805b601f840160051c820191505b81811015610ca9575f8155600101614436565b815167ffffffffffffffff81111561446357614463613d06565b614477816144718454614215565b84614405565b6020601f8211600181146144c8575f83156144925750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455610ca9565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b8281101561451557878501518255602094850194600190920191016144f5565b508482101561455157868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b0190555056fea264697066735822122008143f4ba872985ebc59e5d66ea604d07d621c3b2dd6f2e3f75257f8c97dc22264736f6c634300081a0033000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b000000000000000000000000b6807116b3b1b321a390594e31ecd6e0076f6278","name":"UsdscToken","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"cancun","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"lib/evm-m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAccessControl} from \"@openzeppelin/contracts/access/IAccessControl.sol\";\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {ERC165Upgradeable} from \"../utils/introspection/ERC165Upgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable {\n    struct RoleData {\n        mapping(address account => bool) hasRole;\n        bytes32 adminRole;\n    }\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl\n    struct AccessControlStorage {\n        mapping(bytes32 role => RoleData) _roles;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.AccessControl\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;\n\n    function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {\n        assembly {\n            $.slot := AccessControlStorageLocation\n        }\n    }\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with an {AccessControlUnauthorizedAccount} error including the required role.\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role);\n        _;\n    }\n\n    function __AccessControl_init() internal onlyInitializing {\n    }\n\n    function __AccessControl_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view virtual returns (bool) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        return $._roles[role].hasRole[account];\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`\n     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.\n     */\n    function _checkRole(bytes32 role) internal view virtual {\n        _checkRole(role, _msgSender());\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`\n     * is missing `role`.\n     */\n    function _checkRole(bytes32 role, address account) internal view virtual {\n        if (!hasRole(role, account)) {\n            revert AccessControlUnauthorizedAccount(account, role);\n        }\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        return $._roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) public virtual {\n        if (callerConfirmation != _msgSender()) {\n            revert AccessControlBadConfirmation();\n        }\n\n        _revokeRole(role, callerConfirmation);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        $._roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        if (!hasRole(role, account)) {\n            $._roles[role].hasRole[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Attempts to revoke `role` from `account` and returns a boolean indicating if `role` was revoked.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        if (hasRole(role, account)) {\n            $._roles[role].hasRole[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/contracts/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":"lib/evm-m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/contracts/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":"lib/evm-m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165 {\n    function __ERC165_init() internal onlyInitializing {\n    }\n\n    function __ERC165_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/ERC20ExtendedUpgradeable.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\nimport { ERC3009Upgradeable } from \"./ERC3009Upgradeable.sol\";\n\nimport { IERC20 } from \"./interfaces/IERC20.sol\";\nimport { IERC20Extended } from \"./interfaces/IERC20Extended.sol\";\n\nabstract contract ERC20ExtendedUpgradeableStorageLayout {\n    /// @custom:storage-location erc7201:M0.storage.ERC20Extended\n    struct ERC20ExtendedStorageStruct {\n        mapping(address account => mapping(address spender => uint256 allowance)) allowance;\n        uint8 decimals;\n        string symbol;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"M0.storage.ERC20Extended\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant _ERC20_EXTENDED_STORAGE_LOCATION =\n        0xcbbe23efb65c1eaba394256c463812c20abdb5376e247eba1d0e1e92054da100;\n\n    function _getERC20ExtendedStorageLocation() internal pure returns (ERC20ExtendedStorageStruct storage $) {\n        assembly {\n            $.slot := _ERC20_EXTENDED_STORAGE_LOCATION\n        }\n    }\n}\n\n/**\n * @title  An upgradeable ERC20 token extended with EIP-2612 permits for signed approvals\n *         (via EIP-712 and with EIP-1271 and EIP-5267 compatibility).\n * @author M0 Labs\n */\nabstract contract ERC20ExtendedUpgradeable is\n    ERC20ExtendedUpgradeableStorageLayout,\n    ERC3009Upgradeable,\n    IERC20Extended\n{\n    /* ============ Variables ============ */\n\n    /**\n     * @inheritdoc IERC20Extended\n     * @dev Keeping this constant, despite `permit` parameter name differences, to ensure max EIP-2612 compatibility.\n     *      keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\n     */\n    bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n\n    /* ============ Initializer ============ */\n\n    function __ERC20ExtendedUpgradeable_init(\n        string memory name_,\n        string memory symbol_,\n        uint8 decimals_\n    ) internal onlyInitializing {\n        __ERC3009Upgradeable_init(name_);\n\n        ERC20ExtendedStorageStruct storage $ = _getERC20ExtendedStorageLocation();\n\n        $.decimals = decimals_;\n        $.symbol = symbol_;\n    }\n\n    /* ============ Interactive Functions ============ */\n\n    /// @inheritdoc IERC20\n    function approve(address spender_, uint256 amount_) external returns (bool) {\n        _approve(msg.sender, spender_, amount_);\n        return true;\n    }\n\n    /// @inheritdoc IERC20Extended\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        _revertIfInvalidSignature(owner_, _permitAndGetDigest(owner_, spender_, value_, deadline_), v_, r_, s_);\n    }\n\n    /// @inheritdoc IERC20Extended\n    function permit(\n        address owner_,\n        address spender_,\n        uint256 value_,\n        uint256 deadline_,\n        bytes memory signature_\n    ) external {\n        _revertIfInvalidSignature(owner_, _permitAndGetDigest(owner_, spender_, value_, deadline_), signature_);\n    }\n\n    /// @inheritdoc IERC20\n    function transfer(address recipient_, uint256 amount_) external returns (bool) {\n        _transfer(msg.sender, recipient_, amount_);\n        return true;\n    }\n\n    /// @inheritdoc IERC20\n    function transferFrom(address sender_, address recipient_, uint256 amount_) external returns (bool) {\n        ERC20ExtendedStorageStruct storage $ = _getERC20ExtendedStorageLocation();\n        uint256 spenderAllowance_ = $.allowance[sender_][msg.sender]; // Cache `spenderAllowance_` to stack.\n\n        if (spenderAllowance_ != type(uint256).max) {\n            if (spenderAllowance_ < amount_) revert InsufficientAllowance(msg.sender, spenderAllowance_, amount_);\n\n            unchecked {\n                _setAllowance($, sender_, msg.sender, spenderAllowance_ - amount_);\n            }\n        }\n\n        _transfer(sender_, recipient_, amount_);\n\n        return true;\n    }\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @inheritdoc IERC20\n    function allowance(address account, address spender) public view returns (uint256) {\n        return _getERC20ExtendedStorageLocation().allowance[account][spender];\n    }\n\n    /// @inheritdoc IERC20\n    function decimals() external view virtual returns (uint8) {\n        return _getERC20ExtendedStorageLocation().decimals;\n    }\n\n    /// @inheritdoc IERC20\n    function name() external view virtual returns (string memory) {\n        return _getERC712ExtendedStorageLocation().name;\n    }\n\n    /// @inheritdoc IERC20\n    function symbol() external view virtual returns (string memory) {\n        return _getERC20ExtendedStorageLocation().symbol;\n    }\n\n    /* ============ Internal Interactive Functions ============ */\n\n    /**\n     * @dev Approve `spender_` to spend `amount_` of tokens from `account_`.\n     * @param  account_ The address approving the allowance.\n     * @param  spender_ The address approved to spend the tokens.\n     * @param  amount_  The amount of tokens being approved for spending.\n     */\n    function _approve(address account_, address spender_, uint256 amount_) internal virtual {\n        _setAllowance(_getERC20ExtendedStorageLocation(), account_, spender_, amount_);\n        emit Approval(account_, spender_, amount_);\n    }\n\n    /**\n     * @dev Set the `amount_` of tokens `spender_` is allowed to spend from `account_`.\n     * @param $         ERC20Extended storage location.\n     * @param  account_ The address for which the allowance is set.\n     * @param  spender_ The address allowed to spend the tokens.\n     * @param  amount_  The amount of tokens being allowed for spending.\n     */\n    function _setAllowance(\n        ERC20ExtendedStorageStruct storage $,\n        address account_,\n        address spender_,\n        uint256 amount_\n    ) internal virtual {\n        $.allowance[account_][spender_] = amount_;\n    }\n\n    /**\n     * @dev    Performs the approval based on the permit info, validates the deadline, and returns the digest.\n     * @param  owner_    The address of the account approving the allowance.\n     * @param  spender_  The address of the account being allowed to spend the tokens.\n     * @param  amount_   The amount of tokens being approved for spending.\n     * @param  deadline_ The deadline by which the signature must be used.\n     * @return digest_   The EIP-712 digest of the permit.\n     */\n    function _permitAndGetDigest(\n        address owner_,\n        address spender_,\n        uint256 amount_,\n        uint256 deadline_\n    ) internal virtual returns (bytes32) {\n        _revertIfExpired(deadline_);\n\n        _approve(owner_, spender_, amount_);\n\n        unchecked {\n            // Nonce realistically cannot overflow.\n            return\n                _getDigest(\n                    keccak256(\n                        abi.encode(\n                            PERMIT_TYPEHASH,\n                            owner_,\n                            spender_,\n                            amount_,\n                            _getStatefulERC712ExtendedStorageLocation().nonces[owner_]++,\n                            deadline_\n                        )\n                    )\n                );\n        }\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/ERC3009Upgradeable.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\nimport { Initializable } from \"../lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol\";\nimport { IERC3009 } from \"./interfaces/IERC3009.sol\";\n\nimport { StatefulERC712Upgradeable } from \"./StatefulERC712Upgradeable.sol\";\n\nabstract contract ERC3009UpgradeableStorageLayout {\n    /// @custom:storage-location erc7201:M0.storage.ERC3009\n    struct ERC3009StorageStruct {\n        mapping(address authorizer => mapping(bytes32 nonce => bool isNonceUsed)) authorizationState;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"M0.storage.ERC3009\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant _ERC3009_STORAGE_LOCATION =\n        0x1116a1d33aa5fb91b2652b3b0fdb63704173742d6dbecaf4256ebe33a4888600;\n\n    function _getERC3009StorageLocation() internal pure returns (ERC3009StorageStruct storage $) {\n        assembly {\n            $.slot := _ERC3009_STORAGE_LOCATION\n        }\n    }\n}\n\n/**\n * @title  ERC3009 implementation allowing the transfer of fungible assets via a signed authorization.\n * @author M0 Labs\n * @dev    Inherits from ERC712ExtendedUpgradeable and StatefulERC712Upgradeable.\n */\nabstract contract ERC3009Upgradeable is IERC3009, ERC3009UpgradeableStorageLayout, StatefulERC712Upgradeable {\n    /* ============ Variables ============ */\n\n    // solhint-disable-next-line max-line-length\n    /// @dev        keccak256(\"TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\n    /// @inheritdoc IERC3009\n    bytes32 public constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH =\n        0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267;\n\n    // solhint-disable-next-line max-line-length\n    /// @dev        keccak256(\"ReceiveWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\n    /// @inheritdoc IERC3009\n    bytes32 public constant RECEIVE_WITH_AUTHORIZATION_TYPEHASH =\n        0xd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8;\n\n    /**\n     * @inheritdoc IERC3009\n     * @dev        keccak256(\"CancelAuthorization(address authorizer,bytes32 nonce)\")\n     */\n    bytes32 public constant CANCEL_AUTHORIZATION_TYPEHASH =\n        0x158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429;\n\n    /* ============ Initializer ============ */\n\n    /**\n     * @notice Initializes the ERC3009Upgradeable contract.\n     * @param  name_ The name of the contract.\n     */\n    function __ERC3009Upgradeable_init(string memory name_) internal onlyInitializing {\n        __StatefulERC712ExtendedUpgradeable_init(name_);\n    }\n\n    /* ============ Interactive Functions ============ */\n\n    /// @inheritdoc IERC3009\n    function transferWithAuthorization(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_,\n        bytes memory signature_\n    ) external {\n        _revertIfInvalidSignature(\n            from_,\n            _getTransferWithAuthorizationDigest(from_, to_, value_, validAfter_, validBefore_, nonce_),\n            signature_\n        );\n\n        _transferWithAuthorization(from_, to_, value_, validAfter_, validBefore_, nonce_);\n    }\n\n    /// @inheritdoc IERC3009\n    function transferWithAuthorization(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_,\n        bytes32 r_,\n        bytes32 vs_\n    ) external {\n        _revertIfInvalidSignature(\n            from_,\n            _getTransferWithAuthorizationDigest(from_, to_, value_, validAfter_, validBefore_, nonce_),\n            r_,\n            vs_\n        );\n\n        _transferWithAuthorization(from_, to_, value_, validAfter_, validBefore_, nonce_);\n    }\n\n    /// @inheritdoc IERC3009\n    function transferWithAuthorization(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_,\n        uint8 v_,\n        bytes32 r_,\n        bytes32 s_\n    ) external {\n        _revertIfInvalidSignature(\n            from_,\n            _getTransferWithAuthorizationDigest(from_, to_, value_, validAfter_, validBefore_, nonce_),\n            v_,\n            r_,\n            s_\n        );\n\n        _transferWithAuthorization(from_, to_, value_, validAfter_, validBefore_, nonce_);\n    }\n\n    /// @inheritdoc IERC3009\n    function receiveWithAuthorization(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_,\n        bytes memory signature_\n    ) external {\n        _revertIfInvalidSignature(\n            from_,\n            _getReceiveWithAuthorizationDigest(from_, to_, value_, validAfter_, validBefore_, nonce_),\n            signature_\n        );\n\n        _receiveWithAuthorization(from_, to_, value_, validAfter_, validBefore_, nonce_);\n    }\n\n    /// @inheritdoc IERC3009\n    function receiveWithAuthorization(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_,\n        bytes32 r_,\n        bytes32 vs_\n    ) external {\n        _revertIfInvalidSignature(\n            from_,\n            _getReceiveWithAuthorizationDigest(from_, to_, value_, validAfter_, validBefore_, nonce_),\n            r_,\n            vs_\n        );\n\n        _receiveWithAuthorization(from_, to_, value_, validAfter_, validBefore_, nonce_);\n    }\n\n    /// @inheritdoc IERC3009\n    function receiveWithAuthorization(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_,\n        uint8 v_,\n        bytes32 r_,\n        bytes32 s_\n    ) external {\n        _revertIfInvalidSignature(\n            from_,\n            _getReceiveWithAuthorizationDigest(from_, to_, value_, validAfter_, validBefore_, nonce_),\n            v_,\n            r_,\n            s_\n        );\n\n        _receiveWithAuthorization(from_, to_, value_, validAfter_, validBefore_, nonce_);\n    }\n\n    /// @inheritdoc IERC3009\n    function cancelAuthorization(address authorizer_, bytes32 nonce_, bytes memory signature_) external {\n        _revertIfInvalidSignature(authorizer_, _getCancelAuthorizationDigest(authorizer_, nonce_), signature_);\n        _cancelAuthorization(authorizer_, nonce_);\n    }\n\n    /// @inheritdoc IERC3009\n    function cancelAuthorization(address authorizer_, bytes32 nonce_, bytes32 r_, bytes32 vs_) external {\n        _revertIfInvalidSignature(authorizer_, _getCancelAuthorizationDigest(authorizer_, nonce_), r_, vs_);\n        _cancelAuthorization(authorizer_, nonce_);\n    }\n\n    /// @inheritdoc IERC3009\n    function cancelAuthorization(address authorizer_, bytes32 nonce_, uint8 v_, bytes32 r_, bytes32 s_) external {\n        _revertIfInvalidSignature(authorizer_, _getCancelAuthorizationDigest(authorizer_, nonce_), v_, r_, s_);\n        _cancelAuthorization(authorizer_, nonce_);\n    }\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @inheritdoc IERC3009\n    function authorizationState(address authorizer, bytes32 nonce) public view returns (bool) {\n        return _getERC3009StorageLocation().authorizationState[authorizer][nonce];\n    }\n\n    /* ============ Internal Interactive Functions ============ */\n\n    /**\n     * @dev   Common transfer function used by `transferWithAuthorization` and `_receiveWithAuthorization`.\n     * @param from_        Payer's address (Authorizer).\n     * @param to_          Payee's address.\n     * @param value_       Amount to be transferred.\n     * @param validAfter_  The time after which this is valid (unix time).\n     * @param validBefore_ The time before which this is valid (unix time).\n     * @param nonce_       Unique nonce.\n     */\n    function _transferWithAuthorization(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_\n    ) internal {\n        if (block.timestamp <= validAfter_) revert AuthorizationNotYetValid(block.timestamp, validAfter_);\n        if (block.timestamp >= validBefore_) revert AuthorizationExpired(block.timestamp, validBefore_);\n\n        _revertIfAuthorizationAlreadyUsed(from_, nonce_);\n\n        _getERC3009StorageLocation().authorizationState[from_][nonce_] = true;\n\n        emit AuthorizationUsed(from_, nonce_);\n\n        _transfer(from_, to_, value_);\n    }\n\n    /**\n     * @dev   Common receive function used by `receiveWithAuthorization`.\n     * @param from_        Payer's address (Authorizer).\n     * @param to_          Payee's address.\n     * @param value_       Amount to be transferred.\n     * @param validAfter_  The time after which this is valid (unix time).\n     * @param validBefore_ The time before which this is valid (unix time).\n     * @param nonce_       Unique nonce.\n     */\n    function _receiveWithAuthorization(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_\n    ) internal {\n        if (msg.sender != to_) revert CallerMustBePayee(msg.sender, to_);\n\n        _transferWithAuthorization(from_, to_, value_, validAfter_, validBefore_, nonce_);\n    }\n\n    /**\n     * @dev   Common cancel function used by `cancelAuthorization`.\n     * @param authorizer_ Authorizer's address.\n     * @param nonce_      Nonce of the authorization.\n     */\n    function _cancelAuthorization(address authorizer_, bytes32 nonce_) internal {\n        _revertIfAuthorizationAlreadyUsed(authorizer_, nonce_);\n\n        _getERC3009StorageLocation().authorizationState[authorizer_][nonce_] = true;\n\n        emit AuthorizationCanceled(authorizer_, nonce_);\n    }\n\n    /**\n     * @dev   Internal ERC20 transfer function that needs to be implemented by the inheriting contract.\n     * @param sender_    The sender's address.\n     * @param recipient_ The recipient's address.\n     * @param amount_    The amount to be transferred.\n     */\n    function _transfer(address sender_, address recipient_, uint256 amount_) internal virtual;\n\n    /* ============ Internal View/Pure Functions ============ */\n\n    /**\n     * @dev    Returns the internal EIP-712 digest of a transferWithAuthorization call.\n     * @param  from_        Payer's address (Authorizer).\n     * @param  to_          Payee's address.\n     * @param  value_       Amount to be transferred.\n     * @param  validAfter_  The time after which this is valid (unix time).\n     * @param  validBefore_ The time before which this is valid (unix time).\n     * @param  nonce_       Unique nonce.\n     * @return The internal EIP-712 digest.\n     */\n    function _getTransferWithAuthorizationDigest(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_\n    ) internal view returns (bytes32) {\n        return\n            _getDigest(\n                keccak256(\n                    abi.encode(\n                        TRANSFER_WITH_AUTHORIZATION_TYPEHASH,\n                        from_,\n                        to_,\n                        value_,\n                        validAfter_,\n                        validBefore_,\n                        nonce_\n                    )\n                )\n            );\n    }\n\n    /**\n     * @dev    Returns the internal EIP-712 digest of a receiveWithAuthorization call.\n     * @param  from_        Payer's address (Authorizer).\n     * @param  to_          Payee's address.\n     * @param  value_       Amount to be transferred.\n     * @param  validAfter_  The time after which this is valid (unix time).\n     * @param  validBefore_ The time before which this is valid (unix time).\n     * @param  nonce_       Unique nonce.\n     * @return The internal EIP-712 digest.\n     */\n    function _getReceiveWithAuthorizationDigest(\n        address from_,\n        address to_,\n        uint256 value_,\n        uint256 validAfter_,\n        uint256 validBefore_,\n        bytes32 nonce_\n    ) internal view returns (bytes32) {\n        return\n            _getDigest(\n                keccak256(\n                    abi.encode(\n                        RECEIVE_WITH_AUTHORIZATION_TYPEHASH,\n                        from_,\n                        to_,\n                        value_,\n                        validAfter_,\n                        validBefore_,\n                        nonce_\n                    )\n                )\n            );\n    }\n\n    /**\n     * @dev    Returns the internal EIP-712 digest of a cancelAuthorization call.\n     * @param  authorizer_ Authorizer's address.\n     * @param  nonce_      Nonce of the authorization.\n     * @return The internal EIP-712 digest.\n     */\n    function _getCancelAuthorizationDigest(address authorizer_, bytes32 nonce_) internal view returns (bytes32) {\n        return _getDigest(keccak256(abi.encode(CANCEL_AUTHORIZATION_TYPEHASH, authorizer_, nonce_)));\n    }\n\n    /**\n     * @dev   Reverts if the authorization is already used.\n     * @param authorizer_ The authorizer's address.\n     * @param nonce_      The nonce of the authorization.\n     */\n    function _revertIfAuthorizationAlreadyUsed(address authorizer_, bytes32 nonce_) internal view {\n        if (authorizationState(authorizer_, nonce_)) revert AuthorizationAlreadyUsed(authorizer_, nonce_);\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/ERC712ExtendedUpgradeable.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\nimport { Initializable } from \"../lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol\";\n\nimport { IERC712 } from \"./interfaces/IERC712.sol\";\nimport { IERC712Extended } from \"./interfaces/IERC712Extended.sol\";\n\nimport { SignatureChecker } from \"./libs/SignatureChecker.sol\";\n\nabstract contract ERC712ExtendedUpgradeableStorageLayout {\n    /// @custom:storage-location erc7201:M0.storage.ERC712Extended\n    struct ERC712ExtendedStorageStruct {\n        uint256 initialChainId;\n        bytes32 initialDomainSeparator;\n        string name;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"M0.storage.ERC712Extended\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant _ERC712_EXTENDED_STORAGE_LOCATION =\n        0x103ce0bed7138196cdb0d79ef04042681b16e7a2c58d74b78443c813042ea100;\n\n    function _getERC712ExtendedStorageLocation() internal pure returns (ERC712ExtendedStorageStruct storage $) {\n        assembly {\n            $.slot := _ERC712_EXTENDED_STORAGE_LOCATION\n        }\n    }\n}\n\n/**\n * @title  Typed structured data hashing and signing via EIP-712, extended by EIP-5267.\n * @author M0 Labs\n * @dev    An abstract implementation to satisfy EIP-712: https://eips.ethereum.org/EIPS/eip-712\n */\nabstract contract ERC712ExtendedUpgradeable is ERC712ExtendedUpgradeableStorageLayout, IERC712Extended, Initializable {\n    /* ============ Variables ============ */\n\n    /// @dev keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")\n    bytes32 internal constant _EIP712_DOMAIN_HASH = 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n    /// @dev keccak256(\"1\")\n    bytes32 internal constant _EIP712_VERSION_HASH = 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6;\n\n    /* ============ Initializer ============ */\n\n    /**\n     * @notice Initializes the ERC712ExtendedUpgradeable contract.\n     * @param  name_ The name of the contract.\n     */\n    function __ERC712ExtendedUpgradeable_init(string memory name_) internal onlyInitializing {\n        ERC712ExtendedStorageStruct storage $ = _getERC712ExtendedStorageLocation();\n\n        $.name = name_;\n        $.initialChainId = block.chainid;\n        $.initialDomainSeparator = _getDomainSeparator();\n    }\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @inheritdoc IERC712Extended\n    function eip712Domain()\n        external\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        return (\n            hex\"0f\", // 01111\n            _getERC712ExtendedStorageLocation().name,\n            \"1\",\n            block.chainid,\n            address(this),\n            bytes32(0),\n            new uint256[](0)\n        );\n    }\n\n    /// @inheritdoc IERC712\n    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\n        ERC712ExtendedStorageStruct storage $ = _getERC712ExtendedStorageLocation();\n        return block.chainid == $.initialChainId ? $.initialDomainSeparator : _getDomainSeparator();\n    }\n\n    /* ============ Internal View/Pure Functions ============ */\n\n    /**\n     * @dev    Computes the EIP-712 domain separator.\n     * @return The EIP-712 domain separator.\n     */\n    function _getDomainSeparator() internal view returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(\n                    _EIP712_DOMAIN_HASH,\n                    keccak256(bytes(_getERC712ExtendedStorageLocation().name)),\n                    _EIP712_VERSION_HASH,\n                    block.chainid,\n                    address(this)\n                )\n            );\n    }\n\n    /**\n     * @dev    Returns the digest to be signed, via EIP-712, given an internal digest (i.e. hash struct).\n     * @param  internalDigest_ The internal digest.\n     * @return The digest to be signed.\n     */\n    function _getDigest(bytes32 internalDigest_) internal view returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19\\x01\", DOMAIN_SEPARATOR(), internalDigest_));\n    }\n\n    /**\n     * @dev   Revert if the signature is expired.\n     * @param expiry_ Timestamp at which the signature expires or max uint256 for no expiry.\n     */\n    function _revertIfExpired(uint256 expiry_) internal view {\n        if (block.timestamp > expiry_) revert SignatureExpired(expiry_, block.timestamp);\n    }\n\n    /**\n     * @dev   Revert if the signature is invalid.\n     * @dev   We first validate if the signature is a valid ECDSA signature and return early if it is the case.\n     *        Then, we validate if it is a valid ERC-1271 signature, and return early if it is the case.\n     *        If not, we revert with the error from the ECDSA signature validation.\n     * @param signer_    The signer of the signature.\n     * @param digest_    The digest that was signed.\n     * @param signature_ The signature.\n     */\n    function _revertIfInvalidSignature(address signer_, bytes32 digest_, bytes memory signature_) internal view {\n        SignatureChecker.Error error_ = SignatureChecker.validateECDSASignature(signer_, digest_, signature_);\n\n        if (error_ == SignatureChecker.Error.NoError) return;\n\n        if (SignatureChecker.isValidERC1271Signature(signer_, digest_, signature_)) return;\n\n        _revertIfError(error_);\n    }\n\n    /**\n     * @dev    Returns the signer of a signed digest, via EIP-712, and reverts if the signature is invalid.\n     * @param  digest_ The digest that was signed.\n     * @param  v_      v of the signature.\n     * @param  r_      r of the signature.\n     * @param  s_      s of the signature.\n     * @return signer_ The signer of the digest.\n     */\n    function _getSignerAndRevertIfInvalidSignature(\n        bytes32 digest_,\n        uint8 v_,\n        bytes32 r_,\n        bytes32 s_\n    ) internal pure returns (address signer_) {\n        SignatureChecker.Error error_;\n\n        (error_, signer_) = SignatureChecker.recoverECDSASigner(digest_, v_, r_, s_);\n\n        _revertIfError(error_);\n    }\n\n    /**\n     * @dev   Revert if the signature is invalid.\n     * @param signer_ The signer of the signature.\n     * @param digest_ The digest that was signed.\n     * @param r_      An ECDSA/secp256k1 signature parameter.\n     * @param vs_     An ECDSA/secp256k1 short signature parameter.\n     */\n    function _revertIfInvalidSignature(address signer_, bytes32 digest_, bytes32 r_, bytes32 vs_) internal pure {\n        _revertIfError(SignatureChecker.validateECDSASignature(signer_, digest_, r_, vs_));\n    }\n\n    /**\n     * @dev   Revert if the signature is invalid.\n     * @param signer_ The signer of the signature.\n     * @param digest_ The digest that was signed.\n     * @param v_      v of the signature.\n     * @param r_      r of the signature.\n     * @param s_      s of the signature.\n     */\n    function _revertIfInvalidSignature(\n        address signer_,\n        bytes32 digest_,\n        uint8 v_,\n        bytes32 r_,\n        bytes32 s_\n    ) internal pure {\n        _revertIfError(SignatureChecker.validateECDSASignature(signer_, digest_, v_, r_, s_));\n    }\n\n    /**\n     * @dev   Revert if error.\n     * @param error_ The SignatureChecker Error enum.\n     */\n    function _revertIfError(SignatureChecker.Error error_) private pure {\n        if (error_ == SignatureChecker.Error.NoError) return;\n        if (error_ == SignatureChecker.Error.InvalidSignature) revert InvalidSignature();\n        if (error_ == SignatureChecker.Error.InvalidSignatureLength) revert InvalidSignatureLength();\n        if (error_ == SignatureChecker.Error.InvalidSignatureS) revert InvalidSignatureS();\n        if (error_ == SignatureChecker.Error.InvalidSignatureV) revert InvalidSignatureV();\n        if (error_ == SignatureChecker.Error.SignerMismatch) revert SignerMismatch();\n\n        revert InvalidSignature();\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/StatefulERC712Upgradeable.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\nimport { IStatefulERC712 } from \"./interfaces/IStatefulERC712.sol\";\n\nimport { ERC712ExtendedUpgradeable } from \"./ERC712ExtendedUpgradeable.sol\";\n\nabstract contract StatefulERC712ExtendedUpgradeableStorageLayout {\n    /// @custom:storage-location erc7201:M0.storage.StatefulERC712Extended\n    struct StatefulERC712ExtendedStorageStruct {\n        mapping(address account => uint256 nonce) nonces; // Nonces for all signatures.\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"M0.storage.StatefulERC712Extended\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant _STATEFUL_ERC712_EXTENDED_STORAGE_LOCATION =\n        0x1b21ba3f0a2135d61c468900b54084f04af8111bce0f8bbb6ab8c46d11afbd00;\n\n    function _getStatefulERC712ExtendedStorageLocation()\n        internal\n        pure\n        returns (StatefulERC712ExtendedStorageStruct storage $)\n    {\n        assembly {\n            $.slot := _STATEFUL_ERC712_EXTENDED_STORAGE_LOCATION\n        }\n    }\n}\n\n/**\n * @title  Stateful and upgradeable extension for EIP-712 typed structured data hashing and signing with nonces.\n * @author M0 Labs\n * @dev    An abstract implementation to satisfy stateful EIP-712 with nonces.\n */\nabstract contract StatefulERC712Upgradeable is\n    StatefulERC712ExtendedUpgradeableStorageLayout,\n    IStatefulERC712,\n    ERC712ExtendedUpgradeable\n{\n    /* ============ Initializer ============ */\n\n    /**\n     * @notice Initializes the StatefulERC712Upgradeable contract.\n     * @param  name The name of the contract.\n     */\n    function __StatefulERC712ExtendedUpgradeable_init(string memory name) internal onlyInitializing {\n        __ERC712ExtendedUpgradeable_init(name);\n    }\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @inheritdoc IStatefulERC712\n    function nonces(address account) external view returns (uint256) {\n        return _getStatefulERC712ExtendedStorageLocation().nonces[account];\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/interfaces/IERC1271.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\n/**\n * @title  Standard Signature Validation Method for Contracts via EIP-1271.\n * @author M^0 Labs\n * @dev    The interface as defined by EIP-1271: https://eips.ethereum.org/EIPS/eip-1271\n */\ninterface IERC1271 {\n    /**\n     * @dev    Returns a specific magic value if the provided signature is valid for the provided digest.\n     * @param  digest     Hash of the data purported to have been signed.\n     * @param  signature  Signature byte array associated with the digest.\n     * @return magicValue Magic value 0x1626ba7e if the signature is valid.\n     */\n    function isValidSignature(bytes32 digest, bytes memory signature) external view returns (bytes4 magicValue);\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/interfaces/IERC20.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\n/**\n * @title  ERC20 Token Standard.\n * @author M^0 Labs\n * @dev    The interface as defined by EIP-20: https://eips.ethereum.org/EIPS/eip-20\n */\ninterface IERC20 {\n    /* ============ Events ============ */\n\n    /**\n     * @notice Emitted when `spender` has been approved for `amount` of the token balance of `account`.\n     * @param  account The address of the account.\n     * @param  spender The address of the spender being approved for the allowance.\n     * @param  amount  The amount of the allowance being approved.\n     */\n    event Approval(address indexed account, address indexed spender, uint256 amount);\n\n    /**\n     * @notice Emitted when `amount` tokens is transferred from `sender` to `recipient`.\n     * @param  sender    The address of the sender who's token balance is decremented.\n     * @param  recipient The address of the recipient who's token balance is incremented.\n     * @param  amount    The amount of tokens being transferred.\n     */\n    event Transfer(address indexed sender, address indexed recipient, uint256 amount);\n\n    /* ============ Interactive Functions ============ */\n\n    /**\n     * @notice Allows a calling account to approve `spender` to spend up to `amount` of its token balance.\n     * @dev    MUST emit an `Approval` event.\n     * @param  spender The address of the account being allowed to spend up to the allowed amount.\n     * @param  amount  The amount of the allowance being approved.\n     * @return Whether or not the approval was successful.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @notice Allows a calling account to transfer `amount` tokens to `recipient`.\n     * @param  recipient The address of the recipient who's token balance will be incremented.\n     * @param  amount    The amount of tokens being transferred.\n     * @return Whether or not the transfer was successful.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @notice Allows a calling account to transfer `amount` tokens from `sender`, with allowance, to a `recipient`.\n     * @param  sender    The address of the sender who's token balance will be decremented.\n     * @param  recipient The address of the recipient who's token balance will be incremented.\n     * @param  amount    The amount of tokens being transferred.\n     * @return Whether or not the transfer was successful.\n     */\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n    /* ============ View/Pure Functions ============ */\n\n    /**\n     * @notice Returns the allowance `spender` is allowed to spend on behalf of `account`.\n     * @param  account The address of the account who's token balance `spender` is allowed to spend.\n     * @param  spender The address of an account allowed to spend on behalf of `account`.\n     * @return The amount `spender` can spend on behalf of `account`.\n     */\n    function allowance(address account, address spender) external view returns (uint256);\n\n    /**\n     * @notice Returns the token balance of `account`.\n     * @param  account The address of some account.\n     * @return The token balance of `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /// @notice Returns the number of decimals UIs should assume all amounts have.\n    function decimals() external view returns (uint8);\n\n    /// @notice Returns the name of the contract/token.\n    function name() external view returns (string memory);\n\n    /// @notice Returns the symbol of the token.\n    function symbol() external view returns (string memory);\n\n    /// @notice Returns the current total supply of the token.\n    function totalSupply() external view returns (uint256);\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/interfaces/IERC20Extended.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\nimport { IERC20 } from \"./IERC20.sol\";\nimport { IERC3009 } from \"./IERC3009.sol\";\n\n/**\n * @title  An ERC20 token extended with EIP-2612 permits for signed approvals (via EIP-712\n *         and with EIP-1271 compatibility), and extended with EIP-3009 transfer with authorization (via EIP-712).\n * @author M^0 Labs\n * @dev    The additional interface as defined by EIP-2612: https://eips.ethereum.org/EIPS/eip-2612\n */\ninterface IERC20Extended is IERC20, IERC3009 {\n    /* ============ Custom Errors ============ */\n\n    /**\n     * @notice Revert message when spender's allowance is not sufficient.\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 InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n    /**\n     * @notice Revert message emitted when the transferred amount is insufficient.\n     * @param  amount Amount transferred.\n     */\n    error InsufficientAmount(uint256 amount);\n\n    /**\n     * @notice Revert message emitted when the recipient of a token is invalid.\n     * @param  recipient Address of the invalid recipient.\n     */\n    error InvalidRecipient(address recipient);\n\n    /* ============ Interactive Functions ============ */\n\n    /**\n     * @notice Approves `spender` to spend up to `amount` of the token balance of `owner`, via a signature.\n     * @param  owner    The address of the account who's token balance is being approved to be spent by `spender`.\n     * @param  spender  The address of an account allowed to spend on behalf of `owner`.\n     * @param  value    The amount of the allowance being approved.\n     * @param  deadline The last timestamp where the signature is still valid.\n     * @param  v        An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  r        An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  s        An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\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     * @notice Approves `spender` to spend up to `amount` of the token balance of `owner`, via a signature.\n     * @param  owner     The address of the account who's token balance is being approved to be spent by `spender`.\n     * @param  spender   The address of an account allowed to spend on behalf of `owner`.\n     * @param  value     The amount of the allowance being approved.\n     * @param  deadline  The last timestamp where the signature is still valid.\n     * @param  signature An arbitrary signature (EIP-712).\n     */\n    function permit(address owner, address spender, uint256 value, uint256 deadline, bytes memory signature) external;\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @notice Returns the EIP712 typehash used in the encoding of the digest for the permit function.\n    function PERMIT_TYPEHASH() external view returns (bytes32);\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/interfaces/IERC3009.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\nimport { IStatefulERC712 } from \"./IStatefulERC712.sol\";\n\n/**\n * @title  Transfer via signed authorization following EIP-3009 standard.\n * @author M^0 Labs\n * @dev    The interface as defined by EIP-3009: https://eips.ethereum.org/EIPS/eip-3009\n */\ninterface IERC3009 is IStatefulERC712 {\n    /* ============ Events ============ */\n\n    /**\n     * @notice Emitted when an authorization has been canceled.\n     * @param  authorizer Authorizer's address.\n     * @param  nonce      Nonce of the canceled authorization.\n     */\n    event AuthorizationCanceled(address indexed authorizer, bytes32 indexed nonce);\n\n    /**\n     * @notice Emitted when an authorization has been used.\n     * @param  authorizer Authorizer's address.\n     * @param  nonce      Nonce of the used authorization.\n     */\n    event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce);\n\n    /* ============ Custom Errors ============ */\n\n    /**\n     * @notice Emitted when an authorization has already been used.\n     * @param  authorizer Authorizer's address.\n     * @param  nonce      Nonce of the used authorization.\n     */\n    error AuthorizationAlreadyUsed(address authorizer, bytes32 nonce);\n\n    /**\n     * @notice Emitted when an authorization is expired.\n     * @param  timestamp   Timestamp at which the transaction was submitted.\n     * @param  validBefore Timestamp before which the authorization would have been valid.\n     */\n    error AuthorizationExpired(uint256 timestamp, uint256 validBefore);\n\n    /**\n     * @notice Emitted when an authorization is not yet valid.\n     * @param  timestamp  Timestamp at which the transaction was submitted.\n     * @param  validAfter Timestamp after which the authorization will be valid.\n     */\n    error AuthorizationNotYetValid(uint256 timestamp, uint256 validAfter);\n\n    /**\n     * @notice Emitted when the caller of `receiveWithAuthorization` is not the payee.\n     * @param  caller Caller's address.\n     * @param  payee  Payee's address.\n     */\n    error CallerMustBePayee(address caller, address payee);\n\n    /* ============ Interactive Functions ============ */\n\n    /**\n     * @notice Execute a transfer with a signed authorization.\n     * @param  from        Payer's address (Authorizer).\n     * @param  to          Payee's address.\n     * @param  value       Amount to be transferred.\n     * @param  validAfter  The time after which this is valid (unix time).\n     * @param  validBefore The time before which this is valid (unix time).\n     * @param  nonce       Unique nonce.\n     * @param  signature   A byte array ECDSA/secp256k1 signature (encoded r, s, v).\n     */\n    function transferWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        bytes memory signature\n    ) external;\n\n    /**\n     * @notice Execute a transfer with a signed authorization.\n     * @param  from        Payer's address (Authorizer).\n     * @param  to          Payee's address.\n     * @param  value       Amount to be transferred.\n     * @param  validAfter  The time after which this is valid (unix time).\n     * @param  validBefore The time before which this is valid (unix time).\n     * @param  nonce       Unique nonce.\n     * @param  r           An ECDSA/secp256k1 signature parameter.\n     * @param  vs          An ECDSA/secp256k1 short signature parameter.\n     */\n    function transferWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        bytes32 r,\n        bytes32 vs\n    ) external;\n\n    /**\n     * @notice Execute a transfer with a signed authorization.\n     * @param  from        Payer's address (Authorizer).\n     * @param  to          Payee's address.\n     * @param  value       Amount to be transferred.\n     * @param  validAfter  The time after which this is valid (unix time).\n     * @param  validBefore The time before which this is valid (unix time).\n     * @param  nonce       Unique nonce.\n     * @param  v           v of the signature.\n     * @param  r           r of the signature.\n     * @param  s           s of the signature.\n     */\n    function transferWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @notice Receive a transfer with a signed authorization from the payer.\n     * @dev    This has an additional check to ensure that the payee's address matches\n     *         the caller of this function to prevent front-running attacks.\n     *         (See security considerations)\n     * @param  from        Payer's address (Authorizer).\n     * @param  to          Payee's address.\n     * @param  value       Amount to be transferred.\n     * @param  validAfter  The time after which this is valid (unix time).\n     * @param  validBefore The time before which this is valid (unix time).\n     * @param  nonce       Unique nonce.\n     * @param  signature   A byte array ECDSA/secp256k1 signature (encoded r, s, v).\n     */\n    function receiveWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        bytes memory signature\n    ) external;\n\n    /**\n     * @notice Receive a transfer with a signed authorization from the payer.\n     * @dev    This has an additional check to ensure that the payee's address matches\n     *         the caller of this function to prevent front-running attacks.\n     *         (See security considerations)\n     * @param  from        Payer's address (Authorizer).\n     * @param  to          Payee's address.\n     * @param  value       Amount to be transferred.\n     * @param  validAfter  The time after which this is valid (unix time).\n     * @param  validBefore The time before which this is valid (unix time).\n     * @param  nonce       Unique nonce.\n     * @param  r           An ECDSA/secp256k1 signature parameter.\n     * @param  vs          An ECDSA/secp256k1 short signature parameter.\n     */\n    function receiveWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        bytes32 r,\n        bytes32 vs\n    ) external;\n\n    /**\n     * @notice Receive a transfer with a signed authorization from the payer.\n     * @dev    This has an additional check to ensure that the payee's address matches\n     *         the caller of this function to prevent front-running attacks.\n     *         (See security considerations)\n     * @param  from        Payer's address (Authorizer).\n     * @param  to          Payee's address.\n     * @param  value       Amount to be transferred.\n     * @param  validAfter  The time after which this is valid (unix time).\n     * @param  validBefore The time before which this is valid (unix time).\n     * @param  nonce       Unique nonce.\n     * @param  v           v of the signature.\n     * @param  r           r of the signature.\n     * @param  s           s of the signature.\n     */\n    function receiveWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @notice Attempt to cancel an authorization.\n     * @param  authorizer Authorizer's address.\n     * @param  nonce      Nonce of the authorization.\n     * @param  signature  A byte array ECDSA/secp256k1 signature (encoded r, s, v).\n     */\n    function cancelAuthorization(address authorizer, bytes32 nonce, bytes memory signature) external;\n\n    /**\n     * @notice Attempt to cancel an authorization.\n     * @param  authorizer Authorizer's address.\n     * @param  nonce      Nonce of the authorization.\n     * @param  r          An ECDSA/secp256k1 signature parameter.\n     * @param  vs         An ECDSA/secp256k1 short signature parameter.\n     */\n    function cancelAuthorization(address authorizer, bytes32 nonce, bytes32 r, bytes32 vs) external;\n\n    /**\n     * @notice Attempt to cancel an authorization.\n     * @param  authorizer Authorizer's address.\n     * @param  nonce      Nonce of the authorization.\n     * @param  v          v of the signature.\n     * @param  r          r of the signature.\n     * @param  s          s of the signature.\n     */\n    function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external;\n\n    /* ============ View/Pure Functions ============ */\n\n    /**\n     * @notice Returns the state of an authorization.\n     * @dev    Nonces are randomly generated 32-byte data unique to the authorizer's address\n     * @param  authorizer Authorizer's address.\n     * @param  nonce      Nonce of the authorization.\n     * @return True if the nonce is used.\n     */\n    function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\n\n    /// @notice Returns `transferWithAuthorization` typehash.\n    function TRANSFER_WITH_AUTHORIZATION_TYPEHASH() external view returns (bytes32);\n\n    /// @notice Returns `receiveWithAuthorization` typehash.\n    function RECEIVE_WITH_AUTHORIZATION_TYPEHASH() external view returns (bytes32);\n\n    /// @notice Returns `cancelAuthorization` typehash.\n    function CANCEL_AUTHORIZATION_TYPEHASH() external view returns (bytes32);\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/interfaces/IERC712.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\n/**\n * @title  Typed structured data hashing and signing via EIP-712.\n * @author M^0 Labs\n * @dev    The interface as defined by EIP-712: https://eips.ethereum.org/EIPS/eip-712\n */\ninterface IERC712 {\n    /* ============ Custom Errors ============ */\n\n    /// @notice Revert message when an invalid signature is detected.\n    error InvalidSignature();\n\n    /// @notice Revert message when a signature with invalid length is detected.\n    error InvalidSignatureLength();\n\n    /// @notice Revert message when the S portion of a signature is invalid.\n    error InvalidSignatureS();\n\n    /// @notice Revert message when the V portion of a signature is invalid.\n    error InvalidSignatureV();\n\n    /**\n     * @notice Revert message when a signature is being used beyond its deadline (i.e. expiry).\n     * @param  deadline  The last timestamp where the signature is still valid.\n     * @param  timestamp The current timestamp.\n     */\n    error SignatureExpired(uint256 deadline, uint256 timestamp);\n\n    /// @notice Revert message when a recovered signer does not match the account being purported to have signed.\n    error SignerMismatch();\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @notice Returns the EIP712 domain separator used in the encoding of a signed digest.\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/interfaces/IERC712Extended.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\nimport { IERC712 } from \"./IERC712.sol\";\n\n/**\n * @title  EIP-712 extended by EIP-5267.\n * @author M^0 Labs\n * @dev    The additional interface as defined by EIP-5267: https://eips.ethereum.org/EIPS/eip-5267\n */\ninterface IERC712Extended is IERC712 {\n    /* ============ Events ============ */\n\n    /// @notice MAY be emitted to signal that the domain could have changed.\n    event EIP712DomainChanged();\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @notice Returns the fields and values that describe the domain separator used by this contract for EIP-712.\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":"lib/evm-m-extensions/lib/common/src/interfaces/IStatefulERC712.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\nimport { IERC712Extended } from \"./IERC712Extended.sol\";\n\n/**\n * @title  Stateful Extension for EIP-712 typed structured data hashing and signing with nonces.\n * @author M^0 Labs\n */\ninterface IStatefulERC712 is IERC712Extended {\n    /* ============ Custom Errors ============ */\n\n    /**\n     * @notice Revert message when a signing account's nonce is not the expected current nonce.\n     * @param  nonce         The nonce used in the signature.\n     * @param  expectedNonce The expected nonce to be used in a signature by the signing account.\n     */\n    error InvalidAccountNonce(uint256 nonce, uint256 expectedNonce);\n\n    /* ============ View/Pure Functions ============ */\n\n    /**\n     * @notice Returns the next nonce to be used in a signature by `account`.\n     * @param  account The address of some account.\n     * @return nonce   The next nonce to be used in a signature by `account`.\n     */\n    function nonces(address account) external view returns (uint256 nonce);\n}\n"},{"file_path":"lib/evm-m-extensions/lib/common/src/libs/SignatureChecker.sol","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.20 <0.9.0;\n\nimport { IERC1271 } from \"../interfaces/IERC1271.sol\";\n\n/**\n * @title  A library to handle ECDSA/secp256k1 and ERC1271 signatures, individually or in arbitrarily in combination.\n * @author M^0 Labs\n */\nlibrary SignatureChecker {\n    /* ============ Enums ============ */\n\n    /**\n     * @notice An enum representing the possible errors that can be emitted during signature validation.\n     * @param  NoError                No error occurred during signature validation.\n     * @param  InvalidSignature       The signature is invalid.\n     * @param  InvalidSignatureLength The signature length is invalid.\n     * @param  InvalidSignatureS      The signature parameter S is invalid.\n     * @param  InvalidSignatureV      The signature parameter V is invalid.\n     * @param  SignerMismatch         The signer does not match the recovered signer.\n     */\n    enum Error {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS,\n        InvalidSignatureV,\n        SignerMismatch\n    }\n\n    /* ============ Internal View/Pure Functions ============ */\n\n    /**\n     * @dev    Returns whether a signature is valid (ECDSA/secp256k1 or ERC1271) for a signer and digest.\n     * @dev    Signatures must not be used as unique identifiers since the `ecrecover` EVM opcode\n     *         allows for malleable (non-unique) signatures.\n     *         See https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-4h98-2769-gh6h\n     * @param  signer    The address of the account purported to have signed.\n     * @param  digest    The hash of the data that was signed.\n     * @param  signature A byte array signature.\n     * @return           Whether the signature is valid or not.\n     */\n    function isValidSignature(address signer, bytes32 digest, bytes memory signature) internal view returns (bool) {\n        return isValidECDSASignature(signer, digest, signature) || isValidERC1271Signature(signer, digest, signature);\n    }\n\n    /**\n     * @dev    Returns whether an ERC1271 signature is valid for a signer and digest.\n     * @param  signer    The address of the account purported to have signed.\n     * @param  digest    The hash of the data that was signed.\n     * @param  signature A byte array ERC1271 signature.\n     * @return           Whether the signature is valid or not.\n     */\n    function isValidERC1271Signature(\n        address signer,\n        bytes32 digest,\n        bytes memory signature\n    ) internal view returns (bool) {\n        (bool success_, bytes memory result_) = signer.staticcall(\n            abi.encodeCall(IERC1271.isValidSignature, (digest, signature))\n        );\n\n        return\n            success_ &&\n            result_.length >= 32 &&\n            abi.decode(result_, (bytes32)) == bytes32(IERC1271.isValidSignature.selector);\n    }\n\n    /**\n     * @dev    Decodes an ECDSA/secp256k1 signature from a byte array to standard v, r, and s parameters.\n     * @param  signature A byte array ECDSA/secp256k1 signature.\n     * @return v         An ECDSA/secp256k1 signature parameter.\n     * @return r         An ECDSA/secp256k1 signature parameter.\n     * @return s         An ECDSA/secp256k1 signature parameter.\n     */\n    function decodeECDSASignature(bytes memory signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) {\n        // ecrecover takes the signature parameters, and they can be decoded using assembly.\n        /// @solidity memory-safe-assembly\n        assembly {\n            r := mload(add(signature, 0x20))\n            s := mload(add(signature, 0x40))\n            v := byte(0, mload(add(signature, 0x60)))\n        }\n    }\n\n    /**\n     * @dev    Decodes an ECDSA/secp256k1 short signature as defined by EIP2098\n     *         from a byte array to standard v, r, and s parameters.\n     * @param  signature A byte array ECDSA/secp256k1 short signature.\n     * @return r         An ECDSA/secp256k1 signature parameter.\n     * @return vs        An ECDSA/secp256k1 short signature parameter.\n     */\n    function decodeShortECDSASignature(bytes memory signature) internal pure returns (bytes32 r, bytes32 vs) {\n        // ecrecover takes the signature parameters, and they can be decoded using assembly.\n        /// @solidity memory-safe-assembly\n        assembly {\n            r := mload(add(signature, 0x20))\n            vs := mload(add(signature, 0x40))\n        }\n    }\n\n    /**\n     * @dev    Returns whether an ECDSA/secp256k1 signature is valid for a signer and digest.\n     * @param  signer    The address of the account purported to have signed.\n     * @param  digest    The hash of the data that was signed.\n     * @param  signature A byte array ECDSA/secp256k1 signature (encoded r, s, v).\n     * @return           Whether the signature is valid or not.\n     */\n    function isValidECDSASignature(\n        address signer,\n        bytes32 digest,\n        bytes memory signature\n    ) internal pure returns (bool) {\n        if (signature.length == 64) {\n            (bytes32 r, bytes32 vs) = decodeShortECDSASignature(signature);\n            return isValidECDSASignature(signer, digest, r, vs);\n        }\n\n        return validateECDSASignature(signer, digest, signature) == Error.NoError;\n    }\n\n    /**\n     * @dev    Returns whether an ECDSA/secp256k1 short signature is valid for a signer and digest.\n     * @param  signer The address of the account purported to have signed.\n     * @param  digest The hash of the data that was signed.\n     * @param  r      An ECDSA/secp256k1 signature parameter.\n     * @param  vs     An ECDSA/secp256k1 short signature parameter.\n     * @return        Whether the signature is valid or not.\n     */\n    function isValidECDSASignature(address signer, bytes32 digest, bytes32 r, bytes32 vs) internal pure returns (bool) {\n        return validateECDSASignature(signer, digest, r, vs) == Error.NoError;\n    }\n\n    /**\n     * @dev    Returns the signer of an ECDSA/secp256k1 signature for some digest.\n     * @param  digest    The hash of the data that was signed.\n     * @param  signature A byte array ECDSA/secp256k1 signature.\n     * @return           An error, if any, that occurred during the signer recovery.\n     * @return           The address of the account recovered form the signature (0 if error).\n     */\n    function recoverECDSASigner(bytes32 digest, bytes memory signature) internal pure returns (Error, address) {\n        if (signature.length != 65) return (Error.InvalidSignatureLength, address(0));\n\n        (uint8 v, bytes32 r, bytes32 s) = decodeECDSASignature(signature);\n\n        return recoverECDSASigner(digest, v, r, s);\n    }\n\n    /**\n     * @dev    Returns the signer of an ECDSA/secp256k1 short signature for some digest.\n     * @dev    See https://eips.ethereum.org/EIPS/eip-2098\n     * @param  digest The hash of the data that was signed.\n     * @param  r      An ECDSA/secp256k1 signature parameter.\n     * @param  vs     An ECDSA/secp256k1 short signature parameter.\n     * @return        An error, if any, that occurred during the signer recovery.\n     * @return        The address of the account recovered form the signature (0 if error).\n     */\n    function recoverECDSASigner(bytes32 digest, bytes32 r, bytes32 vs) internal pure returns (Error, address) {\n        unchecked {\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            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n            return recoverECDSASigner(digest, v, r, s);\n        }\n    }\n\n    /**\n     * @dev    Returns the signer of an ECDSA/secp256k1 signature for some digest.\n     * @param  digest The hash of the data that was signed.\n     * @param  v      An ECDSA/secp256k1 signature parameter.\n     * @param  r      An ECDSA/secp256k1 signature parameter.\n     * @param  s      An ECDSA/secp256k1 signature parameter.\n     * @return        An error, if any, that occurred during the signer recovery.\n     * @return signer The address of the account recovered form the signature (0 if error).\n     */\n    function recoverECDSASigner(\n        bytes32 digest,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (Error, address signer) {\n        // 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}.\n        if (uint256(s) > uint256(0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0))\n            return (Error.InvalidSignatureS, address(0));\n\n        if (v != 27 && v != 28) return (Error.InvalidSignatureV, address(0));\n\n        signer = ecrecover(digest, v, r, s);\n\n        return (signer == address(0)) ? (Error.InvalidSignature, address(0)) : (Error.NoError, signer);\n    }\n\n    /**\n     * @dev    Returns an error, if any, in validating an ECDSA/secp256k1 signature for a signer and digest.\n     * @param  signer    The address of the account purported to have signed.\n     * @param  digest    The hash of the data that was signed.\n     * @param  signature A byte array ERC1271 signature.\n     * @return           An error, if any, that occurred during the signer recovery.\n     */\n    function validateECDSASignature(\n        address signer,\n        bytes32 digest,\n        bytes memory signature\n    ) internal pure returns (Error) {\n        (Error recoverError, address recoveredSigner) = recoverECDSASigner(digest, signature);\n\n        return (recoverError == Error.NoError) ? validateRecoveredSigner(signer, recoveredSigner) : recoverError;\n    }\n\n    /**\n     * @dev    Returns an error, if any, in validating an ECDSA/secp256k1 short signature for a signer and digest.\n     * @param  signer The address of the account purported to have signed.\n     * @param  digest The hash of the data that was signed.\n     * @param  r      An ECDSA/secp256k1 signature parameter.\n     * @param  vs     An ECDSA/secp256k1 short signature parameter.\n     * @return        An error, if any, that occurred during the signer recovery.\n     */\n    function validateECDSASignature(\n        address signer,\n        bytes32 digest,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (Error) {\n        (Error recoverError, address recoveredSigner) = recoverECDSASigner(digest, r, vs);\n\n        return (recoverError == Error.NoError) ? validateRecoveredSigner(signer, recoveredSigner) : recoverError;\n    }\n\n    /**\n     * @dev    Returns an error, if any, in validating an ECDSA/secp256k1 signature for a signer and digest.\n     * @param  signer The address of the account purported to have signed.\n     * @param  digest The hash of the data that was signed.\n     * @param  v      An ECDSA/secp256k1 signature parameter.\n     * @param  r      An ECDSA/secp256k1 signature parameter.\n     * @param  s      An ECDSA/secp256k1 signature parameter.\n     * @return        An error, if any, that occurred during the signer recovery.\n     */\n    function validateECDSASignature(\n        address signer,\n        bytes32 digest,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (Error) {\n        (Error recoverError, address recoveredSigner) = recoverECDSASigner(digest, v, r, s);\n\n        return (recoverError == Error.NoError) ? validateRecoveredSigner(signer, recoveredSigner) : recoverError;\n    }\n\n    /**\n     * @dev    Returns an error if `signer` is not `recoveredSigner`.\n     * @param  signer          The address of the some signer.\n     * @param  recoveredSigner The address of the some recoveredSigner.\n     * @return                 An error if `signer` is not `recoveredSigner`.\n     */\n    function validateRecoveredSigner(address signer, address recoveredSigner) internal pure returns (Error) {\n        return (signer == recoveredSigner) ? Error.NoError : Error.SignerMismatch;\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/src/MExtension.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.26;\n\nimport { ERC20ExtendedUpgradeable } from \"../lib/common/src/ERC20ExtendedUpgradeable.sol\";\n\nimport { IERC20 } from \"../lib/common/src/interfaces/IERC20.sol\";\n\nimport { IMTokenLike } from \"./interfaces/IMTokenLike.sol\";\nimport { IMExtension } from \"./interfaces/IMExtension.sol\";\nimport { ISwapFacility } from \"./swap/interfaces/ISwapFacility.sol\";\n\n/**\n * @title  MExtension\n * @notice Upgradeable ERC20 Token contract for wrapping M into a non-rebasing token.\n * @author M0 Labs\n */\nabstract contract MExtension is IMExtension, ERC20ExtendedUpgradeable {\n    /* ============ Variables ============ */\n\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n    /// @inheritdoc IMExtension\n    address public immutable mToken;\n\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n    /// @inheritdoc IMExtension\n    address public immutable swapFacility;\n\n    /* ============ Modifiers ============ */\n\n    /// @dev Modifier to check if caller is SwapFacility.\n    modifier onlySwapFacility() {\n        if (msg.sender != swapFacility) revert NotSwapFacility();\n        _;\n    }\n\n    /* ============ Constructor ============ */\n\n    /**\n     * @custom:oz-upgrades-unsafe-allow constructor\n     * @notice Constructs MExtension Implementation contract\n     * @dev    Sets immutable storage.\n     * @param  mToken_       The address of $M token.\n     * @param  swapFacility_ The address of Swap Facility.\n     */\n    constructor(address mToken_, address swapFacility_) {\n        _disableInitializers();\n\n        if ((mToken = mToken_) == address(0)) revert ZeroMToken();\n        if ((swapFacility = swapFacility_) == address(0)) revert ZeroSwapFacility();\n    }\n\n    /* ============ Initializer ============ */\n\n    /**\n     * @notice Initializes the generic M extension token.\n     * @param name          The name of the token (e.g. \"HALO USD\").\n     * @param symbol        The symbol of the token (e.g. \"HUSD\").\n     */\n    function __MExtension_init(string memory name, string memory symbol) internal onlyInitializing {\n        __ERC20ExtendedUpgradeable_init(name, symbol, 6);\n    }\n\n    /* ============ Interactive Functions ============ */\n\n    /// @inheritdoc IMExtension\n    function wrap(address recipient, uint256 amount) external onlySwapFacility {\n        // NOTE: `msg.sender` is always SwapFacility contract.\n        //       `ISwapFacility.msgSender()` is used to ensure that the original caller is passed to `_beforeWrap`.\n        _wrap(ISwapFacility(msg.sender).msgSender(), recipient, amount);\n    }\n\n    /// @inheritdoc IMExtension\n    function unwrap(address /* recipient */, uint256 amount) external onlySwapFacility {\n        // NOTE: `msg.sender` is always SwapFacility contract.\n        //       `ISwapFacility.msgSender()` is used to ensure that the original caller is passed to `_beforeUnwrap`.\n        // NOTE: `recipient` is not used in this function as the $M is always sent to SwapFacility contract.\n        _unwrap(ISwapFacility(msg.sender).msgSender(), amount);\n    }\n\n    /// @inheritdoc IMExtension\n    function enableEarning() external virtual {\n        if (isEarningEnabled()) revert EarningIsEnabled();\n\n        emit EarningEnabled(currentIndex());\n\n        IMTokenLike(mToken).startEarning();\n    }\n\n    /// @inheritdoc IMExtension\n    function disableEarning() external virtual {\n        if (!isEarningEnabled()) revert EarningIsDisabled();\n\n        emit EarningDisabled(currentIndex());\n\n        IMTokenLike(mToken).stopEarning(address(this));\n    }\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @inheritdoc IMExtension\n    function currentIndex() public view virtual returns (uint128) {\n        return IMTokenLike(mToken).currentIndex();\n    }\n\n    /// @inheritdoc IMExtension\n    function isEarningEnabled() public view virtual returns (bool) {\n        return IMTokenLike(mToken).isEarning(address(this));\n    }\n\n    /// @inheritdoc IERC20\n    function balanceOf(address account) public view virtual returns (uint256);\n\n    /* ============ Hooks For Internal Interactive Functions ============ */\n\n    /**\n     * @dev   Hook called before approval of M Extension token.\n     * @param account   The sender's address.\n     * @param spender   The spender address.\n     * @param amount    The amount to be approved.\n     */\n    function _beforeApprove(address account, address spender, uint256 amount) internal virtual {}\n\n    /**\n     * @dev    Hook called before wrapping M into M Extension token.\n     * @param  account   The account from which M is deposited.\n     * @param  recipient The account receiving the minted M Extension token.\n     * @param  amount    The amount of M deposited.\n     */\n    function _beforeWrap(address account, address recipient, uint256 amount) internal virtual {}\n\n    /**\n     * @dev   Hook called before unwrapping M Extension token.\n     * @param account   The account from which M Extension token is burned.\n     * @param amount    The amount of M Extension token burned.\n     */\n    function _beforeUnwrap(address account, uint256 amount) internal virtual {}\n\n    /**\n     * @dev   Hook called before transferring M Extension token.\n     * @param sender    The sender's address.\n     * @param recipient The recipient's address.\n     * @param amount    The amount to be transferred.\n     */\n    function _beforeTransfer(address sender, address recipient, uint256 amount) internal virtual {}\n\n    /* ============ Internal Interactive Functions ============ */\n\n    /**\n     * @dev Approve `spender` to spend `amount` of tokens from `account`.\n     * @param account The address approving the allowance.\n     * @param spender The address approved to spend the tokens.\n     * @param amount  The amount of tokens being approved for spending.\n     */\n    function _approve(address account, address spender, uint256 amount) internal override {\n        // NOTE: Add extension-specific checks before approval.\n        _beforeApprove(account, spender, amount);\n\n        super._approve(account, spender, amount);\n    }\n\n    /**\n     * @dev    Wraps `amount` M from `account` into M Extension for `recipient`.\n     * @param  account   The original caller of SwapFacility functions.\n     * @param  recipient The account receiving the minted M Extension token.\n     * @param  amount    The amount of M deposited.\n     */\n    function _wrap(address account, address recipient, uint256 amount) internal {\n        _revertIfInvalidRecipient(recipient);\n        _revertIfInsufficientAmount(amount);\n\n        // NOTE: Add extension-specific checks before wrapping.\n        _beforeWrap(account, recipient, amount);\n\n        // NOTE: `msg.sender` is always SwapFacility contract.\n        // NOTE: The behavior of `IMTokenLike.transferFrom` is known, so its return can be ignored.\n        IMTokenLike(mToken).transferFrom(msg.sender, address(this), amount);\n\n        // NOTE: This method is overridden by the inheriting M Extension contract.\n        // NOTE: Mints precise amount of $M Extension token to `recipient`.\n        //       Option 1: $M transfer from an $M earner to another $M earner ($M Extension in earning state): rounds up → rounds up,\n        //                 0, 1, or XX extra wei may be locked in M Extension compared to the minted amount of $M Extension token.\n        //       Option 2: $M transfer from an $M non-earner to an $M earner ($M Extension in earning state): precise $M transfer → rounds down,\n        //                 0, -1, or -XX wei may be locked in $M Extension compared to the minted amount of $M Extension token.\n        //\n        _mint(recipient, amount);\n    }\n\n    /**\n     * @dev    Unwraps `amount` M Extension token from `account` into $M and transfers to SwapFacility.\n     * @param  account   The original caller of SwapFacility functions.\n     * @param  amount    The amount of M Extension token burned.\n     */\n    function _unwrap(address account, uint256 amount) internal {\n        _revertIfInsufficientAmount(amount);\n\n        // NOTE: Add extension-specific checks before unwrapping.\n        _beforeUnwrap(account, amount);\n\n        _revertIfInsufficientBalance(msg.sender, amount);\n\n        // NOTE: This method will be overridden by the inheriting M Extension contract.\n        // NOTE: Computes the actual decrease in the $M balance of the $M Extension contract.\n        //       Option 1: $M transfer from an $M earner ($M Extension in earning state) to another $M earner: round up → rounds up.\n        //       Option 2: $M transfer from an $M earner ($M Extension in earning state) to an $M non-earner: round up → precise $M transfer.\n        //       In both cases, 0, 1, or XX extra wei may be deducted from the $M Extension contract's $M balance compared to the burned amount of $M Extension token.\n        // NOTE: Always burn from SwapFacility as it is the only contract that can call this function.\n        _burn(msg.sender, amount);\n\n        // NOTE: The behavior of `IMTokenLike.transfer` is known, so its return can be ignored.\n        // NOTE: `msg.sender` is always SwapFacility contract.\n        IMTokenLike(mToken).transfer(msg.sender, amount);\n    }\n\n    /**\n     * @dev   Mints `amount` tokens to `recipient`.\n     * @param recipient The address to which the tokens will be minted.\n     * @param amount    The amount of tokens to mint.\n     */\n    function _mint(address recipient, uint256 amount) internal virtual;\n\n    /**\n     * @dev   Burns `amount` tokens from `account`.\n     * @param account The address from which the tokens will be burned.\n     * @param amount  The amount of tokens to burn.\n     */\n    function _burn(address account, uint256 amount) internal virtual;\n\n    /**\n     * @dev   Internal balance update function that needs to be implemented by the inheriting contract.\n     * @param sender    The sender's address.\n     * @param recipient The recipient's address.\n     * @param amount    The amount to be transferred.\n     */\n    function _update(address sender, address recipient, uint256 amount) internal virtual;\n\n    /**\n     * @dev   Internal ERC20 transfer function.\n     * @param sender    The sender's address.\n     * @param recipient The recipient's address.\n     * @param amount    The amount to be transferred.\n     */\n    function _transfer(address sender, address recipient, uint256 amount) internal override {\n        _revertIfInvalidRecipient(recipient);\n\n        // NOTE: Add extension-specific checks before transfers.\n        _beforeTransfer(sender, recipient, amount);\n\n        emit Transfer(sender, recipient, amount);\n\n        if (amount == 0) return;\n\n        _revertIfInsufficientBalance(sender, amount);\n\n        // NOTE: This method will be overridden by the inheriting M Extension contract.\n        _update(sender, recipient, amount);\n    }\n\n    /* ============ Internal View/Pure Functions ============ */\n\n    /**\n     * @dev    Returns the M Token balance of `account`.\n     * @param  account The account being queried.\n     * @return balance The M Token balance of the account.\n     */\n    function _mBalanceOf(address account) internal view returns (uint256) {\n        return IMTokenLike(mToken).balanceOf(account);\n    }\n\n    /**\n     * @dev   Reverts if `recipient` is address(0).\n     * @param recipient Address of a recipient.\n     */\n    function _revertIfInvalidRecipient(address recipient) internal pure {\n        if (recipient == address(0)) revert InvalidRecipient(recipient);\n    }\n\n    /**\n     * @dev   Reverts if `amount` is equal to 0.\n     * @param amount Amount of token.\n     */\n    function _revertIfInsufficientAmount(uint256 amount) internal pure {\n        if (amount == 0) revert InsufficientAmount(amount);\n    }\n\n    /**\n     * @dev   Reverts if `account` balance is below `amount`.\n     * @param account Address of an account.\n     * @param amount  Amount to transfer or burn.\n     */\n    function _revertIfInsufficientBalance(address account, uint256 amount) internal view {\n        uint256 balance = balanceOf(account);\n\n        if (balance < amount) revert InsufficientBalance(account, balance, amount);\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/src/components/Freezable.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.26;\n\nimport {\n    AccessControlUpgradeable\n} from \"../../lib/common/lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol\";\n\nimport { IFreezable } from \"./IFreezable.sol\";\n\nabstract contract FreezableStorageLayout {\n    /// @custom:storage-location erc7201:M0.storage.Freezable\n    struct FreezableStorageStruct {\n        mapping(address account => bool isFrozen) isFrozen;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"M0.storage.Freezable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant _FREEZABLE_STORAGE_LOCATION =\n        0x2fd5767309dce890c526ace85d7fe164825199d7dcd99c33588befc51b32ce00;\n\n    function _getFreezableStorageLocation() internal pure returns (FreezableStorageStruct storage $) {\n        assembly {\n            $.slot := _FREEZABLE_STORAGE_LOCATION\n        }\n    }\n}\n\n/**\n * @title Freezable\n * @notice Upgradeable contract that allows for the freezing of accounts.\n * @dev This contract is used to prevent certain accounts from interacting with the contract.\n * @author M0 Labs\n */\nabstract contract Freezable is IFreezable, FreezableStorageLayout, AccessControlUpgradeable {\n    /* ============ Variables ============ */\n\n    /// @inheritdoc IFreezable\n    bytes32 public constant FREEZE_MANAGER_ROLE = keccak256(\"FREEZE_MANAGER_ROLE\");\n\n    /* ============ Initializer ============ */\n\n    /**\n     * @notice Initializes the contract with the given freeze manager.\n     * @param freezeManager The address of a freeze manager.\n     */\n    function __Freezable_init(address freezeManager) internal onlyInitializing {\n        if (freezeManager == address(0)) revert ZeroFreezeManager();\n        _grantRole(FREEZE_MANAGER_ROLE, freezeManager);\n    }\n\n    /* ============ Interactive Functions ============ */\n\n    /// @inheritdoc IFreezable\n    function freeze(address account) external onlyRole(FREEZE_MANAGER_ROLE) {\n        _freeze(_getFreezableStorageLocation(), account);\n    }\n\n    /// @inheritdoc IFreezable\n    function freezeAccounts(address[] calldata accounts) external onlyRole(FREEZE_MANAGER_ROLE) {\n        FreezableStorageStruct storage $ = _getFreezableStorageLocation();\n\n        for (uint256 i; i < accounts.length; ++i) {\n            _freeze($, accounts[i]);\n        }\n    }\n\n    /// @inheritdoc IFreezable\n    function unfreeze(address account) external onlyRole(FREEZE_MANAGER_ROLE) {\n        _unfreeze(_getFreezableStorageLocation(), account);\n    }\n\n    /// @inheritdoc IFreezable\n    function unfreezeAccounts(address[] calldata accounts) external onlyRole(FREEZE_MANAGER_ROLE) {\n        FreezableStorageStruct storage $ = _getFreezableStorageLocation();\n\n        for (uint256 i; i < accounts.length; ++i) {\n            _unfreeze($, accounts[i]);\n        }\n    }\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @inheritdoc IFreezable\n    function isFrozen(address account) public view returns (bool) {\n        return _getFreezableStorageLocation().isFrozen[account];\n    }\n\n    /* ============ Internal Interactive Functions ============ */\n\n    /**\n     * @notice Internal function that freezes an account.\n     * @param $ The storage location of the freezable contract.\n     * @param account The account to freeze.\n     */\n    function _freeze(FreezableStorageStruct storage $, address account) internal {\n        // Return early if the account is already frozen\n        if ($.isFrozen[account]) return;\n\n        $.isFrozen[account] = true;\n\n        emit Frozen(account, block.timestamp);\n    }\n\n    /**\n     * @notice Internal function that unfreezes an account.\n     * @param $ The storage location of the freezable contract.\n     * @param account The account to unfreeze.\n     */\n    function _unfreeze(FreezableStorageStruct storage $, address account) internal {\n        // Return early if the account is not frozen\n        if (!$.isFrozen[account]) return;\n\n        $.isFrozen[account] = false;\n\n        emit Unfrozen(account, block.timestamp);\n    }\n\n    /* ============ Internal View/Pure Functions ============ */\n\n    /**\n     * @notice Internal function that reverts if an account is frozen.\n     * @dev Called by inheriting contracts to check if an account is frozen.\n     * @param $ The storage location of the freezable contract.\n     * @param account The account to check.\n     */\n    function _revertIfFrozen(FreezableStorageStruct storage $, address account) internal view {\n        if ($.isFrozen[account]) revert AccountFrozen(account);\n    }\n\n    /**\n     * @notice Internal function that reverts if an account is frozen.\n     * @dev Called by inheriting contracts to check if an account is frozen.\n     * @param account The account to check.\n     */\n    function _revertIfFrozen(address account) internal view {\n        if (_getFreezableStorageLocation().isFrozen[account]) revert AccountFrozen(account);\n    }\n\n    /**\n     * @notice Internal function that reverts if an account is not frozen.\n     * @dev Called by inheriting contracts to check if an account is not frozen.\n     * @param $ The storage location of the freezable contract.\n     * @param account The account to check.\n     */\n    function _revertIfNotFrozen(FreezableStorageStruct storage $, address account) internal view {\n        if (!$.isFrozen[account]) revert AccountNotFrozen(account);\n    }\n\n    /**\n     * @notice Internal function that reverts if an account is not frozen.\n     * @dev Called by inheriting contracts to check if an account is not frozen.\n     * @param account The account to check.\n     */\n    function _revertIfNotFrozen(address account) internal view {\n        if (!_getFreezableStorageLocation().isFrozen[account]) revert AccountNotFrozen(account);\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/src/components/IFreezable.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.26;\n\n/**\n * @title Freezable interface.\n * @author M0 Labs\n */\ninterface IFreezable {\n    /* ============ Events ============ */\n\n    /**\n     * @notice Emitted when an account is frozen.\n     * @param account The address of the frozen account.\n     * @param timestamp The timestamp at which the account was frozen.\n     */\n    event Frozen(address indexed account, uint256 timestamp);\n\n    /**\n     * @notice Emitted when an account is unfrozen.\n     * @param account The address of the unfrozen account.\n     * @param timestamp The timestamp at which the account was unfrozen.\n     */\n    event Unfrozen(address indexed account, uint256 timestamp);\n\n    /* ============ Errors ============ */\n\n    /**\n     * @notice Emitted when an account is already frozen.\n     * @param account The address of the frozen account.\n     */\n    error AccountFrozen(address account);\n\n    /**\n     * @notice Emitted when an account is not frozen.\n     * @param account The address of the account that is not frozen.\n     */\n    error AccountNotFrozen(address account);\n\n    /// @notice Emitted if no freeze manager is set.\n    error ZeroFreezeManager();\n\n    /* ============ Interactive Functions ============ */\n\n    /**\n     * @notice Freezes an account.\n     * @dev MUST only be callable by the FREEZE_MANAGER_ROLE.\n     * @param account The address of the account to freeze.\n     */\n    function freeze(address account) external;\n\n    /**\n     * @notice Freezes multiple accounts.\n     * @dev MUST only be callable by the FREEZE_MANAGER_ROLE.\n     * @param accounts The list of addresses to freeze.\n     */\n    function freezeAccounts(address[] calldata accounts) external;\n\n    /**\n     * @notice Unfreezes an account.\n     * @dev MUST only be callable by the FREEZE_MANAGER_ROLE.\n     * @param account The address of the account to unfreeze.\n     */\n    function unfreeze(address account) external;\n\n    /**\n     * @notice Unfreezes multiple accounts.\n     * @dev MUST only be callable by the FREEZE_MANAGER_ROLE.\n     * @param accounts The list of addresses to unfreeze.\n     */\n    function unfreezeAccounts(address[] calldata accounts) external;\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @notice The role that can manage the freezelist.\n    function FREEZE_MANAGER_ROLE() external view returns (bytes32);\n\n    /**\n     * @notice Returns whether an account is frozen or not.\n     * @param account The address of the account to check.\n     * @return True if the account is frozen, false otherwise.\n     */\n    function isFrozen(address account) external view returns (bool);\n}\n"},{"file_path":"lib/evm-m-extensions/src/interfaces/IMExtension.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.26;\n\nimport { IERC20Extended } from \"../../lib/common/src/interfaces/IERC20Extended.sol\";\n\n/**\n * @title  M Extension interface extending Extended ERC20,\n *         includes additional enable/disable earnings and index logic.\n * @author M0 Labs\n */\ninterface IMExtension is IERC20Extended {\n    /* ============ Events ============ */\n\n    /**\n     * @notice Emitted when M extension earning is enabled.\n     * @param  index The index at the moment earning is enabled.\n     */\n    event EarningEnabled(uint128 index);\n\n    /**\n     * @notice Emitted when M extension earning is disabled.\n     * @param  index The index at the moment earning is disabled.\n     */\n    event EarningDisabled(uint128 index);\n\n    /* ============ Custom Errors ============ */\n\n    /// @notice Emitted when performing an operation that is not allowed when earning is disabled.\n    error EarningIsDisabled();\n\n    /// @notice Emitted when performing an operation that is not allowed when earning is enabled.\n    error EarningIsEnabled();\n\n    /**\n     * @notice Emitted when there is insufficient balance to decrement from `account`.\n     * @param  account The account with insufficient balance.\n     * @param  balance The balance of the account.\n     * @param  amount  The amount to decrement.\n     */\n    error InsufficientBalance(address account, uint256 balance, uint256 amount);\n\n    /// @notice Emitted in constructor if M Token is 0x0.\n    error ZeroMToken();\n\n    /// @notice Emitted in constructor if Swap Facility is 0x0.\n    error ZeroSwapFacility();\n\n    /// @notice Emitted in `wrap` and `unwrap` functions if the caller is not the Swap Facility.\n    error NotSwapFacility();\n\n    /* ============ Interactive Functions ============ */\n\n    /**\n     * @notice Enables earning of extension token if allowed by the TTG Registrar and if it has never been done.\n     * @dev SHOULD be virtual to allow extensions to override it.\n     */\n    function enableEarning() external;\n\n    /**\n     * @notice Disables earning of extension token if disallowed by the TTG Registrar and if it has never been done.\n     * @dev SHOULD be virtual to allow extensions to override it.\n     */\n    function disableEarning() external;\n\n    /**\n     * @notice Wraps `amount` M from the caller into extension token for `recipient`.\n     * @dev    Can only be called by the SwapFacility.\n     * @param  recipient The account receiving the minted M extension token.\n     * @param  amount    The amount of M extension token minted.\n     */\n    function wrap(address recipient, uint256 amount) external;\n\n    /**\n     * @notice Unwraps `amount` extension token from the caller into M for `recipient`.\n     * @dev    Can only be called by the SwapFacility.\n     * @param  recipient The account receiving the withdrawn M,\n     *         it will always be the SwapFacility (keep `recipient` for backward compatibility).\n     * @param  amount    The amount of M extension token burned.\n     */\n    function unwrap(address recipient, uint256 amount) external;\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @notice The address of the M Token contract.\n    function mToken() external view returns (address);\n\n    /// @notice The address of the SwapFacility contract.\n    function swapFacility() external view returns (address);\n\n    /**\n     * @notice Whether M extension earning is enabled.\n     * @dev SHOULD be virtual to allow extensions to override it.\n     */\n    function isEarningEnabled() external view returns (bool);\n\n    /**\n     * @notice Returns the current index for M extension earnings.\n     * @dev SHOULD be virtual to allow extensions to override it.\n     */\n    function currentIndex() external view returns (uint128);\n}\n"},{"file_path":"lib/evm-m-extensions/src/interfaces/IMTokenLike.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.26;\n\n/**\n * @title  Subset of M Token interface required for source contracts.\n * @author M0 Labs\n */\ninterface IMTokenLike {\n    /* ============ Custom Errors ============ */\n\n    /// @notice Emitted when calling `stopEarning` for an account approved as earner by TTG.\n    error IsApprovedEarner();\n\n    /// @notice Emitted when calling `startEarning` for an account not approved as earner by TTG.\n    error NotApprovedEarner();\n\n    /* ============ Interactive Functions ============ */\n\n    /**\n     * @notice Allows a calling account to approve `spender` to spend up to `amount` of its token balance.\n     * @dev    MUST emit an `Approval` event.\n     * @param  spender The address of the account being allowed to spend up to the allowed amount.\n     * @param  amount  The amount of the allowance being approved.\n     * @return Whether or not the approval was successful.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @notice Approves `spender` to spend up to `amount` of the token balance of `owner`, via a signature.\n     * @param  owner    The address of the account who's token balance is being approved to be spent by `spender`.\n     * @param  spender  The address of an account allowed to spend on behalf of `owner`.\n     * @param  value    The amount of the allowance being approved.\n     * @param  deadline The last timestamp where the signature is still valid.\n     * @param  v        An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  r        An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  s        An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\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     * @notice Approves `spender` to spend up to `amount` of the token balance of `owner`, via a signature.\n     * @param  owner     The address of the account who's token balance is being approved to be spent by `spender`.\n     * @param  spender   The address of an account allowed to spend on behalf of `owner`.\n     * @param  value     The amount of the allowance being approved.\n     * @param  deadline  The last timestamp where the signature is still valid.\n     * @param  signature An arbitrary signature (EIP-712).\n     */\n    function permit(address owner, address spender, uint256 value, uint256 deadline, bytes memory signature) external;\n\n    /**\n     * @notice Allows a calling account to transfer `amount` tokens to `recipient`.\n     * @param  recipient The address of the recipient who's token balance will be incremented.\n     * @param  amount    The amount of tokens being transferred.\n     * @return success   Whether or not the transfer was successful.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @notice Allows a calling account to transfer `amount` tokens from `sender`, with allowance, to a `recipient`.\n     * @param  sender    The address of the sender who's token balance will be decremented.\n     * @param  recipient The address of the recipient who's token balance will be incremented.\n     * @param  amount    The amount of tokens being transferred.\n     * @return success   Whether or not the transfer was successful.\n     */\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n    /// @notice Starts earning for caller if allowed by the Registrar.\n    function startEarning() external;\n\n    /**\n     * @notice Stops earning for `account`.\n     * @dev    MUST revert if `account` is an approved earner in TTG Registrar.\n     * @param  account The account to stop earning for.\n     */\n    function stopEarning(address account) external;\n\n    /* ============ View/Pure Functions ============ */\n\n    /**\n     * @notice Checks if account is an earner.\n     * @param  account The account to check.\n     * @return earning True if account is an earner, false otherwise.\n     */\n    function isEarning(address account) external view returns (bool);\n\n    /**\n     * @notice Returns the token balance of `account`.\n     * @param  account The address of some account.\n     * @return balance The token balance of `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @notice Returns the token balance of `account`.\n     * @param  account The address of some account.\n     * @return principal The principal token balance of `account`.\n     */\n    function principalBalanceOf(address account) external view returns (uint240);\n\n    /// @notice The current index that would be written to storage if `updateIndex` is called.\n    function currentIndex() external view returns (uint128);\n\n    /// @notice The current value of earner rate in basis points.\n    function earnerRate() external view returns (uint32);\n\n    /// @notice Returns the EIP712 domain separator used in the encoding of a signed digest.\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n    /// @notice Returns the EIP712 typehash used in the encoding of the digest for the permit function.\n    function PERMIT_TYPEHASH() external view returns (bytes32);\n\n    /// @notice Updates the index and returns it.\n    function updateIndex() external returns (uint128);\n}\n"},{"file_path":"lib/evm-m-extensions/src/projects/yieldToOne/IMYieldToOne.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.26;\n\n/**\n * @title M Extension where all yield is claimable by a single recipient.\n * @author M0 Labs\n */\ninterface IMYieldToOne {\n    /* ============ Events ============ */\n\n    /**\n     * @notice Emitted when this contract's excess M is claimed.\n     * @param  yield The amount of M yield claimed.\n     */\n    event YieldClaimed(uint256 yield);\n\n    /**\n     * @notice Emitted when the yield recipient is set.\n     * @param  yieldRecipient The address of the new yield recipient.\n     */\n    event YieldRecipientSet(address indexed yieldRecipient);\n\n    /* ============ Custom Errors ============ */\n\n    /// @notice Emitted in constructor if Yield Recipient is 0x0.\n    error ZeroYieldRecipient();\n\n    /// @notice Emitted in constructor if Yield Recipient Manager is 0x0.\n    error ZeroYieldRecipientManager();\n\n    /// @notice Emitted in constructor if Admin is 0x0.\n    error ZeroAdmin();\n\n    /* ============ Interactive Functions ============ */\n\n    /// @notice Claims accrued yield to yield recipient.\n    function claimYield() external returns (uint256);\n\n    /**\n     * @notice Sets the yield recipient.\n     * @dev    MUST only be callable by the YIELD_RECIPIENT_MANAGER_ROLE.\n     * @dev    SHOULD revert if `yieldRecipient` is 0x0.\n     * @dev    SHOULD return early if the `yieldRecipient` is already the actual yield recipient.\n     * @param  yieldRecipient The address of the new yield recipient.\n     */\n    function setYieldRecipient(address yieldRecipient) external;\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @notice The role that can manage the yield recipient.\n    function YIELD_RECIPIENT_MANAGER_ROLE() external view returns (bytes32);\n\n    /// @notice The amount of accrued yield.\n    function yield() external view returns (uint256);\n\n    /// @notice The address of the yield recipient.\n    function yieldRecipient() external view returns (address);\n}\n"},{"file_path":"lib/evm-m-extensions/src/projects/yieldToOne/MYieldToOne.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.26;\n\nimport { IERC20 } from \"../../../lib/common/src/interfaces/IERC20.sol\";\n\nimport { IMYieldToOne } from \"./IMYieldToOne.sol\";\n\nimport { Freezable } from \"../../components/Freezable.sol\";\nimport { MExtension } from \"../../MExtension.sol\";\n\nabstract contract MYieldToOneStorageLayout {\n    /// @custom:storage-location erc7201:M0.storage.MYieldToOne\n    struct MYieldToOneStorageStruct {\n        uint256 totalSupply;\n        address yieldRecipient;\n        mapping(address account => uint256 balance) balanceOf;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"M0.storage.MYieldToOne\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant _M_YIELD_TO_ONE_STORAGE_LOCATION =\n        0xee2f6fc7e2e5879b17985791e0d12536cba689bda43c77b8911497248f4af100;\n\n    function _getMYieldToOneStorageLocation() internal pure returns (MYieldToOneStorageStruct storage $) {\n        assembly {\n            $.slot := _M_YIELD_TO_ONE_STORAGE_LOCATION\n        }\n    }\n}\n\n/**\n * @title  MYieldToOne\n * @notice Upgradeable ERC20 Token contract for wrapping M into a non-rebasing token\n *         with yield claimable by a single recipient.\n * @author M0 Labs\n */\ncontract MYieldToOne is IMYieldToOne, MYieldToOneStorageLayout, MExtension, Freezable {\n    /* ============ Variables ============ */\n\n    /// @inheritdoc IMYieldToOne\n    bytes32 public constant YIELD_RECIPIENT_MANAGER_ROLE = keccak256(\"YIELD_RECIPIENT_MANAGER_ROLE\");\n\n    /* ============ Constructor ============ */\n\n    /**\n     * @custom:oz-upgrades-unsafe-allow constructor\n     * @notice Constructs MYieldToOne Implementation contract\n     * @dev    Sets immutable storage.\n     * @param  mToken       The address of $M token.\n     * @param  swapFacility The address of Swap Facility.\n     */\n    constructor(address mToken, address swapFacility) MExtension(mToken, swapFacility) {}\n\n    /* ============ Initializer ============ */\n\n    /**\n     * @dev   Initializes the M extension token with yield claimable by a single recipient.\n     * @param name                  The name of the token (e.g. \"M Yield to One\").\n     * @param symbol                The symbol of the token (e.g. \"MYO\").\n     * @param yieldRecipient_       The address of a yield destination.\n     * @param admin                 The address of an admin.\n     * @param freezeManager         The address of a freeze manager.\n     * @param yieldRecipientManager The address of a yield recipient setter.\n     */\n    function initialize(\n        string memory name,\n        string memory symbol,\n        address yieldRecipient_,\n        address admin,\n        address freezeManager,\n        address yieldRecipientManager\n    ) public virtual initializer {\n        __MYieldToOne_init(name, symbol, yieldRecipient_, admin, freezeManager, yieldRecipientManager);\n    }\n\n    /**\n     * @notice Initializes the MYieldToOne token.\n     * @param name                  The name of the token (e.g. \"M Yield to One\").\n     * @param symbol                The symbol of the token (e.g. \"MYO\").\n     * @param yieldRecipient_       The address of a yield destination.\n     * @param admin                 The address of an admin.\n     * @param freezeManager         The address of a freeze manager.\n     * @param yieldRecipientManager The address of a yield recipient setter.\n     */\n    function __MYieldToOne_init(\n        string memory name,\n        string memory symbol,\n        address yieldRecipient_,\n        address admin,\n        address freezeManager,\n        address yieldRecipientManager\n    ) internal onlyInitializing {\n        if (yieldRecipientManager == address(0)) revert ZeroYieldRecipientManager();\n        if (admin == address(0)) revert ZeroAdmin();\n\n        __MExtension_init(name, symbol);\n        __Freezable_init(freezeManager);\n\n        _setYieldRecipient(yieldRecipient_);\n\n        _grantRole(DEFAULT_ADMIN_ROLE, admin);\n        _grantRole(YIELD_RECIPIENT_MANAGER_ROLE, yieldRecipientManager);\n    }\n\n    /* ============ Interactive Functions ============ */\n\n    /// @inheritdoc IMYieldToOne\n    function claimYield() public returns (uint256) {\n        _beforeClaimYield();\n\n        uint256 yield_ = yield();\n\n        if (yield_ == 0) return 0;\n\n        emit YieldClaimed(yield_);\n\n        _mint(yieldRecipient(), yield_);\n\n        return yield_;\n    }\n\n    /// @inheritdoc IMYieldToOne\n    function setYieldRecipient(address account) external onlyRole(YIELD_RECIPIENT_MANAGER_ROLE) {\n        // Claim yield for the previous yield recipient.\n        claimYield();\n\n        _setYieldRecipient(account);\n    }\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @inheritdoc IERC20\n    function balanceOf(address account) public view override returns (uint256) {\n        return _getMYieldToOneStorageLocation().balanceOf[account];\n    }\n\n    /// @inheritdoc IERC20\n    function totalSupply() public view returns (uint256) {\n        return _getMYieldToOneStorageLocation().totalSupply;\n    }\n\n    /// @inheritdoc IMYieldToOne\n    function yield() public view returns (uint256) {\n        unchecked {\n            uint256 balance_ = _mBalanceOf(address(this));\n            uint256 totalSupply_ = totalSupply();\n\n            return balance_ > totalSupply_ ? balance_ - totalSupply_ : 0;\n        }\n    }\n\n    /// @inheritdoc IMYieldToOne\n    function yieldRecipient() public view returns (address) {\n        return _getMYieldToOneStorageLocation().yieldRecipient;\n    }\n\n    /* ============ Hooks For Internal Interactive Functions ============ */\n\n    /**\n     * @dev    Hooks called before approval of M extension spend.\n     * @param  account The account from which M is deposited.\n     * @param  spender The account spending M Extension token.\n     */\n    function _beforeApprove(address account, address spender, uint256 /* amount */) internal view virtual override {\n        FreezableStorageStruct storage $ = _getFreezableStorageLocation();\n\n        _revertIfFrozen($, account);\n        _revertIfFrozen($, spender);\n    }\n\n    /**\n     * @dev    Hooks called before wrapping M into M Extension token.\n     * @param  account   The account from which M is deposited.\n     * @param  recipient The account receiving the minted M Extension token.\n     */\n    function _beforeWrap(address account, address recipient, uint256 /* amount */) internal view virtual override {\n        FreezableStorageStruct storage $ = _getFreezableStorageLocation();\n\n        _revertIfFrozen($, account);\n        _revertIfFrozen($, recipient);\n    }\n\n    /**\n     * @dev   Hook called before unwrapping M Extension token.\n     * @param account The account from which M Extension token is burned.\n     */\n    function _beforeUnwrap(address account, uint256 /* amount */) internal view virtual override {\n        _revertIfFrozen(_getFreezableStorageLocation(), account);\n    }\n\n    /**\n     * @dev   Hook called before transferring M Extension token.\n     * @param sender    The address from which the tokens are being transferred.\n     * @param recipient The address to which the tokens are being transferred.\n     */\n    function _beforeTransfer(address sender, address recipient, uint256 /* amount */) internal view virtual override {\n        FreezableStorageStruct storage $ = _getFreezableStorageLocation();\n\n        _revertIfFrozen($, msg.sender);\n\n        _revertIfFrozen($, sender);\n        _revertIfFrozen($, recipient);\n    }\n\n    /**\n     * @dev   Hook called before claiming yield from the M Extension token. To be overridden in derived extensions.\n     */\n    function _beforeClaimYield() internal view virtual {}\n\n    /* ============ Internal Interactive Functions ============ */\n\n    /**\n     * @dev   Mints `amount` tokens to `recipient`.\n     * @param recipient The address whose account balance will be incremented.\n     * @param amount    The present amount of tokens to mint.`\n     */\n    function _mint(address recipient, uint256 amount) internal override {\n        MYieldToOneStorageStruct storage $ = _getMYieldToOneStorageLocation();\n\n        // NOTE: Can be `unchecked` because the max amount of $M is never greater than `type(uint240).max`.\n        unchecked {\n            $.balanceOf[recipient] += amount;\n            $.totalSupply += amount;\n        }\n\n        emit Transfer(address(0), recipient, amount);\n    }\n\n    /**\n     * @dev   Burns `amount` tokens from `account`.\n     * @param account The address whose account balance will be decremented.\n     * @param amount  The present amount of tokens to burn.\n     */\n    function _burn(address account, uint256 amount) internal override {\n        MYieldToOneStorageStruct storage $ = _getMYieldToOneStorageLocation();\n\n        // NOTE: Can be `unchecked` because `_revertIfInsufficientBalance` is used in MExtension.\n        unchecked {\n            $.balanceOf[account] -= amount;\n            $.totalSupply -= amount;\n        }\n\n        emit Transfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev   Internal balance update function called on transfer.\n     * @param sender    The sender's address.\n     * @param recipient The recipient's address.\n     * @param amount    The amount to be transferred.\n     */\n    function _update(address sender, address recipient, uint256 amount) internal override {\n        MYieldToOneStorageStruct storage $ = _getMYieldToOneStorageLocation();\n\n        // NOTE: Can be `unchecked` because `_revertIfInsufficientBalance` for `sender` is used in MExtension.\n        unchecked {\n            $.balanceOf[sender] -= amount;\n            $.balanceOf[recipient] += amount;\n        }\n    }\n\n    /**\n     * @dev Sets the yield recipient.\n     * @param yieldRecipient_ The address of the new yield recipient.\n     */\n    function _setYieldRecipient(address yieldRecipient_) internal {\n        if (yieldRecipient_ == address(0)) revert ZeroYieldRecipient();\n\n        MYieldToOneStorageStruct storage $ = _getMYieldToOneStorageLocation();\n\n        if (yieldRecipient_ == $.yieldRecipient) return;\n\n        $.yieldRecipient = yieldRecipient_;\n\n        emit YieldRecipientSet(yieldRecipient_);\n    }\n}\n"},{"file_path":"lib/evm-m-extensions/src/swap/interfaces/ISwapFacility.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.26;\n\n/**\n * @title  Swap Facility interface.\n * @author M0 Labs\n */\ninterface ISwapFacility {\n    /* ============ Events ============ */\n\n    /**\n     * @notice Emitted when $M Extension is swapped for another $M Extension.\n     * @param extensionIn  The address of the input $M Extension.\n     * @param extensionOut The address of the output $M Extension.\n     * @param amount       The amount swapped.\n     * @param recipient    The address to receive the output $M Extension token.\n     */\n    event Swapped(address indexed extensionIn, address indexed extensionOut, uint256 amount, address indexed recipient);\n\n    /**\n     * @notice Emitted when $M token is swapped for $M Extension.\n     * @param extensionOut The address of the output $M Extension.\n     * @param amount       The amount swapped.\n     * @param recipient    The address to receive the output $M Extension token.\n     */\n    event SwappedInM(address indexed extensionOut, uint256 amount, address indexed recipient);\n\n    /**\n     * @notice Emitted when $M Extension is swapped for $M token.\n     * @param extensionIn  The address of the input $M Extension.\n     * @param amount       The amount swapped.\n     * @param recipient    The address to receive the $M token.\n     */\n    event SwappedOutM(address indexed extensionIn, uint256 amount, address indexed recipient);\n\n    /**\n     * @notice Emitted when an $M Extension is set as permissioned or not.\n     * @param  extension The address of an $M Extension.\n     * @param  allowed   True if the extension is allowed, false otherwise.\n     */\n    event PermissionedExtensionSet(address indexed extension, bool allowed);\n\n    /**\n     * @notice Emitted when a `swapper` is allowed or not to swap the permissioned `extension` from/to M.\n     * @param  extension The address of an $M extension.\n     * @param  swapper   The address of the swapper.\n     * @param  allowed   True if the swapper is allowed, false otherwise.\n     */\n    event PermissionedMSwapperSet(address indexed extension, address indexed swapper, bool allowed);\n\n    /* ============ Custom Errors ============ */\n\n    /// @notice Thrown in the constructor if $M Token is 0x0.\n    error ZeroMToken();\n\n    /// @notice Thrown in the constructor if Registrar is 0x0.\n    error ZeroRegistrar();\n\n    /// @notice Thrown in `setPermissionedMSwapper()` if the $M extension is 0x0.\n    error ZeroExtension();\n\n    /// @notice Thrown in `setPermissionedMSwapper()` if the swapper is 0x0.\n    error ZeroSwapper();\n\n    /// @notice Thrown in `swap` and `swapM` functions if the extension is not TTG approved earner.\n    error NotApprovedExtension(address extension);\n\n    /// @notice Thrown in `swapInM` and `swapOutM` functions if `swapper` is not approved to swap a permissioned `extension`.\n    error NotApprovedPermissionedSwapper(address extension, address swapper);\n\n    /// @notice Thrown in `swapInM` and `swapOutM` functions if `swapper` is not approved to swap the `extension`.\n    error NotApprovedSwapper(address extension, address swapper);\n\n    /// @notice Thrown in `swap` function if the extension is permissioned.\n    error PermissionedExtension(address extension);\n\n    /* ============ Interactive Functions ============ */\n\n    /**\n     * @notice Swaps one $M Extension to another.\n     * @param  extensionIn  The address of the $M Extension to swap from.\n     * @param  extensionOut The address of the $M Extension to swap to.\n     * @param  amount       The amount to swap.\n     * @param  recipient    The address to receive the swapped $M Extension tokens.\n     */\n    function swap(address extensionIn, address extensionOut, uint256 amount, address recipient) external;\n\n    /**\n     * @notice Swaps one $M Extension to another using permit.\n     * @param  extensionIn  The address of the $M Extension to swap from.\n     * @param  extensionOut The address of the $M Extension to swap to.\n     * @param  amount       The amount to swap.\n     * @param  recipient    The address to receive the swapped $M Extension tokens.\n     * @param  deadline     The last timestamp where the signature is still valid.\n     * @param  v            An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  r            An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  s            An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     */\n    function swapWithPermit(\n        address extensionIn,\n        address extensionOut,\n        uint256 amount,\n        address recipient,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @notice Swaps one $M Extension to another using permit.\n     * @param  extensionIn  The address of the $M Extension to swap from.\n     * @param  extensionOut The address of the $M Extension to swap to.\n     * @param  amount       The amount to swap.\n     * @param  recipient    The address to receive the swapped $M Extension tokens.\n     * @param  deadline     The last timestamp where the signature is still valid.\n     * @param  signature    An arbitrary signature (EIP-712).\n     */\n    function swapWithPermit(\n        address extensionIn,\n        address extensionOut,\n        uint256 amount,\n        address recipient,\n        uint256 deadline,\n        bytes calldata signature\n    ) external;\n\n    /**\n     * @notice Swaps $M token to $M Extension.\n     * @param  extensionOut The address of the M Extension to swap to.\n     * @param  amount       The amount of $M token to swap.\n     * @param  recipient    The address to receive the swapped $M Extension tokens.\n     */\n    function swapInM(address extensionOut, uint256 amount, address recipient) external;\n\n    /**\n     * @notice Swaps $M token to $M Extension using permit.\n     * @param  extensionOut The address of the M Extension to swap to.\n     * @param  amount       The amount of $M token to swap.\n     * @param  recipient    The address to receive the swapped $M Extension tokens.\n     * @param  deadline     The last timestamp where the signature is still valid.\n     * @param  v            An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  r            An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  s            An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     */\n    function swapInMWithPermit(\n        address extensionOut,\n        uint256 amount,\n        address recipient,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @notice Swaps $M token to $M Extension using permit.\n     * @param  extensionOut The address of the M Extension to swap to.\n     * @param  amount       The amount of $M token to swap.\n     * @param  recipient    The address to receive the swapped $M Extension tokens.\n     * @param  deadline     The last timestamp where the signature is still valid.\n     * @param  signature    An arbitrary signature (EIP-712).\n     */\n    function swapInMWithPermit(\n        address extensionOut,\n        uint256 amount,\n        address recipient,\n        uint256 deadline,\n        bytes calldata signature\n    ) external;\n\n    /**\n     * @notice Swaps $M Extension to $M token.\n     * @param  extensionIn The address of the $M Extension to swap from.\n     * @param  amount      The amount of $M Extension tokens to swap.\n     * @param  recipient   The address to receive $M tokens.\n     */\n    function swapOutM(address extensionIn, uint256 amount, address recipient) external;\n\n    /**\n     * @notice Swaps $M Extension to $M token using permit.\n     * @param  extensionIn The address of the $M Extension to swap from.\n     * @param  amount      The amount of $M Extension tokens to swap.\n     * @param  recipient   The address to receive $M tokens.\n     * @param  deadline    The last timestamp where the signature is still valid.\n     * @param  v           An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  r           An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     * @param  s           An ECDSA secp256k1 signature parameter (EIP-2612 via EIP-712).\n     */\n    function swapOutMWithPermit(\n        address extensionIn,\n        uint256 amount,\n        address recipient,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @notice Swaps $M Extension to $M token using permit.\n     * @param  extensionIn The address of the $M Extension to swap from.\n     * @param  amount      The amount of $M Extension tokens to swap.\n     * @param  recipient   The address to receive $M tokens.\n     * @param  deadline    The last timestamp where the signature is still valid.\n     * @param  signature   An arbitrary signature (EIP-712).\n     */\n    function swapOutMWithPermit(\n        address extensionIn,\n        uint256 amount,\n        address recipient,\n        uint256 deadline,\n        bytes calldata signature\n    ) external;\n\n    /**\n     * @notice Sets whether the `extension` is permissioned.\n     * @dev    MUST only be callable by an address with the `DEFAULT_ADMIN_ROLE` role.\n     * @param  extension    The address of an $M Extension.\n     * @param  permissioned True if the extension is permissioned, false otherwise.\n     */\n    function setPermissionedExtension(address extension, bool permissioned) external;\n\n    /**\n     * @notice Sets whether `swapper` is allowed to swap the permissioned `extension` from/to M.\n     * @dev    MUST only be callable by an address with the `DEFAULT_ADMIN_ROLE` role.\n     * @param  extension The address of an extension to set permission for.\n     * @param  swapper   The address of the swapper to set permission for.\n     * @param  allowed   True if the swapper is allowed, false otherwise.\n     */\n    function setPermissionedMSwapper(address extension, address swapper, bool allowed) external;\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @notice The address of the $M Token contract.\n    function mToken() external view returns (address mToken);\n\n    /// @notice The address of the Registrar.\n    function registrar() external view returns (address registrar);\n\n    /**\n     * @notice Returns the address that called `swap` or `swapM`\n     * @dev    Must be used instead of `msg.sender` in $M Extensions contracts to get the original sender.\n     */\n    function msgSender() external view returns (address msgSender);\n\n    /**\n     * @notice Checks if the extension is permissioned.\n     * @param  extension The extension address to check.\n     * @return true if allowed, false otherwise.\n     */\n    function isPermissionedExtension(address extension) external view returns (bool);\n\n    /**\n     * @notice Checks if `swapper` is allowed to swap the permissioned extension from/to M.\n     * @param  extension The $M extension address.\n     * @param  swapper   The swapper address to check.\n     * @return true if allowed, false otherwise.\n     */\n    function isPermissionedMSwapper(address extension, address swapper) external view returns (bool);\n\n    /**\n     * @notice Checks if `swapper` is allowed to swap the permissionless (common) extension from/to M.\n     * @param  swapper   The swapper address to check.\n     * @return true if allowed, false otherwise.\n     */\n    function isMSwapper(address swapper) external view returns (bool);\n\n    /// @notice The parameter name in the Registrar that defines the earners list.\n    function EARNERS_LIST_NAME() external pure returns (bytes32);\n\n    /// @notice The parameter name in the Registrar that defines whether to ignore the earners list.\n    function EARNERS_LIST_IGNORED_KEY() external pure returns (bytes32);\n\n    /// @notice Swapper role for permissioned extensions.\n    function M_SWAPPER_ROLE() external pure returns (bytes32);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (access/IAccessControl.sol)\n\npragma solidity >=0.8.4;\n\n/**\n * @dev External interface of AccessControl declared to support ERC-165 detection.\n */\ninterface IAccessControl {\n    /**\n     * @dev The `account` is missing a role.\n     */\n    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);\n\n    /**\n     * @dev The caller of a function is not the expected one.\n     *\n     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\n     */\n    error AccessControlBadConfirmation();\n\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted to signal this.\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).\n     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) external;\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"address","name":"mToken_","type":"address"},{"internalType":"address","name":"swapFacility_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AccountFrozen","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AccountNotFrozen","type":"error"},{"inputs":[{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationAlreadyUsed","type":"error"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"}],"name":"AuthorizationExpired","type":"error"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"}],"name":"AuthorizationNotYetValid","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"payee","type":"address"}],"name":"CallerMustBePayee","type":"error"},{"inputs":[],"name":"EarningIsDisabled","type":"error"},{"inputs":[],"name":"EarningIsEnabled","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InsufficientAmount","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expectedNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"InvalidSignatureLength","type":"error"},{"inputs":[],"name":"InvalidSignatureS","type":"error"},{"inputs":[],"name":"InvalidSignatureV","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"NotSwapFacility","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"SignatureExpired","type":"error"},{"inputs":[],"name":"SignerMismatch","type":"error"},{"inputs":[],"name":"YieldClaimerCannotBeZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAdmin","type":"error"},{"inputs":[],"name":"ZeroFreezeManager","type":"error"},{"inputs":[],"name":"ZeroMToken","type":"error"},{"inputs":[],"name":"ZeroSwapFacility","type":"error"},{"inputs":[],"name":"ZeroYieldRecipient","type":"error"},{"inputs":[],"name":"ZeroYieldRecipientManager","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationUsed","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint128","name":"index","type":"uint128"}],"name":"EarningDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint128","name":"index","type":"uint128"}],"name":"EarningEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Frozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Unfrozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"yield","type":"uint256"}],"name":"YieldClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"yieldRecipient","type":"address"}],"name":"YieldRecipientSet","type":"event"},{"inputs":[],"name":"CANCEL_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FREEZE_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RECEIVE_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"YIELD_CLAIMER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"YIELD_RECIPIENT_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"authorizationState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"authorizer_","type":"address"},{"internalType":"bytes32","name":"nonce_","type":"bytes32"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"vs_","type":"bytes32"}],"name":"cancelAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authorizer_","type":"address"},{"internalType":"bytes32","name":"nonce_","type":"bytes32"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"cancelAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authorizer_","type":"address"},{"internalType":"bytes32","name":"nonce_","type":"bytes32"},{"internalType":"bytes","name":"signature_","type":"bytes"}],"name":"cancelAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimYield","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentIndex","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableEarning","outputs":[],"stateMutability":"nonpayable","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":"enableEarning","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"freeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"}],"name":"freezeAccounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"yieldRecipient","type":"address"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"freezeManager","type":"address"},{"internalType":"address","name":"yieldRecipientManager","type":"address"},{"internalType":"address","name":"yieldClaimer","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"yieldRecipient_","type":"address"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"freezeManager","type":"address"},{"internalType":"address","name":"yieldRecipientManager","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isEarningEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"bytes","name":"signature_","type":"bytes"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"validAfter_","type":"uint256"},{"internalType":"uint256","name":"validBefore_","type":"uint256"},{"internalType":"bytes32","name":"nonce_","type":"bytes32"},{"internalType":"bytes","name":"signature_","type":"bytes"}],"name":"receiveWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"validAfter_","type":"uint256"},{"internalType":"uint256","name":"validBefore_","type":"uint256"},{"internalType":"bytes32","name":"nonce_","type":"bytes32"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"vs_","type":"bytes32"}],"name":"receiveWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"validAfter_","type":"uint256"},{"internalType":"uint256","name":"validBefore_","type":"uint256"},{"internalType":"bytes32","name":"nonce_","type":"bytes32"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"receiveWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"setYieldRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapFacility","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":[{"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":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"validAfter_","type":"uint256"},{"internalType":"uint256","name":"validBefore_","type":"uint256"},{"internalType":"bytes32","name":"nonce_","type":"bytes32"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"vs_","type":"bytes32"}],"name":"transferWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"validAfter_","type":"uint256"},{"internalType":"uint256","name":"validBefore_","type":"uint256"},{"internalType":"bytes32","name":"nonce_","type":"bytes32"},{"internalType":"bytes","name":"signature_","type":"bytes"}],"name":"transferWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"validAfter_","type":"uint256"},{"internalType":"uint256","name":"validBefore_","type":"uint256"},{"internalType":"bytes32","name":"nonce_","type":"bytes32"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"transferWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"unfreeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"}],"name":"unfreezeAccounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yieldRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":"000000000000000000000000866a2bf4e572cbcf37d5071a7a58503bfb36be1b000000000000000000000000b6807116b3b1b321a390594e31ecd6e0076f6278"}