{"file_path":"contracts/Roles.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"./AllowanceTracker.sol\";\nimport \"./PermissionBuilder.sol\";\nimport \"./PermissionChecker.sol\";\nimport \"./PermissionLoader.sol\";\n\n/**\n * @title Zodiac Roles Mod - granular, role-based, access control for your\n * on-chain avatar accounts (like Safe).\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n * @author Jan-Felix Schwarz  - <jan-felix.schwarz@gnosis.io>\n * @author Auryn Macmillan    - <auryn.macmillan@gnosis.io>\n * @author Nathan Ginnever    - <nathan.ginnever@gnosis.io>\n */\ncontract Roles is\n    Modifier,\n    AllowanceTracker,\n    PermissionBuilder,\n    PermissionChecker,\n    PermissionLoader\n{\n    mapping(address => bytes32) public defaultRoles;\n\n    event AssignRoles(address module, bytes32[] roleKeys, bool[] memberOf);\n    event RolesModSetup(\n        address indexed initiator,\n        address indexed owner,\n        address indexed avatar,\n        address target\n    );\n    event SetDefaultRole(address module, bytes32 defaultRoleKey);\n\n    error ArraysDifferentLength();\n\n    /// Sender is allowed to make this call, but the internal transaction failed\n    error ModuleTransactionFailed();\n\n    /// @param _owner Address of the owner\n    /// @param _avatar Address of the avatar (e.g. a Gnosis Safe)\n    /// @param _target Address of the contract that will call exec function\n    constructor(address _owner, address _avatar, address _target) {\n        bytes memory initParams = abi.encode(_owner, _avatar, _target);\n        setUp(initParams);\n    }\n\n    /// @dev There is no zero address check as solidty will check for\n    /// missing arguments and the space of invalid addresses is too large\n    /// to check. Invalid avatar or target address can be reset by owner.\n    function setUp(bytes memory initParams) public override initializer {\n        (address _owner, address _avatar, address _target) = abi.decode(\n            initParams,\n            (address, address, address)\n        );\n        _transferOwnership(_owner);\n        avatar = _avatar;\n        target = _target;\n\n        setupModules();\n\n        emit RolesModSetup(msg.sender, _owner, _avatar, _target);\n    }\n\n    /// @dev Assigns and revokes roles to a given module.\n    /// @param module Module on which to assign/revoke roles.\n    /// @param roleKeys Roles to assign/revoke.\n    /// @param memberOf Assign (true) or revoke (false) corresponding roleKeys.\n    function assignRoles(\n        address module,\n        bytes32[] calldata roleKeys,\n        bool[] calldata memberOf\n    ) external onlyOwner {\n        if (roleKeys.length != memberOf.length) {\n            revert ArraysDifferentLength();\n        }\n        for (uint16 i; i < roleKeys.length; ++i) {\n            roles[roleKeys[i]].members[module] = memberOf[i];\n        }\n        if (!isModuleEnabled(module)) {\n            enableModule(module);\n        }\n        emit AssignRoles(module, roleKeys, memberOf);\n    }\n\n    /// @dev Sets the default role used for a module if it calls execTransactionFromModule() or execTransactionFromModuleReturnData().\n    /// @param module Address of the module on which to set default role.\n    /// @param roleKey Role to be set as default.\n    function setDefaultRole(\n        address module,\n        bytes32 roleKey\n    ) external onlyOwner {\n        defaultRoles[module] = roleKey;\n        emit SetDefaultRole(module, roleKey);\n    }\n\n    /// @dev Passes a transaction to the modifier.\n    /// @param to Destination address of module transaction\n    /// @param value Ether value of module transaction\n    /// @param data Data payload of module transaction\n    /// @param operation Operation type of module transaction\n    /// @notice Can only be called by enabled modules\n    function execTransactionFromModule(\n        address to,\n        uint256 value,\n        bytes calldata data,\n        Enum.Operation operation\n    ) public override returns (bool success) {\n        Consumption[] memory consumptions = _authorize(\n            defaultRoles[msg.sender],\n            to,\n            value,\n            data,\n            operation\n        );\n        _flushPrepare(consumptions);\n        success = exec(to, value, data, operation);\n        _flushCommit(consumptions, success);\n    }\n\n    /// @dev Passes a transaction to the modifier, expects return data.\n    /// @param to Destination address of module transaction\n    /// @param value Ether value of module transaction\n    /// @param data Data payload of module transaction\n    /// @param operation Operation type of module transaction\n    /// @notice Can only be called by enabled modules\n    function execTransactionFromModuleReturnData(\n        address to,\n        uint256 value,\n        bytes calldata data,\n        Enum.Operation operation\n    ) public override returns (bool success, bytes memory returnData) {\n        Consumption[] memory consumptions = _authorize(\n            defaultRoles[msg.sender],\n            to,\n            value,\n            data,\n            operation\n        );\n        _flushPrepare(consumptions);\n        (success, returnData) = execAndReturnData(to, value, data, operation);\n        _flushCommit(consumptions, success);\n    }\n\n    /// @dev Passes a transaction to the modifier assuming the specified role.\n    /// @param to Destination address of module transaction\n    /// @param value Ether value of module transaction\n    /// @param data Data payload of module transaction\n    /// @param operation Operation type of module transaction\n    /// @param roleKey Identifier of the role to assume for this transaction\n    /// @param shouldRevert Should the function revert on inner execution returning success false?\n    /// @notice Can only be called by enabled modules\n    function execTransactionWithRole(\n        address to,\n        uint256 value,\n        bytes calldata data,\n        Enum.Operation operation,\n        bytes32 roleKey,\n        bool shouldRevert\n    ) public returns (bool success) {\n        Consumption[] memory consumptions = _authorize(\n            roleKey,\n            to,\n            value,\n            data,\n            operation\n        );\n        _flushPrepare(consumptions);\n        success = exec(to, value, data, operation);\n        if (shouldRevert && !success) {\n            revert ModuleTransactionFailed();\n        }\n        _flushCommit(consumptions, success);\n    }\n\n    /// @dev Passes a transaction to the modifier assuming the specified role. Expects return data.\n    /// @param to Destination address of module transaction\n    /// @param value Ether value of module transaction\n    /// @param data Data payload of module transaction\n    /// @param operation Operation type of module transaction\n    /// @param roleKey Identifier of the role to assume for this transaction\n    /// @param shouldRevert Should the function revert on inner execution returning success false?\n    /// @notice Can only be called by enabled modules\n    function execTransactionWithRoleReturnData(\n        address to,\n        uint256 value,\n        bytes calldata data,\n        Enum.Operation operation,\n        bytes32 roleKey,\n        bool shouldRevert\n    ) public returns (bool success, bytes memory returnData) {\n        Consumption[] memory consumptions = _authorize(\n            roleKey,\n            to,\n            value,\n            data,\n            operation\n        );\n        _flushPrepare(consumptions);\n        (success, returnData) = execAndReturnData(to, value, data, operation);\n        if (shouldRevert && !success) {\n            revert ModuleTransactionFailed();\n        }\n        _flushCommit(consumptions, success);\n    }\n}\n","deployed_bytecode":"0x608060405234801561000f575f80fd5b50600436106101ab575f3560e01c80637508dd98116100eb578063b3dd25c71161008f578063b3dd25c71461044a578063c6fe87471461045d578063cc2f845214610470578063d4b8399214610491578063d8afba76146104a4578063e009cfde146104b7578063e29dfba8146104ca578063f2fde38b146104f7575f80fd5b80637508dd98146103bd578063776d1a01146103d05780637b0da5b2146103e35780638da5cb5b146103f6578063946d364e146103fe578063957ed2b314610411578063a4f9edbf14610424578063a8ec43ee14610437575f80fd5b8063468721a711610152578063468721a7146102ac5780635229073f146102bf5780635aef7de6146102d25780635e7c9fe8146102e4578063610b59251461037c57806366523f7d1461038f57806369ecc3cf146103a2578063715018a6146103b5575f80fd5b80630172a43a146101af578063086cfca8146101c45780630c6c76b8146101d75780632916a9af146101ea5780632959513c146101fd5780632b99e5061461023b5780632d3c25471461025c5780632d9ad53d14610289575b5f80fd5b6101c26101bd366004614d45565b61050a565b005b6101c26101d2366004614d73565b6105e0565b6101c26101e5366004614d45565b610637565b6101c26101f8366004614da5565b61070b565b61022561020b366004614deb565b60066020525f90815260409020546001600160a01b031681565b6040516102329190614e02565b60405180910390f35b61024e610249366004614e6c565b6107b0565b604051610232929190614f42565b61027b61026a366004614d73565b60076020525f908152604090205481565b604051908152602001610232565b61029c610297366004614d73565b610854565b6040519015158152602001610232565b61029c6102ba366004614f5c565b61088d565b61024e6102cd366004614f5c565b61090f565b5f54610225906001600160a01b031681565b61033d6102f2366004614deb565b60056020525f9081526040902080546001909101546001600160801b0380831692600160801b90048116916001600160401b0380821692600160401b83041691600160c01b90041685565b604080516001600160801b03968716815294861660208601526001600160401b039384169085015293166060830152909116608082015260a001610232565b6101c261038a366004614d73565b610998565b6101c261039d366004614fca565b610aa7565b6101c26103b0366004614deb565b610b31565b6101c2610b83565b6101c26103cb366004615140565b610b96565b6101c26103de366004614d73565b610c69565b6101c26103f13660046152b3565b610cc2565b610225610d9d565b6101c261040c3660046152e5565b610dcb565b6101c261041f36600461534f565b610e23565b6101c26104323660046153cb565b610f38565b6101c2610445366004615428565b6110f1565b6101c2610458366004615491565b6112ea565b61029c61046b366004614e6c565b61136a565b61048361047e3660046152e5565b611408565b6040516102329291906154dd565b600154610225906001600160a01b031681565b61027b6104b2366004615539565b611598565b6101c26104c5366004615580565b6116b6565b61029c6104d83660046152e5565b600260209081525f928352604080842090915290825290205460ff1681565b6101c2610505366004614d73565b6117ad565b6105126117ea565b6040805180820182525f8082526020808301829052858252600481528382206001600160a01b0386168352600190810190915292902081518154929391929091839160ff19169083600281111561056b5761056b6155ac565b021790555060208201518154829061ff001916610100836003811115610593576105936155ac565b021790555050604080518481526001600160a01b03841660208201527f3ccf62aacc3286173cedf5c20ec550071636a2faf0a3b28d93841736a43f822b9250015b60405180910390a15050565b6105e86117ea565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce3429190a35050565b61063f6117ea565b6040805180820190915280600281526020015f90525f8381526004602090815260408083206001600160a01b038616845260019081019092529091208251815491929091839160ff199091169083600281111561069e5761069e6155ac565b021790555060208201518154829061ff0019166101008360038111156106c6576106c66155ac565b021790555050604080518481526001600160a01b03841660208201527f277465b84f512b759d745fab70327b693ee21ce592fca91a3f491739a25fa76a9250016105d4565b6107136117ea565b60a082901c63ffffffff60401b16606084811b6001600160601b031916919091175f9081526006602090815260409182902080546001600160a01b0319166001600160a01b03868116918217909255835191881682526001600160e01b0319871692820192909252918201527f1330d96b64c7e86736f77e027ca34223dd3d1d08049281281c9d597d8098ed5991015b60405180910390a1505050565b5f60605f6107c2858b8b8b8b8b61181c565b90506107cd81611a77565b61080f8a8a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508c9250611bd0915050565b909350915083801561081f575082155b1561083d5760405163d27b44a960e01b815260040160405180910390fd5b6108478184611c5a565b5097509795505050505050565b5f60016001600160a01b0383161480159061088757506001600160a01b038281165f908152600360205260409020541615155b92915050565b335f9081526007602052604081205481906108ac90888888888861181c565b90506108b781611a77565b6108f9878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250899250611d46915050565b91506109058183611c5a565b5095945050505050565b335f90815260076020526040812054606090829061093190898989898961181c565b905061093c81611a77565b61097e888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a9250611bd0915050565b909350915061098d8184611c5a565b509550959350505050565b6109a06117ea565b6001600160a01b03811615806109bf57506001600160a01b0381166001145b156109e85780604051635c93ff2f60e11b81526004016109df9190614e02565b60405180910390fd5b6001600160a01b038181165f908152600360205260409020541615610a225780604051632061897360e01b81526004016109df9190614e02565b60036020525f80516020615efc83398151915280546001600160a01b038381165f81815260408082208054949095166001600160a01b03199485161790945560019052835490911617909155517fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f844090610a9c908390614e02565b60405180910390a150565b610aaf6117ea565b5f83815260046020526040812060020190610aca8484611dc7565b81526020019081526020015f205f90557f32a3a599b308fc900a0e6513db2ad40bf0c94367da90048a4b308d8c6b2dd6ea8383836040516107a3939291909283526001600160a01b039190911660208301526001600160e01b031916604082015260600190565b335f908152600260209081526040808320848452825291829020805460ff1916600117905590518281527f89a77869d7b8125ba16e08a92ddc8cc26fb1fa47241971167954489a5e66c2559101610a9c565b610b8b6117ea565b610b945f611de7565b565b610b9e6117ea565b60405163783a904760e01b8152736a6af4b16458bc39817e4019fb02bd3b26d410499063783a904790610bd59085906004016155e4565b5f6040518083038186803b158015610beb575f80fd5b505af4158015610bfd573d5f803e3d5ffd5b5050505f868152600460205260409020610c239150610c1c8686611dc7565b8484611e57565b7f4f6c340456f64db31a3d003c1224ba1de058557b1cdf71f21ae48ce4a4f64f528585858585604051610c5a959493929190615691565b60405180910390a15050505050565b610c716117ea565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d6905f90a35050565b610cca6117ea565b604080518082019091528060018152602001826003811115610cee57610cee6155ac565b90525f8481526004602090815260408083206001600160a01b038716845260019081019092529091208251815491929091839160ff1990911690836002811115610d3a57610d3a6155ac565b021790555060208201518154829061ff001916610100836003811115610d6257610d626155ac565b02179055509050507f05e4ec9b54e94ad676ef61d57214f6d57d752ed2022dea5e5f956d5df7ccb2508383836040516107a39392919061575d565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b610dd36117ea565b6001600160a01b0382165f81815260076020908152604091829020849055815192835282018390527f60c85b61661a191efceebca036d48b290e04a1f08dd96472b920adbdd50c64e891016105d4565b610e2b6117ea565b828114610e4b576040516374f4d53760e01b815260040160405180910390fd5b5f5b61ffff8116841115610eea5782828261ffff16818110610e6f57610e6f615780565b9050602002016020810190610e849190615794565b60045f87878561ffff16818110610e9d57610e9d615780565b602090810292909201358352508181019290925260409081015f9081206001600160a01b038b1682529092529020805460ff1916911515919091179055610ee3816157c3565b9050610e4d565b50610ef485610854565b610f0157610f0185610998565b7f9f8368fa4ddcbd561efd7ad2a2174235bf5b840a73fb18f20db9705c114624988585858585604051610c5a9594939291906157e3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610f7c5750825b90505f826001600160401b03166001148015610f975750303b155b905081158015610fa5575080155b15610fc35760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610fed57845460ff60401b1916600160401b1785555b5f805f888060200190518101906110049190615872565b92509250925061101383611de7565b5f80546001600160a01b038085166001600160a01b031992831617909255600180549284169290911691909117905561104a611f06565b816001600160a01b0316836001600160a01b0316336001600160a01b03167f34d3b96a088381c6843a1f9d94d251afa88f83cc7a0d17fc23a7057506a3fc6d846040516110979190614e02565b60405180910390a450505083156110e957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2906020015b60405180910390a15b505050505050565b6110f96117ea565b836001600160801b03165f03611116576001600160801b03611118565b835b9350806001600160401b03165f036111305742611132565b805b90506040518060a00160405280846001600160801b03168152602001856001600160801b03168152602001836001600160401b03168152602001866001600160801b03168152602001826001600160401b031681525060055f8881526020019081526020015f205f820151815f015f6101000a8154816001600160801b0302191690836001600160801b031602179055506020820151815f0160106101000a8154816001600160801b0302191690836001600160801b031602179055506040820151816001015f6101000a8154816001600160401b0302191690836001600160401b0316021790555060608201518160010160086101000a8154816001600160801b0302191690836001600160801b0316021790555060808201518160010160186101000a8154816001600160401b0302191690836001600160401b031602179055509050507f63d7ec44a20b176da1d60d75259d264ee67b3d8213706afa71a28f69ed8ebece8686868686866040516110e0969594939291909586526001600160801b0394851660208701529284166040860152921660608401526001600160401b0391821660808401521660a082015260c00190565b6112f26117ea565b6112fb81611f71565b5f858152600460205260408120600201906113168686611dc7565b81526020019081526020015f20819055507f9603b65b11492fec54ccc3d9feb93536f804d82e12228187ff730a253fc283ee8484848460405161135c94939291906158b1565b60405180910390a150505050565b5f8061137a848a8a8a8a8a61181c565b905061138581611a77565b6113c7898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508b9250611d46915050565b91508280156113d4575081155b156113f25760405163d27b44a960e01b815260040160405180910390fd5b6113fc8183611c5a565b50979650505050505050565b60605f6001600160a01b03841660011480159061142b575061142984610854565b155b1561144b5783604051635c93ff2f60e11b81526004016109df9190614e02565b825f0361146b576040516372dbed9760e11b815260040160405180910390fd5b826001600160401b0381111561148357611483614ffc565b6040519080825280602002602001820160405280156114ac578160200160208202803683370190505b506001600160a01b038086165f90815260036020526040812054929450911691505b6001600160a01b038216158015906114f057506001600160a01b038216600114155b80156114fb57508381105b15611555578183828151811061151357611513615780565b6001600160a01b039283166020918202929092018101919091529281165f9081526003909352604090922054909116908061154d816158e4565b9150506114ce565b6001600160a01b03821660011461158d57826115726001836158fc565b8151811061158257611582615780565b602002602001015191505b808352509250929050565b604080517f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218602082015246918101919091523060608201525f9081906080016040516020818303038152906040528051906020012090505f601960f81b600160f81b837f2939aeeda3ca260200c9f7b436b19e13207547ccc65cfedc857751c5ea6d91d45f1b898960405161162e92919061590f565b6040805191829003822060208301939093528101919091526060810188905260800160408051808303601f190181529082905280516020918201206001600160f81b0319958616918301919091529290931660218401526022830152604282015260620160408051601f198184030181529190528051602090910120925050505b9392505050565b6116be6117ea565b6001600160a01b03811615806116dd57506001600160a01b0381166001145b156116fd5780604051635c93ff2f60e11b81526004016109df9190614e02565b6001600160a01b038281165f9081526003602052604090205481169082161461173b5780604051638b4189ff60e01b81526004016109df9190614e02565b6001600160a01b038181165f81815260036020526040808220805487861684528284208054919096166001600160a01b0319918216179095559290915281549092169055517faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace4054276906105d4908390614e02565b6117b56117ea565b6001600160a01b0381166117de575f604051631e4fbdf760e01b81526004016109df9190614e02565b6117e781611de7565b50565b336117f3610d9d565b6001600160a01b031614610b94573360405163118cdaa760e01b81526004016109df9190614e02565b335f908152600360205260409020546060906001600160a01b031661192c575f80611845611f94565b6001600160a01b038082165f90815260036020526040902054929450909250166118845733604051634a0bfec160e01b81526004016109df9190614e02565b6001600160a01b0381165f90815260026020908152604080832085845290915290205460ff16156118cb57604051639e1dc0c560e01b8152600481018390526024016109df565b6001600160a01b0381165f908152600260209081526040808320858452825291829020805460ff1916600117905590518381527f8c8e19e7e8e193118a05465d7676e82215052d3cb150628fbf598105dc2bb6ab910160405180910390a150505b5f87900361194d57604051631fb1d3e560e31b815260040160405180910390fd5b5f8781526004602052604081209081906119656120ef565b6001600160a01b0316815260208101919091526040015f205460ff1661199e57604051631fb1d3e560e31b815260040160405180910390fd5b5f6119e4886119ad878961591e565b60a01c63ffffffff60401b1660609190911b6001600160601b031916175f908152600660205260409020546001600160a01b031690565b90505f6119ef614ce1565b6001600160a01b038316611a1957611a0f848b8b8b8b8b875f015161214a565b9092509050611a2e565b611a2883858c8c8c8c8c612398565b90925090505b5f826013811115611a4157611a416155ac565b14611a66576020810151604051631a1537eb60e31b81526109df91849160040161594e565b5193505050505b9695505050505050565b80515f5b81811015611bcb575f838281518110611a9657611a96615780565b60209081029190910181015180516040808301515f83815260058652828120835160a08101855281546001600160801b038082168352600160801b90910481169882019890985260018201546001600160401b0380821696830196909652600160401b81049098166060820152600160c01b90970490931660808701529395509193919290918190611b2890426124dd565b9150915085602001516001600160801b0316826001600160801b031614611b5157611b5161596c565b816001600160801b0316846001600160801b03161115611b7357611b7361596c565b611b7d8483615980565b600193840180546001600160401b03938416600160c01b026001600160c01b036001600160801b0394909416600160401b029390931693169290921717905550939093019250611a7b915050565b505050565b600154604051635229073f60e01b81525f916060916001600160a01b0390911690635229073f90611c0b9089908990899089906004016159b0565b5f604051808303815f875af1158015611c26573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c4d9190810190615a27565b9150915094509492505050565b81515f5b81811015611d40575f848281518110611c7957611c79615780565b602002602001015190505f815f015190508415611cf657604082015160208301517f90355d540c2980efb4c360996dfc5405ee87e812e4f3db843857547cbdb5af65918391611cc9908290615980565b604080519384526001600160801b03928316602085015291169082015260600160405180910390a1611d36565b6020808301515f8381526005909252604090912060010180546001600160801b03909216600160401b02600160401b600160c01b03199092169190911790555b5050600101611c5e565b50505050565b60015460405163468721a760e01b81525f916001600160a01b03169063468721a790611d7c9088908890889088906004016159b0565b6020604051808303815f875af1158015611d98573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dbc9190615a6a565b90505b949350505050565b60a01c63ffffffff60401b1660609190911b6001600160601b0319161790565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b604051634031b16960e11b81525f907361c5b1be435391fdd7bc6703f3740c0d11728a8c9063806362d290611e909086906004016155e4565b5f60405180830381865af4158015611eaa573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611ed19190810190615a85565b90505f611edd82612600565b9050611eeb84518483612719565b5f958652600290960160205250506040909220929092555050565b60015f5260036020525f80516020615efc833981519152546001600160a01b031615611f455760405163dfd49ebd60e01b815260040160405180910390fd5b60015f81905260036020525f80516020615efc83398151915280546001600160a01b0319169091179055565b5f600160d81b60e0836003811115611f8b57611f8b6155ac565b901b1792915050565b5f8080366065811015611fac57505f93849350915050565b5f805f611fb9858561274a565b919450925090505f611fcc6061866158fc565b90505f611fdb8683818a615ab6565b611fe491615add565b90508460ff165f0361206a57826004811080611fff57508281115b1561201557505f998a9950975050505050505050565b845f61202c61202684838c8e615ab6565b86611598565b905061204a82828c8c87908a9261204593929190615ab6565b6127c0565b612055575f80612058565b80825b9b509b50505050505050505050509091565b5f61208061207a84838a8c615ab6565b84611598565b604080515f81526020810180835283905260ff8916918101919091526060810187905260808101869052909150819060019060a0016020604051602081039080840390855afa1580156120d5573d5f803e3d5ffd5b505050602060405103519950995050505050505050509091565b335f908152600360205260408120546001600160a01b03161561211157503390565b5f61211a611f94565b6001600160a01b038082165f908152600360205260409020549193501615905061214357919050565b5f91505090565b5f612153614ce1565b84158015906121625750600485105b1561218057604051632342609160e11b815260040160405180910390fd5b60026001600160a01b0389165f90815260018b01602052604090205460ff1660028111156121b0576121b06155ac565b036122f2575f6121c9896121c4888a61591e565b611dc7565b5f81815260028c01602052604081205491925081900361221b57600360405180604001604052808781526020018a8a90612203919061591e565b6001600160e01b03191681525093509350505061238c565b5f80612226836128a2565b915091505f6122368c8a846128cc565b90505f81601381111561224b5761224b6155ac565b1461227257604080518082019091528881525f6020820152909650945061238c9350505050565b821561229e575f60405180604001604052808a81526020015f801b81525096509650505050505061238c565b505050506122e88a82898960405180608001604052808f6001600160a01b031681526020018e81526020018a81526020018b60018111156122e1576122e16155ac565b9052612980565b925092505061238c565b60016001600160a01b0389165f90815260018b01602052604090205460ff166002811115612322576123226155ac565b03612373576001600160a01b0388165f90815260018a0160205260409020546123569088908690610100900460ff166128cc565b604080518082019091528481525f6020820152909250905061238c565b5050604080518082019091528181525f60208201526002905b97509795505050505050565b5f6123a1614ce1565b60405163c7a7b63560e01b81526001600160a01b038a169063c7a7b635906123d5908a908a908a908a908a90600401615b22565b5f60405180830381865afa92505050801561241157506040513d5f823e601f3d908101601f1916820160405261240e9190810190615b58565b60015b61242e576040516315e649e960e01b815260040160405180910390fd5b5f5b81518110156124cf575f82828151811061244c5761244c615780565b602002602001015190505f816060015190505f82608001518261246f9190615c29565b905061249a8d846020015185604001518d8d8790879261249193929190615ab6565b88518c5161214a565b90975095505f8760138111156124b2576124b26155ac565b146124c157505050505061238c565b836001019350505050612430565b505097509795505050505050565b5f8083604001516001600160401b03165f148061251e5750836040015184608001516125099190615c3c565b6001600160401b0316836001600160401b0316105b15612534575050606082015160808301516125f9565b5f846040015185608001518561254a9190615c5c565b6125549190615c90565b905084602001516001600160801b031685606001516001600160801b031610156125cf57845161258e906001600160401b03831690615cb5565b856060015161259d9190615cd8565b925084602001516001600160801b0316836001600160801b0316106125c65784602001516125c8565b825b92506125d7565b846060015192505b60408501516125e69082615cf8565b85608001516125f59190615c3c565b9150505b9250929050565b5f8061260b836129eb565b905061266d818051602091820120604080516001600160f81b03198185015273ce0042b868300000d44a59004da54a005ffdcf9f60601b60218201525f6035820152605580820193909352815180820390930183526075019052805191012090565b9150813b5f8190036127125760405163257b1f8160e11b815273ce0042b868300000d44a59004da54a005ffdcf9f90634af63f02906126b29085905f90600401615d1b565b6020604051808303815f875af11580156126ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126f29190615d3c565b6001600160a01b0316836001600160a01b0316146127125761271261596c565b5050919050565b5f6001600160a01b03821660e0846003811115612738576127386155ac565b60f087901b911b171790509392505050565b5f8080848461275a6001826158fc565b612765928290615ab6565b61276e91615d57565b60f81c925084846127806041826158fc565b61278b928290615ab6565b61279491615add565b915084846127a36021826158fc565b6127ae928290615ab6565b6127b791615add565b90509250925092565b5f843b8082036127d3575f915050611dbf565b5f866001600160a01b0316631626ba7e60e01b8787876040516024016127fb93929190615d85565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516128399190615d9e565b5f60405180830381855afa9150503d805f8114612871576040519150601f19603f3d011682016040523d82523d5f602084013e612876565b606091505b509150630b135d3f60e11b905061288c82615db9565b6001600160e01b03191614979650505050505050565b600160d81b811615155f60e083901c60ff1660038111156128c5576128c56155ac565b9050915091565b5f80841180156128ee575060018260038111156128eb576128eb6155ac565b14155b801561290c57506003826003811115612909576129096155ac565b14155b15612919575060046116af565b600183600181111561292d5761292d6155ac565b14801561294c57506002826003811115612949576129496155ac565b14155b801561296a57506003826003811115612967576129676155ac565b14155b15612977575060016116af565b505f9392505050565b5f612989614ce1565b5f806129958989612a23565b915091505f6129a5888885612bea565b90505f866040015151116129b957816129c7565b6129c7866040015183612c3f565b60408701526129d9888885848a612f65565b945094505050505b9550959350505050565b6060815160016129fb9190615c29565b82604051602001612a0d929190615df0565b6040516020818303038152906040529050919050565b612a4c6040805160808101909152805f81526020015f81525f6020820152606060409091015290565b5f82815260028401602052604081205460609160f082901c916001600160a01b031690612a788261320b565b90505f80612a868386613283565b915091505f805b8351811015612baa575f848281518110612aa957612aa9615780565b6020026020010151604001519050601c601f811115612aca57612aca6155ac565b81601f811115612adc57612adc6155ac565b10612af157612aea836158e4565b9250612ba1565b600f81601f811115612b0557612b056155ac565b03612ba1576010858381518110612b1e57612b1e615780565b602002602001015160400190601f811115612b3b57612b3b6155ac565b9081601f811115612b4e57612b4e6155ac565b9052505f54604051612b6c916001600160a01b031690602001614e02565b60405160208183030381529060405280519060200120848381518110612b9457612b94615780565b6020026020010181815250505b50600101612a8d565b50612bc08383612bb986613473565b5f8c6135b6565b875f8211612bce5787612bd9565b612bd984848461378c565b975097505050505050509250929050565b612c0c60405180606001604052805f81526020015f8152602001606081525090565b5f612c1683613972565b9050612c2d85856004848560200151515f88613afe565b505f8152602081019290925250919050565b606082515f03612c50575080610887565b81515f03612c5f575081610887565b81518351612c6d9190615c29565b6001600160401b03811115612c8457612c84614ffc565b604051908082528060200260200182016040528015612ccd57816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181612ca25790505b5083519091505f5b81811015612dc357848181518110612cef57612cef615780565b60200260200101515f0151838281518110612d0c57612d0c615780565b60200260200101515f018181525050848181518110612d2d57612d2d615780565b602002602001015160200151838281518110612d4b57612d4b615780565b6020026020010151602001906001600160801b031690816001600160801b031681525050848181518110612d8157612d81615780565b602002602001015160400151838281518110612d9f57612d9f615780565b60209081029190910101516001600160801b03909116604090910152600101612cd5565b505f5b8351811015612f50575f80612df787878581518110612de757612de7615780565b60200260200101515f0151613ca9565b915091508015612e5a57858381518110612e1357612e13615780565b602002602001015160400151858381518110612e3157612e31615780565b6020026020010151604001818151612e499190615cd8565b6001600160801b0316905250612f46565b858381518110612e6c57612e6c615780565b60200260200101515f0151858581518110612e8957612e89615780565b60200260200101515f018181525050858381518110612eaa57612eaa615780565b602002602001015160200151858581518110612ec857612ec8615780565b6020026020010151602001906001600160801b031690816001600160801b031681525050858381518110612efe57612efe615780565b602002602001015160400151858581518110612f1c57612f1c615780565b60209081029190910101516001600160801b0390911660409091015283612f42816158e4565b9450505b5050600101612dc6565b508151811015612f5e578082525b5092915050565b5f612f6e614ce1565b6020850151601081601f811115612f8757612f876155ac565b10156130e1575f81601f811115612fa057612fa06155ac565b03612fc55750506040805180820182529083015181525f6020820181905291506129e1565b600581601f811115612fd957612fd96155ac565b03612ff557612feb8888888888613cfe565b92509250506129e1565b600181601f811115613009576130096155ac565b0361301b57612feb8888888888613e19565b600281601f81111561302f5761302f6155ac565b0361304157612feb8888888888613ee9565b600381601f811115613055576130556155ac565b0361306757612feb8888888888613f71565b600681601f81111561307b5761307b6155ac565b0361308d57612feb8888888888614019565b600781601f8111156130a1576130a16155ac565b036130b357612feb8888888888614110565b600881601f8111156130c7576130c76155ac565b146130d4576130d461596c565b612feb888888888861418f565b601281601f8111156130f5576130f56155ac565b11613127576131068888888861430a565b6040805180820182529086015181525f602082015290935091506129e19050565b601481601f81111561313b5761313b6155ac565b1161314c5761310688888888614411565b601581601f811115613160576131606155ac565b036131715761310688888888614493565b601681601f811115613185576131856155ac565b0361319757612feb888888888861456e565b601c81601f8111156131ab576131ab6155ac565b036131bd57612feb8888888888614653565b601d81601f8111156131d1576131d16155ac565b036131e057612feb868561468d565b601e81601f8111156131f4576131f46155ac565b146132015761320161596c565b612feb86856146d8565b6060813b6001811161321f5761321f61596c565b60015f61322c82846158fc565b9050806001600160401b0381111561324657613246614ffc565b6040519080825280601f01601f191660200182016040528015613270576020820181803683370190505b509350808260208601873c505050919050565b606080826001600160401b0381111561329e5761329e614ffc565b6040519080825280602002602001820160405280156132d757816020015b6132c4614cf8565b8152602001906001900390816132bc5790505b509150826001600160401b038111156132f2576132f2614ffc565b60405190808252806020026020018201604052801561331b578160200160208202803683370190505b5090505f60208161332d600287615e46565b613338906020615c29565b90505f5b8681101561346857878301519350613355600284615c29565b92505f8460f01c90505f87838151811061337157613371615780565b6020908102919091010151600883901c60ff1681529050600582901c60071660068111156133a1576133a16155ac565b816020019060068111156133b7576133b76155ac565b908160068111156133ca576133ca6155ac565b905250601f828116908111156133e2576133e26155ac565b8160400190601f8111156133f8576133f86155ac565b9081601f81111561340b5761340b6155ac565b90525060108160400151601f811115613426576134266155ac565b1061345e5789840151955061343c602085615c29565b93508587848151811061345157613451615780565b6020026020010181815250505b505060010161333c565b505050509250929050565b8051606090806134855761348561596c565b806001600160401b0381111561349d5761349d614ffc565b6040519080825280602002602001820160405280156134ef57816020015b6134dc60405180606001604052805f81526020015f81526020015f81525090565b8152602001906001900390816134bb5790505b5091505f19825f8151811061350657613506615780565b60209081029190910101515260015b81811015612712575f1983828151811061353157613531615780565b60200260200101515f0181815250505f8385838151811061355457613554615780565b60200260200101515f015160ff168151811061357257613572615780565b602002602001015190505f19815f01510361358b578181525b613596826001615c29565b6020820181905281516135a8916158fc565b604090910152600101613515565b5f8583815181106135c9576135c9615780565b602002602001015190508060200151825f019060068111156135ed576135ed6155ac565b90816006811115613600576136006155ac565b90525060408101516020830190601f81111561361e5761361e6155ac565b9081601f811115613631576136316155ac565b8152505084838151811061364757613647615780565b602002602001015182604001818152505083838151811061366a5761366a615780565b6020026020010151604001515f036136825750613785565b5f84848151811061369557613695615780565b60200260200101515f015190505f8585815181106136b5576136b5615780565b6020026020010151604001519050806001600160401b038111156136db576136db614ffc565b60405190808252806020026020018201604052801561373557816020015b6137226040805160808101909152805f81526020015f81525f6020820152606060409091015290565b8152602001906001900390816136f95790505b5060608501525f5b81811015613780576137788989896137558588615c29565b8960600151868151811061376b5761376b615780565b60200260200101516135b6565b60010161373d565b505050505b5050505050565b8251606090826001600160401b038111156137a9576137a9614ffc565b6040519080825280602002602001820160405280156137f257816020015b604080516060810182525f80825260208083018290529282015282525f199092019101816137c75790505b5091505f805b8281101561395c57601c87828151811061381457613814615780565b602002602001015160400151601f811115613831576138316155ac565b1061394c575f86828151811061384957613849615780565b602002602001015190505f61385e8683613ca9565b915050801561386e57505061394c565b8186858151811061388157613881615780565b602090810291909101810151919091525f83815260058252604090819020815160a08101835281546001600160801b038082168352600160801b9091048116948201949094526001909101546001600160401b0380821693830193909352600160401b81049093166060820152600160c01b90920416608082015261390690426124dd565b5086858151811061391957613919615780565b6020026020010151602001816001600160801b03166001600160801b0316815250508380613946906158e4565b94505050505b613955816158e4565b90506137f8565b5083811015613969578083525b50509392505050565b61397a614d20565b60018260200151601f811115613992576139926155ac565b101580156139b6575060038260200151601f8111156139b3576139b36155ac565b11155b156139f5575f826060015151116139cf576139cf61596c565b61088782606001515f815181106139e8576139e8615780565b6020026020010151613972565b815181906006811115613a0a57613a0a6155ac565b90816006811115613a1d57613a1d6155ac565b90525060608201515115613af9575f600483516006811115613a4157613a416155ac565b14613a5157826060015151613a54565b60015b9050806001600160401b03811115613a6e57613a6e614ffc565b604051908082528060200260200182016040528015613aa757816020015b613a94614d20565b815260200190600190039081613a8c5790505b5060208301525f5b8181101561271257613ad0846060015182815181106139e8576139e8615780565b83602001518281518110613ae657613ae6615780565b6020908102919091010152600101613aaf565b919050565b826001600160401b03811115613b1657613b16614ffc565b604051908082528060200260200182016040528015613b6957816020015b613b5660405180606001604052805f81526020015f8152602001606081525090565b815260200190600190039081613b345790505b5060408201525f8215613b9f57613b9c85602001515f81518110613b8f57613b8f615780565b6020026020010151614715565b90505b5f805b85811015613c9d5784613bcb57613bc887602001518281518110613b8f57613b8f615780565b92505b613c2a8a8a613bdd8d8d8d888a6147fb565b8a6020015189613bed5785613bef565b5f5b81518110613bff57613bff615780565b602002602001015188604001518681518110613c1d57613c1d615780565b6020026020010151614838565b5f84604001518281518110613c4157613c41615780565b602002602001015160200151905083613c6457613c5f816020615c29565b613c66565b805b85602001818151613c779190615c29565b90525083613c86576020613c88565b805b613c929084615c29565b925050600101613ba2565b50505050505050505050565b81515f908190815b81811015613cf15784868281518110613ccc57613ccc615780565b60200260200101515f015103613ce9579250600191506125f99050565b600101613cb1565b505f958695509350505050565b5f613d07614ce1565b60408084015182528401515160608601515114613d2757600a91506129e1565b5f5b856060015151811015613e0b57613dc4888888606001518481518110613d5157613d51615780565b602002602001015188604001518581518110613d6f57613d6f615780565b602002602001015160405180608001604052808a5f01516001600160a01b031681526020018a602001518152602001885f015181526020018a606001516001811115613dbd57613dbd6155ac565b9052612f65565b90935091505f836013811115613ddc57613ddc6155ac565b14613e035750604080518082018252908401518152602091820151918101919091526129e1565b600101613d29565b505f91509550959350505050565b5f613e22614ce1565b604083015181525f5b856060015151811015613e0b57613ea2888888606001518481518110613e5357613e53615780565b60200260200101518860405180608001604052808a5f01516001600160a01b031681526020018a602001518152602001885f015181526020018a606001516001811115613dbd57613dbd6155ac565b90935091505f836013811115613eba57613eba6155ac565b14613ee15750604080518082018252908401518152602091820151918101919091526129e1565b600101613e2b565b5f613ef2614ce1565b604083015181525f5b856060015151811015613f4e57613f23888888606001518481518110613e5357613e53615780565b90935091505f836013811115613f3b57613f3b6155ac565b03613f4657506129e1565b600101613efb565b50506040805180820182529201518252505f602082015260059590945092505050565b5f613f7a614ce1565b5f5b856060015151811015613ff657613fb3888888606001518481518110613fa457613fa4615780565b60200260200101518888612f65565b5092505f836013811115613fc957613fc96155ac565b03613fee5750506040805180820182529083015181525f6020820152600691506129e1565b600101613f7c565b50506040805180820182529201518252505f602082018190529590945092505050565b5f614022614ce1565b604083015181526060850151515f5b818110156140ec576140c0898989606001515f8151811061405457614054615780565b60200260200101518960400151858151811061407257614072615780565b602002602001015160405180608001604052808b5f01516001600160a01b031681526020018b602001518152602001895f015181526020018b606001516001811115613dbd57613dbd6155ac565b90945092505f8460138111156140d8576140d86155ac565b036140e45750506129e1565b600101614031565b5050604080518082018252930151835250505f6020820152600c9590945092505050565b5f614119614ce1565b604083015181525f5b846040015151811015613e0b5761414a888888606001515f81518110613d5157613d51615780565b90935091505f836013811115614162576141626155ac565b146141875750506040805180820182529083015181525f6020820152600b91506129e1565b600101614122565b5f614198614ce1565b60408084015182528401515115806141b95750846060015151846040015151115b156141c757600d91506129e1565b5f805b8560400151518110156142fb575f805b8860600151518110156142c0576001811b84165f036142b0575f8061427c8d8d8d60600151868151811061421057614210615780565b60200260200101518d60400151898151811061422e5761422e615780565b602002602001015160405180608001604052808f5f01516001600160a01b031681526020018f6020015181526020018d5f015181526020018f606001516001811115613dbd57613dbd6155ac565b90925090505f826013811115614294576142946155ac565b036142ad57955050600180821b949094179391506142c0565b50505b6142b9816158e4565b90506141da565b50806142ea5750506040805180820182529085015181525f6020820152600d935091506129e19050565b506142f4816158e4565b90506141ca565b505f9250509550959350505050565b602082015160408301515f919082601083601f81111561432c5761432c6155ac565b146143445761433f8888875f01516149d5565b61436e565b6143578888875f01518860200151614a0c565b60405161436592919061590f565b60405180910390205b9050601083601f811115614384576143846155ac565b1480156143915750818114155b156143a25760079350505050611dbf565b601183601f8111156143b6576143b66155ac565b1480156143c35750818111155b156143d45760089350505050611dbf565b601283601f8111156143e8576143e86155ac565b1480156143f55750818110155b156144065760099350505050611dbf565b5f9350505050611dbf565b6020820151604083015182515f929190839061443090899089906149d5565b9050601383601f811115614446576144466155ac565b1480156144535750818113155b156144645760089350505050611dbf565b601483601f811115614478576144786155ac565b1480156143f557508181126144065760099350505050611dbf565b60408201515f90816001855160068111156144b0576144b06155ac565b149050365f6144fc8989856144c65760206144c8565b5f5b89516144d79160ff1690615c29565b866144e35760206144e5565b5f5b60ff168a602001516144f791906158fc565b614a0c565b909250905060f084901c81811061451b57600e95505050505050611dbf565b6001600160881b0319601086901b8116608887901b82165f61453f8686818a615ab6565b61454891615add565b9050818382161461455a57600f61455c565b5f5b9e9d5050505050505050505050505050565b5f614577614ce1565b5f856040015160601c90505f86604001515f1c60a01b90505f80836001600160a01b031663b0acb980885f015189602001518e8e8c606001518e5f01518f602001518b6040518963ffffffff1660e01b81526004016145dd989796959493929190615e5d565b6040805180830381865afa1580156145f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061461b9190615ebc565b915091508161462b57601061462d565b5f5b604080518082018252980151885260208801919091529a95995094975050505050505050565b5f61465c614ce1565b5f61466b8888875f01516149d5565b5f1c905061467e81878660400151614a28565b92509250509550959350505050565b5f614696614ce1565b6146a98360200151858560400151614a28565b90925090505f8260138111156146c1576146c16155ac565b146146cd5760136146cf565b5f5b91509250929050565b5f6146e1614ce1565b6146f16001858560400151614a28565b90925090505f826013811115614709576147096155ac565b146146cd5760126146cf565b80515f90600181600681111561472d5761472d6155ac565b0361473b5750600192915050565b600281600681111561474f5761474f6155ac565b148061476c5750600481600681111561476a5761476a6155ac565b145b8061478857506005816006811115614786576147866155ac565b145b806147a4575060068160068111156147a2576147a26155ac565b145b156147b157505f92915050565b6020830151515f5b818110156147f0576147da85602001518281518110613b8f57613b8f615780565b6147e857505f949350505050565b6001016147b9565b506001949350505050565b5f806148078486615c29565b9050821561481657905061482f565b6148218787836149d5565b61482b9086615c29565b9150505b95945050505050565b8151600181600681111561484e5761484e6155ac565b0361485e576020828101526149cb565b6002816006811115614872576148726155ac565b0361489f5761488a6148858787876149d5565b614b5a565b614895906020615c29565b60208301526149cb565b60038160068111156148b3576148b36155ac565b036148d1576148cc868686868760200151515f88613afe565b6149cb565b60048160068111156148e5576148e56155ac565b036149295761490e86866148fa876020615c29565b866149068b8b8b6149d5565b600188613afe565b6020826020018181516149219190615c29565b9052506149cb565b600581600681111561493d5761493d6155ac565b148061495a57506006816006811115614958576149586155ac565b145b156149cb576149ac86866005846006811115614978576149786155ac565b14614983575f614986565b60045b60ff16614994886020615c29565b61499e9190615c29565b868760200151515f88613afe565b6149ba6148858787876149d5565b6149c5906020615c29565b60208301525b5091909152505050565b5f826149e2836020615c29565b1115614a0157604051631d098e2d60e21b815260040160405180910390fd5b509190910135919050565b365f858486614a1b8683615c29565b92611c4d93929190615ab6565b5f614a31614ce1565b5f80614a41858760400151613ca9565b9150915080614a5257614a5261596c565b848281518110614a6457614a64615780565b6020026020010151602001516001600160801b0316858381518110614a8b57614a8b615780565b6020026020010151604001516001600160801b031688614aab9190615c29565b1115614aef5760116040518060400160405280878152602001878581518110614ad657614ad6615780565b60200260200101515f0151815250935093505050614b52565b614af885614b88565b945086858381518110614b0d57614b0d615780565b6020026020010151604001818151614b259190615cd8565b6001600160801b031690525050604080518082019091528481525f6020820181905293509150614b529050565b935093915050565b5f60206001614b698483615c29565b614b7391906158fc565b614b7d9190615ee8565b610887906020615e46565b8051606090806001600160401b03811115614ba557614ba5614ffc565b604051908082528060200260200182016040528015614bee57816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181614bc35790505b5091505f5b8181101561271257838181518110614c0d57614c0d615780565b60200260200101515f0151838281518110614c2a57614c2a615780565b60200260200101515f018181525050838181518110614c4b57614c4b615780565b602002602001015160200151838281518110614c6957614c69615780565b6020026020010151602001906001600160801b031690816001600160801b031681525050838181518110614c9f57614c9f615780565b602002602001015160400151838281518110614cbd57614cbd615780565b60209081029190910101516001600160801b03909116604090910152600101614bf3565b60408051808201909152606081525f602082015290565b60408051608081019091525f808252602082019081526020015f5b8152602001606081525090565b60408051808201909152805f614d13565b6001600160a01b03811681146117e7575f80fd5b5f8060408385031215614d56575f80fd5b823591506020830135614d6881614d31565b809150509250929050565b5f60208284031215614d83575f80fd5b81356116af81614d31565b80356001600160e01b031981168114613af9575f80fd5b5f805f60608486031215614db7575f80fd5b8335614dc281614d31565b9250614dd060208501614d8e565b91506040840135614de081614d31565b809150509250925092565b5f60208284031215614dfb575f80fd5b5035919050565b6001600160a01b0391909116815260200190565b5f8083601f840112614e26575f80fd5b5081356001600160401b03811115614e3c575f80fd5b6020830191508360208285010111156125f9575f80fd5b600281106117e7575f80fd5b80151581146117e7575f80fd5b5f805f805f805f60c0888a031215614e82575f80fd5b8735614e8d81614d31565b96506020880135955060408801356001600160401b03811115614eae575f80fd5b614eba8a828b01614e16565b9096509450506060880135614ece81614e53565b92506080880135915060a0880135614ee581614e5f565b8091505092959891949750929550565b5f5b83811015614f0f578181015183820152602001614ef7565b50505f910152565b5f8151808452614f2e816020860160208601614ef5565b601f01601f19169290920160200192915050565b8215158152604060208201525f611dbf6040830184614f17565b5f805f805f60808688031215614f70575f80fd5b8535614f7b81614d31565b94506020860135935060408601356001600160401b03811115614f9c575f80fd5b614fa888828901614e16565b9094509250506060860135614fbc81614e53565b809150509295509295909350565b5f805f60608486031215614fdc575f80fd5b833592506020840135614fee81614d31565b91506127b760408501614d8e565b634e487b7160e01b5f52604160045260245ffd5b604051608081016001600160401b038111828210171561503257615032614ffc565b60405290565b60405160a081016001600160401b038111828210171561503257615032614ffc565b604051601f8201601f191681016001600160401b038111828210171561508257615082614ffc565b604052919050565b5f6001600160401b038211156150a2576150a2614ffc565b5060051b60200190565b803560208110613af9575f80fd5b5f6001600160401b038211156150d2576150d2614ffc565b50601f01601f191660200190565b5f82601f8301126150ef575f80fd5b81356151026150fd826150ba565b61505a565b818152846020838601011115615116575f80fd5b816020850160208301375f918101602001919091529392505050565b803560048110613af9575f80fd5b5f805f805f60a08688031215615154575f80fd5b853594506151656020870135614d31565b6020860135935061517860408701614d8e565b92506001600160401b0360608701351115615191575f80fd5b6060860135860187601f8201126151a6575f80fd5b6151b36150fd823561508a565b81358082526020808301929160051b8401018a8111156151d1575f80fd5b602084015b81811015615293576001600160401b03813511156151f2575f80fd5b803585016080818e03601f19011215615209575f80fd5b615211615010565b602082013560ff811614615223575f80fd5b60208201358152600760408301351061523a575f80fd5b60408201356020820152615250606083016150ac565b60408201526001600160401b036080830135111561526c575f80fd5b61527f8e602060808501358501016150e0565b6060820152855250602093840193016151d6565b50508094505050506152a760808701615132565b90509295509295909350565b5f805f606084860312156152c5575f80fd5b8335925060208401356152d781614d31565b91506127b760408501615132565b5f80604083850312156152f6575f80fd5b823561530181614d31565b946020939093013593505050565b5f8083601f84011261531f575f80fd5b5081356001600160401b03811115615335575f80fd5b6020830191508360208260051b85010111156125f9575f80fd5b5f805f805f60608688031215615363575f80fd5b853561536e81614d31565b945060208601356001600160401b0380821115615389575f80fd5b61539589838a0161530f565b909650945060408801359150808211156153ad575f80fd5b506153ba8882890161530f565b969995985093965092949392505050565b5f602082840312156153db575f80fd5b81356001600160401b038111156153f0575f80fd5b611dbf848285016150e0565b80356001600160801b0381168114613af9575f80fd5b80356001600160401b0381168114613af9575f80fd5b5f805f805f8060c0878903121561543d575f80fd5b8635955061544d602088016153fc565b945061545b604088016153fc565b9350615469606088016153fc565b925061547760808801615412565b915061548560a08801615412565b90509295509295509295565b5f805f80608085870312156154a4575f80fd5b8435935060208501356154b681614d31565b92506154c460408601614d8e565b91506154d260608601615132565b905092959194509250565b604080825283519082018190525f906020906060840190828701845b8281101561551e5781516001600160a01b0316845292840192908401906001016154f9565b5050506001600160a01b039490941692019190915250919050565b5f805f6040848603121561554b575f80fd5b83356001600160401b03811115615560575f80fd5b61556c86828701614e16565b909790965060209590950135949350505050565b5f8060408385031215615591575f80fd5b823561559c81614d31565b91506020830135614d6881614d31565b634e487b7160e01b5f52602160045260245ffd5b600781106155d0576155d06155ac565b9052565b602081106155d0576155d06155ac565b5f6020808301818452808551808352604092508286019150828160051b8701018488015f5b8381101561567357603f198984030185528151608060ff8251168552888201516156358a8701826155c0565b5087820151615646898701826155d4565b5060609182015191850181905261565f85820183614f17565b968901969450505090860190600101615609565b509098975050505050505050565b600481106155d0576155d06155ac565b5f60a08201878352602060018060a01b03881681850152604063ffffffff60e01b881681860152606060a08187015283885180865260c08801915060c08160051b8901019550848a015f5b828110156157455760bf198a89030184528151608060ff8251168a52888201516157088a8c01826155c0565b5087820151615719898c01826155d4565b5086820151915080878b0152615731818b0183614f17565b9950505092860192908601906001016156dc565b5050505050505080915050611a6d6080830184615681565b8381526001600160a01b038316602082015260608101611dbf6040830184615681565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156157a4575f80fd5b81356116af81614e5f565b634e487b7160e01b5f52601160045260245ffd5b5f61ffff8083168181036157d9576157d96157af565b6001019392505050565b6001600160a01b0386168152606060208083018290529082018590525f906001600160fb1b03861115615814575f80fd5b8560051b80886080860137830183810360809081016040860152810185905285905f9060a0015b8682101561586457823561584e81614e5f565b151581529183019160019190910190830161583b565b9a9950505050505050505050565b5f805f60608486031215615884575f80fd5b835161588f81614d31565b60208501519093506158a081614d31565b6040850151909250614de081614d31565b8481526001600160a01b03841660208201526001600160e01b0319831660408201526080810161482f6060830184615681565b5f600182016158f5576158f56157af565b5060010190565b81810381811115610887576108876157af565b818382375f9101908152919050565b6001600160e01b031981358181169160048510156159465780818660040360031b1b83161692505b505092915050565b6040810160148410615962576159626155ac565b9281526020015290565b634e487b7160e01b5f52600160045260245ffd5b6001600160801b03828116828216039080821115612f5e57612f5e6157af565b600281106155d0576155d06155ac565b60018060a01b0385168152836020820152608060408201525f6159d66080830185614f17565b905061482f60608301846159a0565b5f82601f8301126159f4575f80fd5b8151615a026150fd826150ba565b818152846020838601011115615a16575f80fd5b611dbf826020830160208701614ef5565b5f8060408385031215615a38575f80fd5b8251615a4381614e5f565b60208401519092506001600160401b03811115615a5e575f80fd5b6125f5858286016159e5565b5f60208284031215615a7a575f80fd5b81516116af81614e5f565b5f60208284031215615a95575f80fd5b81516001600160401b03811115615aaa575f80fd5b611dbf848285016159e5565b5f8085851115615ac4575f80fd5b83861115615ad0575f80fd5b5050820193919092039150565b80356020831015610887575f19602084900360031b1b1692915050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b0386168152846020820152608060408201525f615b49608083018587615afa565b9050611a6d60608301846159a0565b5f6020808385031215615b69575f80fd5b82516001600160401b03811115615b7e575f80fd5b8301601f81018513615b8e575f80fd5b8051615b9c6150fd8261508a565b81815260a09182028301840191848201919088841115615bba575f80fd5b938501935b838510156113fc5780858a031215615bd6575f8081fd5b615bde615038565b8551615be981614e53565b815285870151615bf881614d31565b8188015260408681015190820152606080870151908201526080808701519082015283529384019391850191615bbf565b80820180821115610887576108876157af565b6001600160401b03818116838216019080821115612f5e57612f5e6157af565b6001600160401b03828116828216039080821115612f5e57612f5e6157af565b634e487b7160e01b5f52601260045260245ffd5b5f6001600160401b0380841680615ca957615ca9615c7c565b92169190910492915050565b6001600160801b03818116838216028082169190828114615946576159466157af565b6001600160801b03818116838216019080821115612f5e57612f5e6157af565b6001600160401b03818116838216028082169190828114615946576159466157af565b604081525f615d2d6040830185614f17565b90508260208301529392505050565b5f60208284031215615d4c575f80fd5b81516116af81614d31565b6001600160f81b031981358181169160018510156159465760019490940360031b84901b1690921692915050565b838152604060208201525f611dbc604083018486615afa565b5f8251615daf818460208701614ef5565b9190910192915050565b805160208201516001600160e01b03198082169291906004831015615de85780818460040360031b1b83161693505b505050919050565b606360f81b815260e083901b6001600160e01b03191660018201526880600e6000396000f360b81b60058201525f600e82018190528251615e3881600f850160208701614ef5565b91909101600f019392505050565b8082028115828204841417610887576108876157af565b60018060a01b038916815287602082015260e060408201525f615e8460e08301888a615afa565b9050615e9360608301876159a0565b608082019490945260a08101929092526001600160a01b03191660c09091015295945050505050565b5f8060408385031215615ecd575f80fd5b8251615ed881614e5f565b6020939093015192949293505050565b5f82615ef657615ef6615c7c565b50049056fea15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054ca2646970667358221220effee86583e9a9dfea71c1020808e6a7f1ab205668c8679fce5a2d2485ca407b64736f6c63430008150033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"shanghai","libraries":{"contracts/Integrity.sol:Integrity":"0x6a6af4b16458bc39817e4019fb02bd3b26d41049","contracts/packers/Packer.sol:Packer":"0x61c5b1be435391fdd7bc6703f3740c0d11728a8c"},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":100},"remappings":[]},"optimization_runs":100,"sourcify_repo_url":"https://repo.sourcify.dev/contracts/partial_match/1/0x9646fDAD06d3e24444381f44362a3B0eB343D337/","decoded_constructor_args":[["0x0000000000000000000000000000000000000001",{"internalType":"address","name":"_owner","type":"address"}],["0x0000000000000000000000000000000000000001",{"internalType":"address","name":"_avatar","type":"address"}],["0x0000000000000000000000000000000000000001",{"internalType":"address","name":"_target","type":"address"}]],"compiler_version":"0.8.21+commit.d9974bed","is_verified_via_verifier_alliance":false,"verified_at":"2024-03-19T18:29:49.004437Z","implementations":[],"proxy_type":null,"external_libraries":[{"name":"contracts/Integrity.sol:Integrity","address_hash":"0x6a6Af4b16458Bc39817e4019fB02BD3b26d41049"},{"name":"contracts/packers/Packer.sol:Packer","address_hash":"0x61C5B1bE435391fDd7BC6703F3740C0d11728a8C"}],"creation_bytecode":"0x608060405234801562000010575f80fd5b506040516200630a3803806200630a83398101604081905262000033916200035a565b604080516001600160a01b038581166020830152848116828401528316606080830191909152825180830390910181526080909101909152620000768162000080565b50505050620003ab565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff1615906001600160401b03165f81158015620000ca5750825b90505f826001600160401b03166001148015620000e65750303b155b905081158015620000f5575080155b15620001145760405163f92ee8a960e01b815260040160405180910390fd5b84546001600160401b031916600117855583156200014357845460ff60401b1916680100000000000000001785555b5f805f888060200190518101906200015c91906200035a565b919450925090506200016e8362000240565b5f80546001600160a01b038085166001600160a01b0319928316179092556001805492841692909116919091179055620001a7620002b0565b6040516001600160a01b038281168252808416919085169033907f34d3b96a088381c6843a1f9d94d251afa88f83cc7a0d17fc23a7057506a3fc6d9060200160405180910390a450505083156200023857845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b60015f5260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c546001600160a01b031615620003035760405163dfd49ebd60e01b815260040160405180910390fd5b60015f81905260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c80546001600160a01b0319169091179055565b6001600160a01b038116811462000357575f80fd5b50565b5f805f606084860312156200036d575f80fd5b83516200037a8162000342565b60208501519093506200038d8162000342565b6040850151909250620003a08162000342565b809150509250925092565b615f5180620003b95f395ff3fe608060405234801561000f575f80fd5b50600436106101ab575f3560e01c80637508dd98116100eb578063b3dd25c71161008f578063b3dd25c71461044a578063c6fe87471461045d578063cc2f845214610470578063d4b8399214610491578063d8afba76146104a4578063e009cfde146104b7578063e29dfba8146104ca578063f2fde38b146104f7575f80fd5b80637508dd98146103bd578063776d1a01146103d05780637b0da5b2146103e35780638da5cb5b146103f6578063946d364e146103fe578063957ed2b314610411578063a4f9edbf14610424578063a8ec43ee14610437575f80fd5b8063468721a711610152578063468721a7146102ac5780635229073f146102bf5780635aef7de6146102d25780635e7c9fe8146102e4578063610b59251461037c57806366523f7d1461038f57806369ecc3cf146103a2578063715018a6146103b5575f80fd5b80630172a43a146101af578063086cfca8146101c45780630c6c76b8146101d75780632916a9af146101ea5780632959513c146101fd5780632b99e5061461023b5780632d3c25471461025c5780632d9ad53d14610289575b5f80fd5b6101c26101bd366004614d45565b61050a565b005b6101c26101d2366004614d73565b6105e0565b6101c26101e5366004614d45565b610637565b6101c26101f8366004614da5565b61070b565b61022561020b366004614deb565b60066020525f90815260409020546001600160a01b031681565b6040516102329190614e02565b60405180910390f35b61024e610249366004614e6c565b6107b0565b604051610232929190614f42565b61027b61026a366004614d73565b60076020525f908152604090205481565b604051908152602001610232565b61029c610297366004614d73565b610854565b6040519015158152602001610232565b61029c6102ba366004614f5c565b61088d565b61024e6102cd366004614f5c565b61090f565b5f54610225906001600160a01b031681565b61033d6102f2366004614deb565b60056020525f9081526040902080546001909101546001600160801b0380831692600160801b90048116916001600160401b0380821692600160401b83041691600160c01b90041685565b604080516001600160801b03968716815294861660208601526001600160401b039384169085015293166060830152909116608082015260a001610232565b6101c261038a366004614d73565b610998565b6101c261039d366004614fca565b610aa7565b6101c26103b0366004614deb565b610b31565b6101c2610b83565b6101c26103cb366004615140565b610b96565b6101c26103de366004614d73565b610c69565b6101c26103f13660046152b3565b610cc2565b610225610d9d565b6101c261040c3660046152e5565b610dcb565b6101c261041f36600461534f565b610e23565b6101c26104323660046153cb565b610f38565b6101c2610445366004615428565b6110f1565b6101c2610458366004615491565b6112ea565b61029c61046b366004614e6c565b61136a565b61048361047e3660046152e5565b611408565b6040516102329291906154dd565b600154610225906001600160a01b031681565b61027b6104b2366004615539565b611598565b6101c26104c5366004615580565b6116b6565b61029c6104d83660046152e5565b600260209081525f928352604080842090915290825290205460ff1681565b6101c2610505366004614d73565b6117ad565b6105126117ea565b6040805180820182525f8082526020808301829052858252600481528382206001600160a01b0386168352600190810190915292902081518154929391929091839160ff19169083600281111561056b5761056b6155ac565b021790555060208201518154829061ff001916610100836003811115610593576105936155ac565b021790555050604080518481526001600160a01b03841660208201527f3ccf62aacc3286173cedf5c20ec550071636a2faf0a3b28d93841736a43f822b9250015b60405180910390a15050565b6105e86117ea565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce3429190a35050565b61063f6117ea565b6040805180820190915280600281526020015f90525f8381526004602090815260408083206001600160a01b038616845260019081019092529091208251815491929091839160ff199091169083600281111561069e5761069e6155ac565b021790555060208201518154829061ff0019166101008360038111156106c6576106c66155ac565b021790555050604080518481526001600160a01b03841660208201527f277465b84f512b759d745fab70327b693ee21ce592fca91a3f491739a25fa76a9250016105d4565b6107136117ea565b60a082901c63ffffffff60401b16606084811b6001600160601b031916919091175f9081526006602090815260409182902080546001600160a01b0319166001600160a01b03868116918217909255835191881682526001600160e01b0319871692820192909252918201527f1330d96b64c7e86736f77e027ca34223dd3d1d08049281281c9d597d8098ed5991015b60405180910390a1505050565b5f60605f6107c2858b8b8b8b8b61181c565b90506107cd81611a77565b61080f8a8a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508c9250611bd0915050565b909350915083801561081f575082155b1561083d5760405163d27b44a960e01b815260040160405180910390fd5b6108478184611c5a565b5097509795505050505050565b5f60016001600160a01b0383161480159061088757506001600160a01b038281165f908152600360205260409020541615155b92915050565b335f9081526007602052604081205481906108ac90888888888861181c565b90506108b781611a77565b6108f9878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250899250611d46915050565b91506109058183611c5a565b5095945050505050565b335f90815260076020526040812054606090829061093190898989898961181c565b905061093c81611a77565b61097e888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a9250611bd0915050565b909350915061098d8184611c5a565b509550959350505050565b6109a06117ea565b6001600160a01b03811615806109bf57506001600160a01b0381166001145b156109e85780604051635c93ff2f60e11b81526004016109df9190614e02565b60405180910390fd5b6001600160a01b038181165f908152600360205260409020541615610a225780604051632061897360e01b81526004016109df9190614e02565b60036020525f80516020615efc83398151915280546001600160a01b038381165f81815260408082208054949095166001600160a01b03199485161790945560019052835490911617909155517fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f844090610a9c908390614e02565b60405180910390a150565b610aaf6117ea565b5f83815260046020526040812060020190610aca8484611dc7565b81526020019081526020015f205f90557f32a3a599b308fc900a0e6513db2ad40bf0c94367da90048a4b308d8c6b2dd6ea8383836040516107a3939291909283526001600160a01b039190911660208301526001600160e01b031916604082015260600190565b335f908152600260209081526040808320848452825291829020805460ff1916600117905590518281527f89a77869d7b8125ba16e08a92ddc8cc26fb1fa47241971167954489a5e66c2559101610a9c565b610b8b6117ea565b610b945f611de7565b565b610b9e6117ea565b60405163783a904760e01b8152736a6af4b16458bc39817e4019fb02bd3b26d410499063783a904790610bd59085906004016155e4565b5f6040518083038186803b158015610beb575f80fd5b505af4158015610bfd573d5f803e3d5ffd5b5050505f868152600460205260409020610c239150610c1c8686611dc7565b8484611e57565b7f4f6c340456f64db31a3d003c1224ba1de058557b1cdf71f21ae48ce4a4f64f528585858585604051610c5a959493929190615691565b60405180910390a15050505050565b610c716117ea565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d6905f90a35050565b610cca6117ea565b604080518082019091528060018152602001826003811115610cee57610cee6155ac565b90525f8481526004602090815260408083206001600160a01b038716845260019081019092529091208251815491929091839160ff1990911690836002811115610d3a57610d3a6155ac565b021790555060208201518154829061ff001916610100836003811115610d6257610d626155ac565b02179055509050507f05e4ec9b54e94ad676ef61d57214f6d57d752ed2022dea5e5f956d5df7ccb2508383836040516107a39392919061575d565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b610dd36117ea565b6001600160a01b0382165f81815260076020908152604091829020849055815192835282018390527f60c85b61661a191efceebca036d48b290e04a1f08dd96472b920adbdd50c64e891016105d4565b610e2b6117ea565b828114610e4b576040516374f4d53760e01b815260040160405180910390fd5b5f5b61ffff8116841115610eea5782828261ffff16818110610e6f57610e6f615780565b9050602002016020810190610e849190615794565b60045f87878561ffff16818110610e9d57610e9d615780565b602090810292909201358352508181019290925260409081015f9081206001600160a01b038b1682529092529020805460ff1916911515919091179055610ee3816157c3565b9050610e4d565b50610ef485610854565b610f0157610f0185610998565b7f9f8368fa4ddcbd561efd7ad2a2174235bf5b840a73fb18f20db9705c114624988585858585604051610c5a9594939291906157e3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610f7c5750825b90505f826001600160401b03166001148015610f975750303b155b905081158015610fa5575080155b15610fc35760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610fed57845460ff60401b1916600160401b1785555b5f805f888060200190518101906110049190615872565b92509250925061101383611de7565b5f80546001600160a01b038085166001600160a01b031992831617909255600180549284169290911691909117905561104a611f06565b816001600160a01b0316836001600160a01b0316336001600160a01b03167f34d3b96a088381c6843a1f9d94d251afa88f83cc7a0d17fc23a7057506a3fc6d846040516110979190614e02565b60405180910390a450505083156110e957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2906020015b60405180910390a15b505050505050565b6110f96117ea565b836001600160801b03165f03611116576001600160801b03611118565b835b9350806001600160401b03165f036111305742611132565b805b90506040518060a00160405280846001600160801b03168152602001856001600160801b03168152602001836001600160401b03168152602001866001600160801b03168152602001826001600160401b031681525060055f8881526020019081526020015f205f820151815f015f6101000a8154816001600160801b0302191690836001600160801b031602179055506020820151815f0160106101000a8154816001600160801b0302191690836001600160801b031602179055506040820151816001015f6101000a8154816001600160401b0302191690836001600160401b0316021790555060608201518160010160086101000a8154816001600160801b0302191690836001600160801b0316021790555060808201518160010160186101000a8154816001600160401b0302191690836001600160401b031602179055509050507f63d7ec44a20b176da1d60d75259d264ee67b3d8213706afa71a28f69ed8ebece8686868686866040516110e0969594939291909586526001600160801b0394851660208701529284166040860152921660608401526001600160401b0391821660808401521660a082015260c00190565b6112f26117ea565b6112fb81611f71565b5f858152600460205260408120600201906113168686611dc7565b81526020019081526020015f20819055507f9603b65b11492fec54ccc3d9feb93536f804d82e12228187ff730a253fc283ee8484848460405161135c94939291906158b1565b60405180910390a150505050565b5f8061137a848a8a8a8a8a61181c565b905061138581611a77565b6113c7898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508b9250611d46915050565b91508280156113d4575081155b156113f25760405163d27b44a960e01b815260040160405180910390fd5b6113fc8183611c5a565b50979650505050505050565b60605f6001600160a01b03841660011480159061142b575061142984610854565b155b1561144b5783604051635c93ff2f60e11b81526004016109df9190614e02565b825f0361146b576040516372dbed9760e11b815260040160405180910390fd5b826001600160401b0381111561148357611483614ffc565b6040519080825280602002602001820160405280156114ac578160200160208202803683370190505b506001600160a01b038086165f90815260036020526040812054929450911691505b6001600160a01b038216158015906114f057506001600160a01b038216600114155b80156114fb57508381105b15611555578183828151811061151357611513615780565b6001600160a01b039283166020918202929092018101919091529281165f9081526003909352604090922054909116908061154d816158e4565b9150506114ce565b6001600160a01b03821660011461158d57826115726001836158fc565b8151811061158257611582615780565b602002602001015191505b808352509250929050565b604080517f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218602082015246918101919091523060608201525f9081906080016040516020818303038152906040528051906020012090505f601960f81b600160f81b837f2939aeeda3ca260200c9f7b436b19e13207547ccc65cfedc857751c5ea6d91d45f1b898960405161162e92919061590f565b6040805191829003822060208301939093528101919091526060810188905260800160408051808303601f190181529082905280516020918201206001600160f81b0319958616918301919091529290931660218401526022830152604282015260620160408051601f198184030181529190528051602090910120925050505b9392505050565b6116be6117ea565b6001600160a01b03811615806116dd57506001600160a01b0381166001145b156116fd5780604051635c93ff2f60e11b81526004016109df9190614e02565b6001600160a01b038281165f9081526003602052604090205481169082161461173b5780604051638b4189ff60e01b81526004016109df9190614e02565b6001600160a01b038181165f81815260036020526040808220805487861684528284208054919096166001600160a01b0319918216179095559290915281549092169055517faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace4054276906105d4908390614e02565b6117b56117ea565b6001600160a01b0381166117de575f604051631e4fbdf760e01b81526004016109df9190614e02565b6117e781611de7565b50565b336117f3610d9d565b6001600160a01b031614610b94573360405163118cdaa760e01b81526004016109df9190614e02565b335f908152600360205260409020546060906001600160a01b031661192c575f80611845611f94565b6001600160a01b038082165f90815260036020526040902054929450909250166118845733604051634a0bfec160e01b81526004016109df9190614e02565b6001600160a01b0381165f90815260026020908152604080832085845290915290205460ff16156118cb57604051639e1dc0c560e01b8152600481018390526024016109df565b6001600160a01b0381165f908152600260209081526040808320858452825291829020805460ff1916600117905590518381527f8c8e19e7e8e193118a05465d7676e82215052d3cb150628fbf598105dc2bb6ab910160405180910390a150505b5f87900361194d57604051631fb1d3e560e31b815260040160405180910390fd5b5f8781526004602052604081209081906119656120ef565b6001600160a01b0316815260208101919091526040015f205460ff1661199e57604051631fb1d3e560e31b815260040160405180910390fd5b5f6119e4886119ad878961591e565b60a01c63ffffffff60401b1660609190911b6001600160601b031916175f908152600660205260409020546001600160a01b031690565b90505f6119ef614ce1565b6001600160a01b038316611a1957611a0f848b8b8b8b8b875f015161214a565b9092509050611a2e565b611a2883858c8c8c8c8c612398565b90925090505b5f826013811115611a4157611a416155ac565b14611a66576020810151604051631a1537eb60e31b81526109df91849160040161594e565b5193505050505b9695505050505050565b80515f5b81811015611bcb575f838281518110611a9657611a96615780565b60209081029190910181015180516040808301515f83815260058652828120835160a08101855281546001600160801b038082168352600160801b90910481169882019890985260018201546001600160401b0380821696830196909652600160401b81049098166060820152600160c01b90970490931660808701529395509193919290918190611b2890426124dd565b9150915085602001516001600160801b0316826001600160801b031614611b5157611b5161596c565b816001600160801b0316846001600160801b03161115611b7357611b7361596c565b611b7d8483615980565b600193840180546001600160401b03938416600160c01b026001600160c01b036001600160801b0394909416600160401b029390931693169290921717905550939093019250611a7b915050565b505050565b600154604051635229073f60e01b81525f916060916001600160a01b0390911690635229073f90611c0b9089908990899089906004016159b0565b5f604051808303815f875af1158015611c26573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c4d9190810190615a27565b9150915094509492505050565b81515f5b81811015611d40575f848281518110611c7957611c79615780565b602002602001015190505f815f015190508415611cf657604082015160208301517f90355d540c2980efb4c360996dfc5405ee87e812e4f3db843857547cbdb5af65918391611cc9908290615980565b604080519384526001600160801b03928316602085015291169082015260600160405180910390a1611d36565b6020808301515f8381526005909252604090912060010180546001600160801b03909216600160401b02600160401b600160c01b03199092169190911790555b5050600101611c5e565b50505050565b60015460405163468721a760e01b81525f916001600160a01b03169063468721a790611d7c9088908890889088906004016159b0565b6020604051808303815f875af1158015611d98573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dbc9190615a6a565b90505b949350505050565b60a01c63ffffffff60401b1660609190911b6001600160601b0319161790565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b604051634031b16960e11b81525f907361c5b1be435391fdd7bc6703f3740c0d11728a8c9063806362d290611e909086906004016155e4565b5f60405180830381865af4158015611eaa573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611ed19190810190615a85565b90505f611edd82612600565b9050611eeb84518483612719565b5f958652600290960160205250506040909220929092555050565b60015f5260036020525f80516020615efc833981519152546001600160a01b031615611f455760405163dfd49ebd60e01b815260040160405180910390fd5b60015f81905260036020525f80516020615efc83398151915280546001600160a01b0319169091179055565b5f600160d81b60e0836003811115611f8b57611f8b6155ac565b901b1792915050565b5f8080366065811015611fac57505f93849350915050565b5f805f611fb9858561274a565b919450925090505f611fcc6061866158fc565b90505f611fdb8683818a615ab6565b611fe491615add565b90508460ff165f0361206a57826004811080611fff57508281115b1561201557505f998a9950975050505050505050565b845f61202c61202684838c8e615ab6565b86611598565b905061204a82828c8c87908a9261204593929190615ab6565b6127c0565b612055575f80612058565b80825b9b509b50505050505050505050509091565b5f61208061207a84838a8c615ab6565b84611598565b604080515f81526020810180835283905260ff8916918101919091526060810187905260808101869052909150819060019060a0016020604051602081039080840390855afa1580156120d5573d5f803e3d5ffd5b505050602060405103519950995050505050505050509091565b335f908152600360205260408120546001600160a01b03161561211157503390565b5f61211a611f94565b6001600160a01b038082165f908152600360205260409020549193501615905061214357919050565b5f91505090565b5f612153614ce1565b84158015906121625750600485105b1561218057604051632342609160e11b815260040160405180910390fd5b60026001600160a01b0389165f90815260018b01602052604090205460ff1660028111156121b0576121b06155ac565b036122f2575f6121c9896121c4888a61591e565b611dc7565b5f81815260028c01602052604081205491925081900361221b57600360405180604001604052808781526020018a8a90612203919061591e565b6001600160e01b03191681525093509350505061238c565b5f80612226836128a2565b915091505f6122368c8a846128cc565b90505f81601381111561224b5761224b6155ac565b1461227257604080518082019091528881525f6020820152909650945061238c9350505050565b821561229e575f60405180604001604052808a81526020015f801b81525096509650505050505061238c565b505050506122e88a82898960405180608001604052808f6001600160a01b031681526020018e81526020018a81526020018b60018111156122e1576122e16155ac565b9052612980565b925092505061238c565b60016001600160a01b0389165f90815260018b01602052604090205460ff166002811115612322576123226155ac565b03612373576001600160a01b0388165f90815260018a0160205260409020546123569088908690610100900460ff166128cc565b604080518082019091528481525f6020820152909250905061238c565b5050604080518082019091528181525f60208201526002905b97509795505050505050565b5f6123a1614ce1565b60405163c7a7b63560e01b81526001600160a01b038a169063c7a7b635906123d5908a908a908a908a908a90600401615b22565b5f60405180830381865afa92505050801561241157506040513d5f823e601f3d908101601f1916820160405261240e9190810190615b58565b60015b61242e576040516315e649e960e01b815260040160405180910390fd5b5f5b81518110156124cf575f82828151811061244c5761244c615780565b602002602001015190505f816060015190505f82608001518261246f9190615c29565b905061249a8d846020015185604001518d8d8790879261249193929190615ab6565b88518c5161214a565b90975095505f8760138111156124b2576124b26155ac565b146124c157505050505061238c565b836001019350505050612430565b505097509795505050505050565b5f8083604001516001600160401b03165f148061251e5750836040015184608001516125099190615c3c565b6001600160401b0316836001600160401b0316105b15612534575050606082015160808301516125f9565b5f846040015185608001518561254a9190615c5c565b6125549190615c90565b905084602001516001600160801b031685606001516001600160801b031610156125cf57845161258e906001600160401b03831690615cb5565b856060015161259d9190615cd8565b925084602001516001600160801b0316836001600160801b0316106125c65784602001516125c8565b825b92506125d7565b846060015192505b60408501516125e69082615cf8565b85608001516125f59190615c3c565b9150505b9250929050565b5f8061260b836129eb565b905061266d818051602091820120604080516001600160f81b03198185015273ce0042b868300000d44a59004da54a005ffdcf9f60601b60218201525f6035820152605580820193909352815180820390930183526075019052805191012090565b9150813b5f8190036127125760405163257b1f8160e11b815273ce0042b868300000d44a59004da54a005ffdcf9f90634af63f02906126b29085905f90600401615d1b565b6020604051808303815f875af11580156126ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126f29190615d3c565b6001600160a01b0316836001600160a01b0316146127125761271261596c565b5050919050565b5f6001600160a01b03821660e0846003811115612738576127386155ac565b60f087901b911b171790509392505050565b5f8080848461275a6001826158fc565b612765928290615ab6565b61276e91615d57565b60f81c925084846127806041826158fc565b61278b928290615ab6565b61279491615add565b915084846127a36021826158fc565b6127ae928290615ab6565b6127b791615add565b90509250925092565b5f843b8082036127d3575f915050611dbf565b5f866001600160a01b0316631626ba7e60e01b8787876040516024016127fb93929190615d85565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516128399190615d9e565b5f60405180830381855afa9150503d805f8114612871576040519150601f19603f3d011682016040523d82523d5f602084013e612876565b606091505b509150630b135d3f60e11b905061288c82615db9565b6001600160e01b03191614979650505050505050565b600160d81b811615155f60e083901c60ff1660038111156128c5576128c56155ac565b9050915091565b5f80841180156128ee575060018260038111156128eb576128eb6155ac565b14155b801561290c57506003826003811115612909576129096155ac565b14155b15612919575060046116af565b600183600181111561292d5761292d6155ac565b14801561294c57506002826003811115612949576129496155ac565b14155b801561296a57506003826003811115612967576129676155ac565b14155b15612977575060016116af565b505f9392505050565b5f612989614ce1565b5f806129958989612a23565b915091505f6129a5888885612bea565b90505f866040015151116129b957816129c7565b6129c7866040015183612c3f565b60408701526129d9888885848a612f65565b945094505050505b9550959350505050565b6060815160016129fb9190615c29565b82604051602001612a0d929190615df0565b6040516020818303038152906040529050919050565b612a4c6040805160808101909152805f81526020015f81525f6020820152606060409091015290565b5f82815260028401602052604081205460609160f082901c916001600160a01b031690612a788261320b565b90505f80612a868386613283565b915091505f805b8351811015612baa575f848281518110612aa957612aa9615780565b6020026020010151604001519050601c601f811115612aca57612aca6155ac565b81601f811115612adc57612adc6155ac565b10612af157612aea836158e4565b9250612ba1565b600f81601f811115612b0557612b056155ac565b03612ba1576010858381518110612b1e57612b1e615780565b602002602001015160400190601f811115612b3b57612b3b6155ac565b9081601f811115612b4e57612b4e6155ac565b9052505f54604051612b6c916001600160a01b031690602001614e02565b60405160208183030381529060405280519060200120848381518110612b9457612b94615780565b6020026020010181815250505b50600101612a8d565b50612bc08383612bb986613473565b5f8c6135b6565b875f8211612bce5787612bd9565b612bd984848461378c565b975097505050505050509250929050565b612c0c60405180606001604052805f81526020015f8152602001606081525090565b5f612c1683613972565b9050612c2d85856004848560200151515f88613afe565b505f8152602081019290925250919050565b606082515f03612c50575080610887565b81515f03612c5f575081610887565b81518351612c6d9190615c29565b6001600160401b03811115612c8457612c84614ffc565b604051908082528060200260200182016040528015612ccd57816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181612ca25790505b5083519091505f5b81811015612dc357848181518110612cef57612cef615780565b60200260200101515f0151838281518110612d0c57612d0c615780565b60200260200101515f018181525050848181518110612d2d57612d2d615780565b602002602001015160200151838281518110612d4b57612d4b615780565b6020026020010151602001906001600160801b031690816001600160801b031681525050848181518110612d8157612d81615780565b602002602001015160400151838281518110612d9f57612d9f615780565b60209081029190910101516001600160801b03909116604090910152600101612cd5565b505f5b8351811015612f50575f80612df787878581518110612de757612de7615780565b60200260200101515f0151613ca9565b915091508015612e5a57858381518110612e1357612e13615780565b602002602001015160400151858381518110612e3157612e31615780565b6020026020010151604001818151612e499190615cd8565b6001600160801b0316905250612f46565b858381518110612e6c57612e6c615780565b60200260200101515f0151858581518110612e8957612e89615780565b60200260200101515f018181525050858381518110612eaa57612eaa615780565b602002602001015160200151858581518110612ec857612ec8615780565b6020026020010151602001906001600160801b031690816001600160801b031681525050858381518110612efe57612efe615780565b602002602001015160400151858581518110612f1c57612f1c615780565b60209081029190910101516001600160801b0390911660409091015283612f42816158e4565b9450505b5050600101612dc6565b508151811015612f5e578082525b5092915050565b5f612f6e614ce1565b6020850151601081601f811115612f8757612f876155ac565b10156130e1575f81601f811115612fa057612fa06155ac565b03612fc55750506040805180820182529083015181525f6020820181905291506129e1565b600581601f811115612fd957612fd96155ac565b03612ff557612feb8888888888613cfe565b92509250506129e1565b600181601f811115613009576130096155ac565b0361301b57612feb8888888888613e19565b600281601f81111561302f5761302f6155ac565b0361304157612feb8888888888613ee9565b600381601f811115613055576130556155ac565b0361306757612feb8888888888613f71565b600681601f81111561307b5761307b6155ac565b0361308d57612feb8888888888614019565b600781601f8111156130a1576130a16155ac565b036130b357612feb8888888888614110565b600881601f8111156130c7576130c76155ac565b146130d4576130d461596c565b612feb888888888861418f565b601281601f8111156130f5576130f56155ac565b11613127576131068888888861430a565b6040805180820182529086015181525f602082015290935091506129e19050565b601481601f81111561313b5761313b6155ac565b1161314c5761310688888888614411565b601581601f811115613160576131606155ac565b036131715761310688888888614493565b601681601f811115613185576131856155ac565b0361319757612feb888888888861456e565b601c81601f8111156131ab576131ab6155ac565b036131bd57612feb8888888888614653565b601d81601f8111156131d1576131d16155ac565b036131e057612feb868561468d565b601e81601f8111156131f4576131f46155ac565b146132015761320161596c565b612feb86856146d8565b6060813b6001811161321f5761321f61596c565b60015f61322c82846158fc565b9050806001600160401b0381111561324657613246614ffc565b6040519080825280601f01601f191660200182016040528015613270576020820181803683370190505b509350808260208601873c505050919050565b606080826001600160401b0381111561329e5761329e614ffc565b6040519080825280602002602001820160405280156132d757816020015b6132c4614cf8565b8152602001906001900390816132bc5790505b509150826001600160401b038111156132f2576132f2614ffc565b60405190808252806020026020018201604052801561331b578160200160208202803683370190505b5090505f60208161332d600287615e46565b613338906020615c29565b90505f5b8681101561346857878301519350613355600284615c29565b92505f8460f01c90505f87838151811061337157613371615780565b6020908102919091010151600883901c60ff1681529050600582901c60071660068111156133a1576133a16155ac565b816020019060068111156133b7576133b76155ac565b908160068111156133ca576133ca6155ac565b905250601f828116908111156133e2576133e26155ac565b8160400190601f8111156133f8576133f86155ac565b9081601f81111561340b5761340b6155ac565b90525060108160400151601f811115613426576134266155ac565b1061345e5789840151955061343c602085615c29565b93508587848151811061345157613451615780565b6020026020010181815250505b505060010161333c565b505050509250929050565b8051606090806134855761348561596c565b806001600160401b0381111561349d5761349d614ffc565b6040519080825280602002602001820160405280156134ef57816020015b6134dc60405180606001604052805f81526020015f81526020015f81525090565b8152602001906001900390816134bb5790505b5091505f19825f8151811061350657613506615780565b60209081029190910101515260015b81811015612712575f1983828151811061353157613531615780565b60200260200101515f0181815250505f8385838151811061355457613554615780565b60200260200101515f015160ff168151811061357257613572615780565b602002602001015190505f19815f01510361358b578181525b613596826001615c29565b6020820181905281516135a8916158fc565b604090910152600101613515565b5f8583815181106135c9576135c9615780565b602002602001015190508060200151825f019060068111156135ed576135ed6155ac565b90816006811115613600576136006155ac565b90525060408101516020830190601f81111561361e5761361e6155ac565b9081601f811115613631576136316155ac565b8152505084838151811061364757613647615780565b602002602001015182604001818152505083838151811061366a5761366a615780565b6020026020010151604001515f036136825750613785565b5f84848151811061369557613695615780565b60200260200101515f015190505f8585815181106136b5576136b5615780565b6020026020010151604001519050806001600160401b038111156136db576136db614ffc565b60405190808252806020026020018201604052801561373557816020015b6137226040805160808101909152805f81526020015f81525f6020820152606060409091015290565b8152602001906001900390816136f95790505b5060608501525f5b81811015613780576137788989896137558588615c29565b8960600151868151811061376b5761376b615780565b60200260200101516135b6565b60010161373d565b505050505b5050505050565b8251606090826001600160401b038111156137a9576137a9614ffc565b6040519080825280602002602001820160405280156137f257816020015b604080516060810182525f80825260208083018290529282015282525f199092019101816137c75790505b5091505f805b8281101561395c57601c87828151811061381457613814615780565b602002602001015160400151601f811115613831576138316155ac565b1061394c575f86828151811061384957613849615780565b602002602001015190505f61385e8683613ca9565b915050801561386e57505061394c565b8186858151811061388157613881615780565b602090810291909101810151919091525f83815260058252604090819020815160a08101835281546001600160801b038082168352600160801b9091048116948201949094526001909101546001600160401b0380821693830193909352600160401b81049093166060820152600160c01b90920416608082015261390690426124dd565b5086858151811061391957613919615780565b6020026020010151602001816001600160801b03166001600160801b0316815250508380613946906158e4565b94505050505b613955816158e4565b90506137f8565b5083811015613969578083525b50509392505050565b61397a614d20565b60018260200151601f811115613992576139926155ac565b101580156139b6575060038260200151601f8111156139b3576139b36155ac565b11155b156139f5575f826060015151116139cf576139cf61596c565b61088782606001515f815181106139e8576139e8615780565b6020026020010151613972565b815181906006811115613a0a57613a0a6155ac565b90816006811115613a1d57613a1d6155ac565b90525060608201515115613af9575f600483516006811115613a4157613a416155ac565b14613a5157826060015151613a54565b60015b9050806001600160401b03811115613a6e57613a6e614ffc565b604051908082528060200260200182016040528015613aa757816020015b613a94614d20565b815260200190600190039081613a8c5790505b5060208301525f5b8181101561271257613ad0846060015182815181106139e8576139e8615780565b83602001518281518110613ae657613ae6615780565b6020908102919091010152600101613aaf565b919050565b826001600160401b03811115613b1657613b16614ffc565b604051908082528060200260200182016040528015613b6957816020015b613b5660405180606001604052805f81526020015f8152602001606081525090565b815260200190600190039081613b345790505b5060408201525f8215613b9f57613b9c85602001515f81518110613b8f57613b8f615780565b6020026020010151614715565b90505b5f805b85811015613c9d5784613bcb57613bc887602001518281518110613b8f57613b8f615780565b92505b613c2a8a8a613bdd8d8d8d888a6147fb565b8a6020015189613bed5785613bef565b5f5b81518110613bff57613bff615780565b602002602001015188604001518681518110613c1d57613c1d615780565b6020026020010151614838565b5f84604001518281518110613c4157613c41615780565b602002602001015160200151905083613c6457613c5f816020615c29565b613c66565b805b85602001818151613c779190615c29565b90525083613c86576020613c88565b805b613c929084615c29565b925050600101613ba2565b50505050505050505050565b81515f908190815b81811015613cf15784868281518110613ccc57613ccc615780565b60200260200101515f015103613ce9579250600191506125f99050565b600101613cb1565b505f958695509350505050565b5f613d07614ce1565b60408084015182528401515160608601515114613d2757600a91506129e1565b5f5b856060015151811015613e0b57613dc4888888606001518481518110613d5157613d51615780565b602002602001015188604001518581518110613d6f57613d6f615780565b602002602001015160405180608001604052808a5f01516001600160a01b031681526020018a602001518152602001885f015181526020018a606001516001811115613dbd57613dbd6155ac565b9052612f65565b90935091505f836013811115613ddc57613ddc6155ac565b14613e035750604080518082018252908401518152602091820151918101919091526129e1565b600101613d29565b505f91509550959350505050565b5f613e22614ce1565b604083015181525f5b856060015151811015613e0b57613ea2888888606001518481518110613e5357613e53615780565b60200260200101518860405180608001604052808a5f01516001600160a01b031681526020018a602001518152602001885f015181526020018a606001516001811115613dbd57613dbd6155ac565b90935091505f836013811115613eba57613eba6155ac565b14613ee15750604080518082018252908401518152602091820151918101919091526129e1565b600101613e2b565b5f613ef2614ce1565b604083015181525f5b856060015151811015613f4e57613f23888888606001518481518110613e5357613e53615780565b90935091505f836013811115613f3b57613f3b6155ac565b03613f4657506129e1565b600101613efb565b50506040805180820182529201518252505f602082015260059590945092505050565b5f613f7a614ce1565b5f5b856060015151811015613ff657613fb3888888606001518481518110613fa457613fa4615780565b60200260200101518888612f65565b5092505f836013811115613fc957613fc96155ac565b03613fee5750506040805180820182529083015181525f6020820152600691506129e1565b600101613f7c565b50506040805180820182529201518252505f602082018190529590945092505050565b5f614022614ce1565b604083015181526060850151515f5b818110156140ec576140c0898989606001515f8151811061405457614054615780565b60200260200101518960400151858151811061407257614072615780565b602002602001015160405180608001604052808b5f01516001600160a01b031681526020018b602001518152602001895f015181526020018b606001516001811115613dbd57613dbd6155ac565b90945092505f8460138111156140d8576140d86155ac565b036140e45750506129e1565b600101614031565b5050604080518082018252930151835250505f6020820152600c9590945092505050565b5f614119614ce1565b604083015181525f5b846040015151811015613e0b5761414a888888606001515f81518110613d5157613d51615780565b90935091505f836013811115614162576141626155ac565b146141875750506040805180820182529083015181525f6020820152600b91506129e1565b600101614122565b5f614198614ce1565b60408084015182528401515115806141b95750846060015151846040015151115b156141c757600d91506129e1565b5f805b8560400151518110156142fb575f805b8860600151518110156142c0576001811b84165f036142b0575f8061427c8d8d8d60600151868151811061421057614210615780565b60200260200101518d60400151898151811061422e5761422e615780565b602002602001015160405180608001604052808f5f01516001600160a01b031681526020018f6020015181526020018d5f015181526020018f606001516001811115613dbd57613dbd6155ac565b90925090505f826013811115614294576142946155ac565b036142ad57955050600180821b949094179391506142c0565b50505b6142b9816158e4565b90506141da565b50806142ea5750506040805180820182529085015181525f6020820152600d935091506129e19050565b506142f4816158e4565b90506141ca565b505f9250509550959350505050565b602082015160408301515f919082601083601f81111561432c5761432c6155ac565b146143445761433f8888875f01516149d5565b61436e565b6143578888875f01518860200151614a0c565b60405161436592919061590f565b60405180910390205b9050601083601f811115614384576143846155ac565b1480156143915750818114155b156143a25760079350505050611dbf565b601183601f8111156143b6576143b66155ac565b1480156143c35750818111155b156143d45760089350505050611dbf565b601283601f8111156143e8576143e86155ac565b1480156143f55750818110155b156144065760099350505050611dbf565b5f9350505050611dbf565b6020820151604083015182515f929190839061443090899089906149d5565b9050601383601f811115614446576144466155ac565b1480156144535750818113155b156144645760089350505050611dbf565b601483601f811115614478576144786155ac565b1480156143f557508181126144065760099350505050611dbf565b60408201515f90816001855160068111156144b0576144b06155ac565b149050365f6144fc8989856144c65760206144c8565b5f5b89516144d79160ff1690615c29565b866144e35760206144e5565b5f5b60ff168a602001516144f791906158fc565b614a0c565b909250905060f084901c81811061451b57600e95505050505050611dbf565b6001600160881b0319601086901b8116608887901b82165f61453f8686818a615ab6565b61454891615add565b9050818382161461455a57600f61455c565b5f5b9e9d5050505050505050505050505050565b5f614577614ce1565b5f856040015160601c90505f86604001515f1c60a01b90505f80836001600160a01b031663b0acb980885f015189602001518e8e8c606001518e5f01518f602001518b6040518963ffffffff1660e01b81526004016145dd989796959493929190615e5d565b6040805180830381865afa1580156145f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061461b9190615ebc565b915091508161462b57601061462d565b5f5b604080518082018252980151885260208801919091529a95995094975050505050505050565b5f61465c614ce1565b5f61466b8888875f01516149d5565b5f1c905061467e81878660400151614a28565b92509250509550959350505050565b5f614696614ce1565b6146a98360200151858560400151614a28565b90925090505f8260138111156146c1576146c16155ac565b146146cd5760136146cf565b5f5b91509250929050565b5f6146e1614ce1565b6146f16001858560400151614a28565b90925090505f826013811115614709576147096155ac565b146146cd5760126146cf565b80515f90600181600681111561472d5761472d6155ac565b0361473b5750600192915050565b600281600681111561474f5761474f6155ac565b148061476c5750600481600681111561476a5761476a6155ac565b145b8061478857506005816006811115614786576147866155ac565b145b806147a4575060068160068111156147a2576147a26155ac565b145b156147b157505f92915050565b6020830151515f5b818110156147f0576147da85602001518281518110613b8f57613b8f615780565b6147e857505f949350505050565b6001016147b9565b506001949350505050565b5f806148078486615c29565b9050821561481657905061482f565b6148218787836149d5565b61482b9086615c29565b9150505b95945050505050565b8151600181600681111561484e5761484e6155ac565b0361485e576020828101526149cb565b6002816006811115614872576148726155ac565b0361489f5761488a6148858787876149d5565b614b5a565b614895906020615c29565b60208301526149cb565b60038160068111156148b3576148b36155ac565b036148d1576148cc868686868760200151515f88613afe565b6149cb565b60048160068111156148e5576148e56155ac565b036149295761490e86866148fa876020615c29565b866149068b8b8b6149d5565b600188613afe565b6020826020018181516149219190615c29565b9052506149cb565b600581600681111561493d5761493d6155ac565b148061495a57506006816006811115614958576149586155ac565b145b156149cb576149ac86866005846006811115614978576149786155ac565b14614983575f614986565b60045b60ff16614994886020615c29565b61499e9190615c29565b868760200151515f88613afe565b6149ba6148858787876149d5565b6149c5906020615c29565b60208301525b5091909152505050565b5f826149e2836020615c29565b1115614a0157604051631d098e2d60e21b815260040160405180910390fd5b509190910135919050565b365f858486614a1b8683615c29565b92611c4d93929190615ab6565b5f614a31614ce1565b5f80614a41858760400151613ca9565b9150915080614a5257614a5261596c565b848281518110614a6457614a64615780565b6020026020010151602001516001600160801b0316858381518110614a8b57614a8b615780565b6020026020010151604001516001600160801b031688614aab9190615c29565b1115614aef5760116040518060400160405280878152602001878581518110614ad657614ad6615780565b60200260200101515f0151815250935093505050614b52565b614af885614b88565b945086858381518110614b0d57614b0d615780565b6020026020010151604001818151614b259190615cd8565b6001600160801b031690525050604080518082019091528481525f6020820181905293509150614b529050565b935093915050565b5f60206001614b698483615c29565b614b7391906158fc565b614b7d9190615ee8565b610887906020615e46565b8051606090806001600160401b03811115614ba557614ba5614ffc565b604051908082528060200260200182016040528015614bee57816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181614bc35790505b5091505f5b8181101561271257838181518110614c0d57614c0d615780565b60200260200101515f0151838281518110614c2a57614c2a615780565b60200260200101515f018181525050838181518110614c4b57614c4b615780565b602002602001015160200151838281518110614c6957614c69615780565b6020026020010151602001906001600160801b031690816001600160801b031681525050838181518110614c9f57614c9f615780565b602002602001015160400151838281518110614cbd57614cbd615780565b60209081029190910101516001600160801b03909116604090910152600101614bf3565b60408051808201909152606081525f602082015290565b60408051608081019091525f808252602082019081526020015f5b8152602001606081525090565b60408051808201909152805f614d13565b6001600160a01b03811681146117e7575f80fd5b5f8060408385031215614d56575f80fd5b823591506020830135614d6881614d31565b809150509250929050565b5f60208284031215614d83575f80fd5b81356116af81614d31565b80356001600160e01b031981168114613af9575f80fd5b5f805f60608486031215614db7575f80fd5b8335614dc281614d31565b9250614dd060208501614d8e565b91506040840135614de081614d31565b809150509250925092565b5f60208284031215614dfb575f80fd5b5035919050565b6001600160a01b0391909116815260200190565b5f8083601f840112614e26575f80fd5b5081356001600160401b03811115614e3c575f80fd5b6020830191508360208285010111156125f9575f80fd5b600281106117e7575f80fd5b80151581146117e7575f80fd5b5f805f805f805f60c0888a031215614e82575f80fd5b8735614e8d81614d31565b96506020880135955060408801356001600160401b03811115614eae575f80fd5b614eba8a828b01614e16565b9096509450506060880135614ece81614e53565b92506080880135915060a0880135614ee581614e5f565b8091505092959891949750929550565b5f5b83811015614f0f578181015183820152602001614ef7565b50505f910152565b5f8151808452614f2e816020860160208601614ef5565b601f01601f19169290920160200192915050565b8215158152604060208201525f611dbf6040830184614f17565b5f805f805f60808688031215614f70575f80fd5b8535614f7b81614d31565b94506020860135935060408601356001600160401b03811115614f9c575f80fd5b614fa888828901614e16565b9094509250506060860135614fbc81614e53565b809150509295509295909350565b5f805f60608486031215614fdc575f80fd5b833592506020840135614fee81614d31565b91506127b760408501614d8e565b634e487b7160e01b5f52604160045260245ffd5b604051608081016001600160401b038111828210171561503257615032614ffc565b60405290565b60405160a081016001600160401b038111828210171561503257615032614ffc565b604051601f8201601f191681016001600160401b038111828210171561508257615082614ffc565b604052919050565b5f6001600160401b038211156150a2576150a2614ffc565b5060051b60200190565b803560208110613af9575f80fd5b5f6001600160401b038211156150d2576150d2614ffc565b50601f01601f191660200190565b5f82601f8301126150ef575f80fd5b81356151026150fd826150ba565b61505a565b818152846020838601011115615116575f80fd5b816020850160208301375f918101602001919091529392505050565b803560048110613af9575f80fd5b5f805f805f60a08688031215615154575f80fd5b853594506151656020870135614d31565b6020860135935061517860408701614d8e565b92506001600160401b0360608701351115615191575f80fd5b6060860135860187601f8201126151a6575f80fd5b6151b36150fd823561508a565b81358082526020808301929160051b8401018a8111156151d1575f80fd5b602084015b81811015615293576001600160401b03813511156151f2575f80fd5b803585016080818e03601f19011215615209575f80fd5b615211615010565b602082013560ff811614615223575f80fd5b60208201358152600760408301351061523a575f80fd5b60408201356020820152615250606083016150ac565b60408201526001600160401b036080830135111561526c575f80fd5b61527f8e602060808501358501016150e0565b6060820152855250602093840193016151d6565b50508094505050506152a760808701615132565b90509295509295909350565b5f805f606084860312156152c5575f80fd5b8335925060208401356152d781614d31565b91506127b760408501615132565b5f80604083850312156152f6575f80fd5b823561530181614d31565b946020939093013593505050565b5f8083601f84011261531f575f80fd5b5081356001600160401b03811115615335575f80fd5b6020830191508360208260051b85010111156125f9575f80fd5b5f805f805f60608688031215615363575f80fd5b853561536e81614d31565b945060208601356001600160401b0380821115615389575f80fd5b61539589838a0161530f565b909650945060408801359150808211156153ad575f80fd5b506153ba8882890161530f565b969995985093965092949392505050565b5f602082840312156153db575f80fd5b81356001600160401b038111156153f0575f80fd5b611dbf848285016150e0565b80356001600160801b0381168114613af9575f80fd5b80356001600160401b0381168114613af9575f80fd5b5f805f805f8060c0878903121561543d575f80fd5b8635955061544d602088016153fc565b945061545b604088016153fc565b9350615469606088016153fc565b925061547760808801615412565b915061548560a08801615412565b90509295509295509295565b5f805f80608085870312156154a4575f80fd5b8435935060208501356154b681614d31565b92506154c460408601614d8e565b91506154d260608601615132565b905092959194509250565b604080825283519082018190525f906020906060840190828701845b8281101561551e5781516001600160a01b0316845292840192908401906001016154f9565b5050506001600160a01b039490941692019190915250919050565b5f805f6040848603121561554b575f80fd5b83356001600160401b03811115615560575f80fd5b61556c86828701614e16565b909790965060209590950135949350505050565b5f8060408385031215615591575f80fd5b823561559c81614d31565b91506020830135614d6881614d31565b634e487b7160e01b5f52602160045260245ffd5b600781106155d0576155d06155ac565b9052565b602081106155d0576155d06155ac565b5f6020808301818452808551808352604092508286019150828160051b8701018488015f5b8381101561567357603f198984030185528151608060ff8251168552888201516156358a8701826155c0565b5087820151615646898701826155d4565b5060609182015191850181905261565f85820183614f17565b968901969450505090860190600101615609565b509098975050505050505050565b600481106155d0576155d06155ac565b5f60a08201878352602060018060a01b03881681850152604063ffffffff60e01b881681860152606060a08187015283885180865260c08801915060c08160051b8901019550848a015f5b828110156157455760bf198a89030184528151608060ff8251168a52888201516157088a8c01826155c0565b5087820151615719898c01826155d4565b5086820151915080878b0152615731818b0183614f17565b9950505092860192908601906001016156dc565b5050505050505080915050611a6d6080830184615681565b8381526001600160a01b038316602082015260608101611dbf6040830184615681565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156157a4575f80fd5b81356116af81614e5f565b634e487b7160e01b5f52601160045260245ffd5b5f61ffff8083168181036157d9576157d96157af565b6001019392505050565b6001600160a01b0386168152606060208083018290529082018590525f906001600160fb1b03861115615814575f80fd5b8560051b80886080860137830183810360809081016040860152810185905285905f9060a0015b8682101561586457823561584e81614e5f565b151581529183019160019190910190830161583b565b9a9950505050505050505050565b5f805f60608486031215615884575f80fd5b835161588f81614d31565b60208501519093506158a081614d31565b6040850151909250614de081614d31565b8481526001600160a01b03841660208201526001600160e01b0319831660408201526080810161482f6060830184615681565b5f600182016158f5576158f56157af565b5060010190565b81810381811115610887576108876157af565b818382375f9101908152919050565b6001600160e01b031981358181169160048510156159465780818660040360031b1b83161692505b505092915050565b6040810160148410615962576159626155ac565b9281526020015290565b634e487b7160e01b5f52600160045260245ffd5b6001600160801b03828116828216039080821115612f5e57612f5e6157af565b600281106155d0576155d06155ac565b60018060a01b0385168152836020820152608060408201525f6159d66080830185614f17565b905061482f60608301846159a0565b5f82601f8301126159f4575f80fd5b8151615a026150fd826150ba565b818152846020838601011115615a16575f80fd5b611dbf826020830160208701614ef5565b5f8060408385031215615a38575f80fd5b8251615a4381614e5f565b60208401519092506001600160401b03811115615a5e575f80fd5b6125f5858286016159e5565b5f60208284031215615a7a575f80fd5b81516116af81614e5f565b5f60208284031215615a95575f80fd5b81516001600160401b03811115615aaa575f80fd5b611dbf848285016159e5565b5f8085851115615ac4575f80fd5b83861115615ad0575f80fd5b5050820193919092039150565b80356020831015610887575f19602084900360031b1b1692915050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b0386168152846020820152608060408201525f615b49608083018587615afa565b9050611a6d60608301846159a0565b5f6020808385031215615b69575f80fd5b82516001600160401b03811115615b7e575f80fd5b8301601f81018513615b8e575f80fd5b8051615b9c6150fd8261508a565b81815260a09182028301840191848201919088841115615bba575f80fd5b938501935b838510156113fc5780858a031215615bd6575f8081fd5b615bde615038565b8551615be981614e53565b815285870151615bf881614d31565b8188015260408681015190820152606080870151908201526080808701519082015283529384019391850191615bbf565b80820180821115610887576108876157af565b6001600160401b03818116838216019080821115612f5e57612f5e6157af565b6001600160401b03828116828216039080821115612f5e57612f5e6157af565b634e487b7160e01b5f52601260045260245ffd5b5f6001600160401b0380841680615ca957615ca9615c7c565b92169190910492915050565b6001600160801b03818116838216028082169190828114615946576159466157af565b6001600160801b03818116838216019080821115612f5e57612f5e6157af565b6001600160401b03818116838216028082169190828114615946576159466157af565b604081525f615d2d6040830185614f17565b90508260208301529392505050565b5f60208284031215615d4c575f80fd5b81516116af81614d31565b6001600160f81b031981358181169160018510156159465760019490940360031b84901b1690921692915050565b838152604060208201525f611dbc604083018486615afa565b5f8251615daf818460208701614ef5565b9190910192915050565b805160208201516001600160e01b03198082169291906004831015615de85780818460040360031b1b83161693505b505050919050565b606360f81b815260e083901b6001600160e01b03191660018201526880600e6000396000f360b81b60058201525f600e82018190528251615e3881600f850160208701614ef5565b91909101600f019392505050565b8082028115828204841417610887576108876157af565b60018060a01b038916815287602082015260e060408201525f615e8460e08301888a615afa565b9050615e9360608301876159a0565b608082019490945260a08101929092526001600160a01b03191660c09091015295945050505050565b5f8060408385031215615ecd575f80fd5b8251615ed881614e5f565b6020939093015192949293505050565b5f82615ef657615ef6615c7c565b50049056fea15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054ca2646970667358221220effee86583e9a9dfea71c1020808e6a7f1ab205668c8679fce5a2d2485ca407b64736f6c63430008150033000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001","name":"Roles","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"shanghai","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":true,"additional_sources":[{"file_path":"@gnosis.pm/safe-contracts/contracts/common/Enum.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Enum - Collection of enums\n/// @author Richard Meissner - <richard@gnosis.pm>\ncontract Enum {\n    enum Operation {Call, DelegateCall}\n}\n"},{"file_path":"@gnosis.pm/zodiac/contracts/core/Modifier.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport {Enum} from \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport {ExecutionTracker} from \"../signature/ExecutionTracker.sol\";\nimport {IAvatar} from \"../interfaces/IAvatar.sol\";\nimport {Module} from \"./Module.sol\";\nimport {SignatureChecker} from \"../signature/SignatureChecker.sol\";\n\n/// @title Modifier Interface - A contract that sits between a Module and an Avatar and enforce some additional logic.\nabstract contract Modifier is\n  Module,\n  ExecutionTracker,\n  SignatureChecker,\n  IAvatar\n{\n  address internal constant SENTINEL_MODULES = address(0x1);\n  /// Mapping of modules.\n  mapping(address => address) internal modules;\n\n  /// `sender` is not an authorized module.\n  /// @param sender The address of the sender.\n  error NotAuthorized(address sender);\n\n  /// `module` is invalid.\n  error InvalidModule(address module);\n\n  /// `pageSize` is invalid.\n  error InvalidPageSize();\n\n  /// `module` is already disabled.\n  error AlreadyDisabledModule(address module);\n\n  /// `module` is already enabled.\n  error AlreadyEnabledModule(address module);\n\n  /// @dev `setModules()` was already called.\n  error SetupModulesAlreadyCalled();\n\n  /*\n    --------------------------------------------------\n    You must override both of the following virtual functions,\n    execTransactionFromModule() and execTransactionFromModuleReturnData().\n    It is recommended that implementations of both functions make use the \n    onlyModule modifier.\n    */\n\n  /// @dev Passes a transaction to the modifier.\n  /// @notice Can only be called by enabled modules.\n  /// @param to Destination address of module transaction.\n  /// @param value Ether value of module transaction.\n  /// @param data Data payload of module transaction.\n  /// @param operation Operation type of module transaction.\n  function execTransactionFromModule(\n    address to,\n    uint256 value,\n    bytes calldata data,\n    Enum.Operation operation\n  ) public virtual returns (bool success);\n\n  /// @dev Passes a transaction to the modifier, expects return data.\n  /// @notice Can only be called by enabled modules.\n  /// @param to Destination address of module transaction.\n  /// @param value Ether value of module transaction.\n  /// @param data Data payload of module transaction.\n  /// @param operation Operation type of module transaction.\n  function execTransactionFromModuleReturnData(\n    address to,\n    uint256 value,\n    bytes calldata data,\n    Enum.Operation operation\n  ) public virtual returns (bool success, bytes memory returnData);\n\n  /*\n    --------------------------------------------------\n    */\n\n  modifier moduleOnly() {\n    if (modules[msg.sender] == address(0)) {\n      (bytes32 hash, address signer) = moduleTxSignedBy();\n\n      // is the signer a module?\n      if (modules[signer] == address(0)) {\n        revert NotAuthorized(msg.sender);\n      }\n\n      // is the provided signature fresh?\n      if (consumed[signer][hash]) {\n        revert HashAlreadyConsumed(hash);\n      }\n\n      consumed[signer][hash] = true;\n      emit HashExecuted(hash);\n    }\n\n    _;\n  }\n\n  function sentOrSignedByModule() internal view returns (address) {\n    if (modules[msg.sender] != address(0)) {\n      return msg.sender;\n    }\n\n    (, address signer) = moduleTxSignedBy();\n    if (modules[signer] != address(0)) {\n      return signer;\n    }\n\n    return address(0);\n  }\n\n  /// @dev Disables a module on the modifier.\n  /// @notice This can only be called by the owner.\n  /// @param prevModule Module that pointed to the module to be removed in the linked list.\n  /// @param module Module to be removed.\n  function disableModule(\n    address prevModule,\n    address module\n  ) public override onlyOwner {\n    if (module == address(0) || module == SENTINEL_MODULES)\n      revert InvalidModule(module);\n    if (modules[prevModule] != module) revert AlreadyDisabledModule(module);\n    modules[prevModule] = modules[module];\n    modules[module] = address(0);\n    emit DisabledModule(module);\n  }\n\n  /// @dev Enables a module that can add transactions to the queue\n  /// @param module Address of the module to be enabled\n  /// @notice This can only be called by the owner\n  function enableModule(address module) public override onlyOwner {\n    if (module == address(0) || module == SENTINEL_MODULES)\n      revert InvalidModule(module);\n    if (modules[module] != address(0)) revert AlreadyEnabledModule(module);\n    modules[module] = modules[SENTINEL_MODULES];\n    modules[SENTINEL_MODULES] = module;\n    emit EnabledModule(module);\n  }\n\n  /// @dev Returns if an module is enabled\n  /// @return True if the module is enabled\n  function isModuleEnabled(\n    address _module\n  ) public view override returns (bool) {\n    return SENTINEL_MODULES != _module && modules[_module] != address(0);\n  }\n\n  /// @dev Returns array of modules.\n  ///      If all entries fit into a single page, the next pointer will be 0x1.\n  ///      If another page is present, next will be the last element of the returned array.\n  /// @param start Start of the page. Has to be a module or start pointer (0x1 address)\n  /// @param pageSize Maximum number of modules that should be returned. Has to be > 0\n  /// @return array Array of modules.\n  /// @return next Start of the next page.\n  function getModulesPaginated(\n    address start,\n    uint256 pageSize\n  ) external view override returns (address[] memory array, address next) {\n    if (start != SENTINEL_MODULES && !isModuleEnabled(start)) {\n      revert InvalidModule(start);\n    }\n    if (pageSize == 0) {\n      revert InvalidPageSize();\n    }\n\n    // Init array with max page size\n    array = new address[](pageSize);\n\n    // Populate return array\n    uint256 moduleCount = 0;\n    next = modules[start];\n    while (\n      next != address(0) && next != SENTINEL_MODULES && moduleCount < pageSize\n    ) {\n      array[moduleCount] = next;\n      next = modules[next];\n      moduleCount++;\n    }\n\n    // Because of the argument validation we can assume that\n    // the `currentModule` will always be either a module address\n    // or sentinel address (aka the end). If we haven't reached the end\n    // inside the loop, we need to set the next pointer to the last element\n    // because it skipped over to the next module which is neither included\n    // in the current page nor won't be included in the next one\n    // if you pass it as a start.\n    if (next != SENTINEL_MODULES) {\n      next = array[moduleCount - 1];\n    }\n    // Set correct size of returned array\n    // solhint-disable-next-line no-inline-assembly\n    assembly {\n      mstore(array, moduleCount)\n    }\n  }\n\n  /// @dev Initializes the modules linked list.\n  /// @notice Should be called as part of the `setUp` / initializing function and can only be called once.\n  function setupModules() internal {\n    if (modules[SENTINEL_MODULES] != address(0))\n      revert SetupModulesAlreadyCalled();\n    modules[SENTINEL_MODULES] = SENTINEL_MODULES;\n  }\n}\n"},{"file_path":"@gnosis.pm/zodiac/contracts/core/Module.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport {Enum} from \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\nimport {FactoryFriendly} from \"../factory/FactoryFriendly.sol\";\nimport {IAvatar} from \"../interfaces/IAvatar.sol\";\n\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\nabstract contract Module is FactoryFriendly {\n  /// @dev Address that will ultimately execute function calls.\n  address public avatar;\n  /// @dev Address that this module will pass transactions to.\n  address public target;\n\n  /// @dev Emitted each time the avatar is set.\n  event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\n  /// @dev Emitted each time the Target is set.\n  event TargetSet(address indexed previousTarget, address indexed newTarget);\n\n  /// @dev Sets the avatar to a new avatar (`newAvatar`).\n  /// @notice Can only be called by the current owner.\n  function setAvatar(address _avatar) public onlyOwner {\n    address previousAvatar = avatar;\n    avatar = _avatar;\n    emit AvatarSet(previousAvatar, _avatar);\n  }\n\n  /// @dev Sets the target to a new target (`newTarget`).\n  /// @notice Can only be called by the current owner.\n  function setTarget(address _target) public onlyOwner {\n    address previousTarget = target;\n    target = _target;\n    emit TargetSet(previousTarget, _target);\n  }\n\n  /// @dev Passes a transaction to be executed by the avatar.\n  /// @notice Can only be called by this contract.\n  /// @param to Destination address of module transaction.\n  /// @param value Ether value of module transaction.\n  /// @param data Data payload of module transaction.\n  /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n  function exec(\n    address to,\n    uint256 value,\n    bytes memory data,\n    Enum.Operation operation\n  ) internal virtual returns (bool success) {\n    return\n      IAvatar(target).execTransactionFromModule(to, value, data, operation);\n  }\n\n  /// @dev Passes a transaction to be executed by the target and returns data.\n  /// @notice Can only be called by this contract.\n  /// @param to Destination address of module transaction.\n  /// @param value Ether value of module transaction.\n  /// @param data Data payload of module transaction.\n  /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n  function execAndReturnData(\n    address to,\n    uint256 value,\n    bytes memory data,\n    Enum.Operation operation\n  ) internal virtual returns (bool success, bytes memory returnData) {\n    return\n      IAvatar(target).execTransactionFromModuleReturnData(\n        to,\n        value,\n        data,\n        operation\n      );\n  }\n}\n"},{"file_path":"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\npragma solidity >=0.7.0 <0.9.0;\n\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nabstract contract FactoryFriendly is OwnableUpgradeable {\n  function setUp(bytes memory initializeParams) public virtual;\n}\n"},{"file_path":"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport {Enum} from \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IAvatar {\n  event EnabledModule(address module);\n  event DisabledModule(address module);\n  event ExecutionFromModuleSuccess(address indexed module);\n  event ExecutionFromModuleFailure(address indexed module);\n\n  /// @dev Enables a module on the avatar.\n  /// @notice Can only be called by the avatar.\n  /// @notice Modules should be stored as a linked list.\n  /// @notice Must emit EnabledModule(address module) if successful.\n  /// @param module Module to be enabled.\n  function enableModule(address module) external;\n\n  /// @dev Disables a module on the avatar.\n  /// @notice Can only be called by the avatar.\n  /// @notice Must emit DisabledModule(address module) if successful.\n  /// @param prevModule Address that pointed to the module to be removed in the linked list\n  /// @param module Module to be removed.\n  function disableModule(address prevModule, address module) external;\n\n  /// @dev Allows a Module to execute a transaction.\n  /// @notice Can only be called by an enabled module.\n  /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n  /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n  /// @param to Destination address of module transaction.\n  /// @param value Ether value of module transaction.\n  /// @param data Data payload of module transaction.\n  /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n  function execTransactionFromModule(\n    address to,\n    uint256 value,\n    bytes memory data,\n    Enum.Operation operation\n  ) external returns (bool success);\n\n  /// @dev Allows a Module to execute a transaction and return data\n  /// @notice Can only be called by an enabled module.\n  /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n  /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n  /// @param to Destination address of module transaction.\n  /// @param value Ether value of module transaction.\n  /// @param data Data payload of module transaction.\n  /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n  function execTransactionFromModuleReturnData(\n    address to,\n    uint256 value,\n    bytes memory data,\n    Enum.Operation operation\n  ) external returns (bool success, bytes memory returnData);\n\n  /// @dev Returns if an module is enabled\n  /// @return True if the module is enabled\n  function isModuleEnabled(address module) external view returns (bool);\n\n  /// @dev Returns array of modules.\n  /// @param start Start of the page.\n  /// @param pageSize Maximum number of modules that should be returned.\n  /// @return array Array of modules.\n  /// @return next Start of the next page.\n  function getModulesPaginated(\n    address start,\n    uint256 pageSize\n  ) external view returns (address[] memory array, address next);\n}\n"},{"file_path":"@gnosis.pm/zodiac/contracts/signature/ExecutionTracker.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.0 <0.9.0;\n\n/// @title ExecutionTracker - A contract that keeps track of executed and invalidated hashes\ncontract ExecutionTracker {\n  error HashAlreadyConsumed(bytes32);\n\n  event HashExecuted(bytes32);\n  event HashInvalidated(bytes32);\n\n  mapping(address => mapping(bytes32 => bool)) public consumed;\n\n  function invalidate(bytes32 hash) external {\n    consumed[msg.sender][hash] = true;\n    emit HashInvalidated(hash);\n  }\n}\n"},{"file_path":"@gnosis.pm/zodiac/contracts/signature/IERC1271.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\n/* solhint-disable one-contract-per-file */\npragma solidity >=0.7.0 <0.9.0;\n\ninterface IERC1271 {\n  /**\n   * @notice EIP1271 method to validate a signature.\n   * @param hash Hash of the data signed on the behalf of address(this).\n   * @param signature Signature byte array associated with _data.\n   *\n   * MUST return the bytes4 magic value 0x1626ba7e when function passes.\n   * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\n   * MUST allow external calls\n   */\n  function isValidSignature(\n    bytes32 hash,\n    bytes memory signature\n  ) external view returns (bytes4);\n}\n"},{"file_path":"@gnosis.pm/zodiac/contracts/signature/SignatureChecker.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.0 <0.9.0;\n\nimport {IERC1271} from \"./IERC1271.sol\";\n\n/// @title SignatureChecker - A contract that retrieves and validates signatures appended to transaction calldata.\n/// @dev currently supports eip-712 and eip-1271 signatures\nabstract contract SignatureChecker {\n  /**\n   * @notice Searches for a signature, validates it, and returns the signer's address.\n   * @dev When signature not found or invalid, zero address is returned\n   * @return The address of the signer.\n   */\n  function moduleTxSignedBy() internal view returns (bytes32, address) {\n    bytes calldata data = msg.data;\n\n    /*\n     * The idea is to extend `onlyModule` and provide signature checking\n     * without code changes to inheriting contracts (Modifiers).\n     *\n     * Since it's a generic mechanism, there is no way to conclusively\n     * identify the trailing bytes as a signature. We simply slice those\n     * and recover signer.\n     *\n     * As a result, we impose a minimum calldata length equal to a function\n     * selector plus salt, plus a signature (i.e., 4 + 32 + 65 bytes), any\n     * shorter and calldata it guaranteed to not contain a signature.\n     */\n    if (data.length < 4 + 32 + 65) {\n      return (bytes32(0), address(0));\n    }\n\n    (uint8 v, bytes32 r, bytes32 s) = _splitSignature(data);\n\n    uint256 end = data.length - (32 + 65);\n    bytes32 salt = bytes32(data[end:]);\n\n    /*\n     * When handling contract signatures:\n     *  v - is zero\n     *  r - contains the signer\n     *  s - contains the offset within calldata where the signer specific\n     *      signature is located\n     *\n     * We detect contract signatures by checking:\n     *  1- `v` is zero\n     *  2- `s` points within the buffer, is after selector, is before\n     *      salt and delimits a non-zero length buffer\n     */\n    if (v == 0) {\n      uint256 start = uint256(s);\n      if (start < 4 || start > end) {\n        return (bytes32(0), address(0));\n      }\n      address signer = address(uint160(uint256(r)));\n\n      bytes32 hash = moduleTxHash(data[:start], salt);\n      return\n        _isValidContractSignature(signer, hash, data[start:end])\n          ? (hash, signer)\n          : (bytes32(0), address(0));\n    } else {\n      bytes32 hash = moduleTxHash(data[:end], salt);\n      return (hash, ecrecover(hash, v, r, s));\n    }\n  }\n\n  /**\n   * @notice Hashes the transaction EIP-712 data structure.\n   * @dev The produced hash is intended to be signed.\n   * @param data The current transaction's calldata.\n   * @param salt The salt value.\n   * @return The 32-byte hash that is to be signed.\n   */\n  function moduleTxHash(\n    bytes calldata data,\n    bytes32 salt\n  ) public view returns (bytes32) {\n    bytes32 domainSeparator = keccak256(\n      abi.encode(DOMAIN_SEPARATOR_TYPEHASH, block.chainid, this)\n    );\n    bytes memory moduleTxData = abi.encodePacked(\n      bytes1(0x19),\n      bytes1(0x01),\n      domainSeparator,\n      keccak256(abi.encode(MODULE_TX_TYPEHASH, keccak256(data), salt))\n    );\n    return keccak256(moduleTxData);\n  }\n\n  /**\n   * @dev Extracts signature from calldata, and divides it into `uint8 v, bytes32 r, bytes32 s`.\n   * @param data The current transaction's calldata.\n   * @return v The ECDSA v value\n   * @return r The ECDSA r value\n   * @return s The ECDSA s value\n   */\n  function _splitSignature(\n    bytes calldata data\n  ) private pure returns (uint8 v, bytes32 r, bytes32 s) {\n    v = uint8(bytes1(data[data.length - 1:]));\n    r = bytes32(data[data.length - 65:]);\n    s = bytes32(data[data.length - 33:]);\n  }\n\n  /**\n   * @dev Calls the signer contract, and validates the contract signature.\n   * @param signer The address of the signer contract.\n   * @param hash Hash of the data signed\n   * @param signature The contract signature.\n   * @return result Indicates whether the signature is valid.\n   */\n  function _isValidContractSignature(\n    address signer,\n    bytes32 hash,\n    bytes calldata signature\n  ) internal view returns (bool result) {\n    uint256 size;\n    // eslint-disable-line no-inline-assembly\n    assembly {\n      size := extcodesize(signer)\n    }\n    if (size == 0) {\n      return false;\n    }\n\n    (, bytes memory returnData) = signer.staticcall(\n      abi.encodeWithSelector(\n        IERC1271.isValidSignature.selector,\n        hash,\n        signature\n      )\n    );\n\n    return bytes4(returnData) == EIP1271_MAGIC_VALUE;\n  }\n\n  // keccak256(\n  //     \"EIP712Domain(uint256 chainId,address verifyingContract)\"\n  // );\n  bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH =\n    0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\n\n  // keccak256(\n  //     \"ModuleTx(bytes data,bytes32 salt)\"\n  // );\n  bytes32 private constant MODULE_TX_TYPEHASH =\n    0x2939aeeda3ca260200c9f7b436b19e13207547ccc65cfedc857751c5ea6d91d4;\n\n  // bytes4(keccak256(\n  //     \"isValidSignature(bytes32,bytes)\"\n  // ));\n  bytes4 private constant EIP1271_MAGIC_VALUE = 0x1626ba7e;\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n    struct OwnableStorage {\n        address _owner;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n        assembly {\n            $.slot := OwnableStorageLocation\n        }\n    }\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    function __Ownable_init(address initialOwner) internal onlyInitializing {\n        __Ownable_init_unchained(initialOwner);\n    }\n\n    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        OwnableStorage storage $ = _getOwnableStorage();\n        return $._owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        OwnableStorage storage $ = _getOwnableStorage();\n        address oldOwner = $._owner;\n        $._owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.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 reininitialization) 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 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        assembly {\n            $.slot := INITIALIZABLE_STORAGE\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (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"},{"file_path":"contracts/AllowanceTracker.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"./Core.sol\";\n\n/**\n * @title AllowanceTracker - a component of the Zodiac Roles Mod that is\n * responsible for loading and calculating allowance balances. Persists\n * consumptions back to storage.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n * @author Jan-Felix Schwarz  - <jan-felix.schwarz@gnosis.io>\n */\nabstract contract AllowanceTracker is Core {\n    event ConsumeAllowance(\n        bytes32 allowanceKey,\n        uint128 consumed,\n        uint128 newBalance\n    );\n\n    function _accruedAllowance(\n        Allowance memory allowance,\n        uint64 blockTimestamp\n    ) internal pure override returns (uint128 balance, uint64 timestamp) {\n        if (\n            allowance.period == 0 ||\n            blockTimestamp < (allowance.timestamp + allowance.period)\n        ) {\n            return (allowance.balance, allowance.timestamp);\n        }\n\n        uint64 elapsedIntervals = (blockTimestamp - allowance.timestamp) /\n            allowance.period;\n\n        if (allowance.balance < allowance.maxRefill) {\n            balance = allowance.balance + allowance.refill * elapsedIntervals;\n\n            balance = balance < allowance.maxRefill\n                ? balance\n                : allowance.maxRefill;\n        } else {\n            balance = allowance.balance;\n        }\n\n        timestamp = allowance.timestamp + elapsedIntervals * allowance.period;\n    }\n\n    /**\n     * @dev Flushes the consumption of allowances back into storage, before\n     * execution. This flush is not final\n     * @param consumptions The array of consumption structs containing\n     * information about allowances and consumed amounts.\n     */\n    function _flushPrepare(Consumption[] memory consumptions) internal {\n        uint256 count = consumptions.length;\n\n        for (uint256 i; i < count; ) {\n            Consumption memory consumption = consumptions[i];\n\n            bytes32 key = consumption.allowanceKey;\n            uint128 consumed = consumption.consumed;\n\n            // Retrieve the allowance and calculate its current updated balance\n            // and next refill timestamp.\n            Allowance storage allowance = allowances[key];\n            (uint128 balance, uint64 timestamp) = _accruedAllowance(\n                allowance,\n                uint64(block.timestamp)\n            );\n\n            assert(balance == consumption.balance);\n            assert(consumed <= balance);\n            // Flush\n            allowance.balance = balance - consumed;\n            allowance.timestamp = timestamp;\n\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    /**\n     * @dev Finalizes or reverts the flush of allowances, after transaction\n     * execution\n     * @param consumptions The array of consumption structs containing\n     * information about allowances and consumed amounts.\n     * @param success a boolean that indicates whether transaction execution\n     * was successful\n     */\n    function _flushCommit(\n        Consumption[] memory consumptions,\n        bool success\n    ) internal {\n        uint256 count = consumptions.length;\n        for (uint256 i; i < count; ) {\n            Consumption memory consumption = consumptions[i];\n            bytes32 key = consumption.allowanceKey;\n            if (success) {\n                emit ConsumeAllowance(\n                    key,\n                    consumption.consumed,\n                    consumption.balance - consumption.consumed\n                );\n            } else {\n                allowances[key].balance = consumption.balance;\n            }\n            unchecked {\n                ++i;\n            }\n        }\n    }\n}\n"},{"file_path":"contracts/Consumptions.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"./Types.sol\";\n\n/**\n * @title Consumptions - a library that provides helper functions for dealing\n * with collection of Consumptions.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n */\nlibrary Consumptions {\n    function clone(\n        Consumption[] memory consumptions\n    ) internal pure returns (Consumption[] memory result) {\n        uint256 length = consumptions.length;\n\n        result = new Consumption[](length);\n        for (uint256 i; i < length; ) {\n            result[i].allowanceKey = consumptions[i].allowanceKey;\n            result[i].balance = consumptions[i].balance;\n            result[i].consumed = consumptions[i].consumed;\n\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    function find(\n        Consumption[] memory consumptions,\n        bytes32 key\n    ) internal pure returns (uint256, bool) {\n        uint256 length = consumptions.length;\n\n        for (uint256 i; i < length; ) {\n            if (consumptions[i].allowanceKey == key) {\n                return (i, true);\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        return (0, false);\n    }\n\n    function merge(\n        Consumption[] memory c1,\n        Consumption[] memory c2\n    ) internal pure returns (Consumption[] memory result) {\n        if (c1.length == 0) return c2;\n        if (c2.length == 0) return c1;\n\n        result = new Consumption[](c1.length + c2.length);\n\n        uint256 length = c1.length;\n\n        for (uint256 i; i < length; ) {\n            result[i].allowanceKey = c1[i].allowanceKey;\n            result[i].balance = c1[i].balance;\n            result[i].consumed = c1[i].consumed;\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        for (uint256 i; i < c2.length; ) {\n            (uint256 index, bool found) = find(c1, c2[i].allowanceKey);\n            if (found) {\n                result[index].consumed += c2[i].consumed;\n            } else {\n                result[length].allowanceKey = c2[i].allowanceKey;\n                result[length].balance = c2[i].balance;\n                result[length].consumed = c2[i].consumed;\n                length++;\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        if (length < result.length) {\n            assembly {\n                mstore(result, length)\n            }\n        }\n    }\n}\n"},{"file_path":"contracts/Core.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"@gnosis.pm/zodiac/contracts/core/Modifier.sol\";\nimport \"./Types.sol\";\n\n/**\n * @title Core is the base contract for the Zodiac Roles Mod, which defines\n * the common abstract connection points between Builder, Loader, and Checker.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n */\nabstract contract Core is Modifier {\n    mapping(bytes32 => Role) internal roles;\n    mapping(bytes32 => Allowance) public allowances;\n\n    function _store(\n        Role storage role,\n        bytes32 key,\n        ConditionFlat[] memory conditions,\n        ExecutionOptions options\n    ) internal virtual;\n\n    function _load(\n        Role storage role,\n        bytes32 key\n    ) internal view virtual returns (Condition memory, Consumption[] memory);\n\n    function _accruedAllowance(\n        Allowance memory allowance,\n        uint64 blockTimestamp\n    ) internal pure virtual returns (uint128 balance, uint64 timestamp);\n\n    function _key(\n        address targetAddress,\n        bytes4 selector\n    ) internal pure returns (bytes32) {\n        /*\n         * Unoptimized version:\n         * bytes32(abi.encodePacked(targetAddress, selector))\n         */\n        return bytes32(bytes20(targetAddress)) | (bytes32(selector) >> 160);\n    }\n}\n"},{"file_path":"contracts/Decoder.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"./Topology.sol\";\n\n/**\n * @title Decoder - a library that discovers parameter locations in calldata\n * from a list of conditions.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n */\nlibrary Decoder {\n    error CalldataOutOfBounds();\n\n    /**\n     * @dev Maps the location and size of parameters in the encoded transaction data.\n     * @param data The encoded transaction data.\n     * @param condition The condition of the parameters.\n     * @return result The mapped location and size of parameters in the encoded transaction data.\n     */\n    function inspect(\n        bytes calldata data,\n        Condition memory condition\n    ) internal pure returns (ParameterPayload memory result) {\n        /*\n         * In the parameter encoding area, there is a region called the head\n         * that is divided into 32-byte chunks. Each parameter has its own\n         * corresponding chunk in the head region:\n         * - Static parameters are encoded inline.\n         * - Dynamic parameters have an offset to the tail, which is the start\n         *   of the actual encoding for the dynamic parameter. Note that the\n         *   offset does not include the 4-byte function signature.\"\n         *\n         */\n        Topology.TypeTree memory node = Topology.typeTree(condition);\n        __block__(data, 4, node, node.children.length, false, result);\n        result.location = 0;\n        result.size = data.length;\n    }\n\n    /**\n     * @dev Walks through a parameter encoding tree and maps their location and\n     * size within calldata.\n     * @param data The encoded transaction data.\n     * @param location The current offset within the calldata buffer.\n     * @param node The current node being traversed within the parameter tree.\n     * @param result The location and size of the parameter within calldata.\n     */\n    function _walk(\n        bytes calldata data,\n        uint256 location,\n        Topology.TypeTree memory node,\n        ParameterPayload memory result\n    ) private pure {\n        ParameterType paramType = node.paramType;\n\n        if (paramType == ParameterType.Static) {\n            result.size = 32;\n        } else if (paramType == ParameterType.Dynamic) {\n            result.size = 32 + _ceil32(uint256(word(data, location)));\n        } else if (paramType == ParameterType.Tuple) {\n            __block__(\n                data,\n                location,\n                node,\n                node.children.length,\n                false,\n                result\n            );\n        } else if (paramType == ParameterType.Array) {\n            __block__(\n                data,\n                location + 32,\n                node,\n                uint256(word(data, location)),\n                true,\n                result\n            );\n            result.size += 32;\n        } else if (\n            paramType == ParameterType.Calldata ||\n            paramType == ParameterType.AbiEncoded\n        ) {\n            __block__(\n                data,\n                location + 32 + (paramType == ParameterType.Calldata ? 4 : 0),\n                node,\n                node.children.length,\n                false,\n                result\n            );\n            result.size = 32 + _ceil32(uint256(word(data, location)));\n        }\n        result.location = location;\n    }\n\n    /**\n     * @dev Recursively walk through the TypeTree to decode a block of parameters.\n     * @param data The encoded transaction data.\n     * @param location The current location of the parameter block being processed.\n     * @param node The current TypeTree node being processed.\n     * @param length The number of parts in the block.\n     * @param template whether first child is type descriptor for all parts.\n     * @param result The decoded ParameterPayload.\n     */\n    function __block__(\n        bytes calldata data,\n        uint256 location,\n        Topology.TypeTree memory node,\n        uint256 length,\n        bool template,\n        ParameterPayload memory result\n    ) private pure {\n        result.children = new ParameterPayload[](length);\n        bool isInline;\n        if (template) isInline = Topology.isInline(node.children[0]);\n\n        uint256 offset;\n        for (uint256 i; i < length; ) {\n            if (!template) isInline = Topology.isInline(node.children[i]);\n\n            _walk(\n                data,\n                _locationInBlock(data, location, offset, isInline),\n                node.children[template ? 0 : i],\n                result.children[i]\n            );\n\n            uint256 childSize = result.children[i].size;\n            result.size += isInline ? childSize : childSize + 32;\n            offset += isInline ? childSize : 32;\n\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the location of a block part, which may be located inline\n     * within the block - at the HEAD - or at an offset relative to the start\n     * of the block - at the TAIL.\n     *\n     * @param data The encoded transaction data.\n     * @param location The location of the block within the calldata buffer.\n     * @param offset The offset of the block part, relative to the start of the block.\n     * @param isInline Whether the block part is located inline within the block.\n     *\n     * @return The location of the block part within the calldata buffer.\n     */\n    function _locationInBlock(\n        bytes calldata data,\n        uint256 location,\n        uint256 offset,\n        bool isInline\n    ) private pure returns (uint256) {\n        uint256 headLocation = location + offset;\n        if (isInline) {\n            return headLocation;\n        } else {\n            return location + uint256(word(data, headLocation));\n        }\n    }\n\n    /**\n     * @dev Plucks a slice of bytes from calldata.\n     * @param data The calldata to pluck the slice from.\n     * @param location The starting location of the slice.\n     * @param size The size of the slice.\n     * @return A slice of bytes from calldata.\n     */\n    function pluck(\n        bytes calldata data,\n        uint256 location,\n        uint256 size\n    ) internal pure returns (bytes calldata) {\n        return data[location:location + size];\n    }\n\n    /**\n     * @dev Loads a word from calldata.\n     * @param data The calldata to load the word from.\n     * @param location The starting location of the slice.\n     * @return result 32 byte word from calldata.\n     */\n    function word(\n        bytes calldata data,\n        uint256 location\n    ) internal pure returns (bytes32 result) {\n        if (location + 32 > data.length) {\n            revert CalldataOutOfBounds();\n        }\n        assembly {\n            result := calldataload(add(data.offset, location))\n        }\n    }\n\n    function _ceil32(uint256 size) private pure returns (uint256) {\n        // pad size. Source: http://www.cs.nott.ac.uk/~psarb2/G51MPC/slides/NumberLogic.pdf\n        return ((size + 32 - 1) / 32) * 32;\n    }\n}\n"},{"file_path":"contracts/Integrity.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"./Topology.sol\";\n\n/**\n * @title Integrity, A library that validates condition integrity, and\n * adherence to the expected input structure and rules.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n */\nlibrary Integrity {\n    error UnsuitableRootNode();\n\n    error NotBFS();\n\n    error UnsuitableParameterType(uint256 index);\n\n    error UnsuitableCompValue(uint256 index);\n\n    error UnsupportedOperator(uint256 index);\n\n    error UnsuitableParent(uint256 index);\n\n    error UnsuitableChildCount(uint256 index);\n\n    error UnsuitableChildTypeTree(uint256 index);\n\n    function enforce(ConditionFlat[] memory conditions) external pure {\n        _root(conditions);\n        for (uint256 i = 0; i < conditions.length; ++i) {\n            _node(conditions[i], i);\n        }\n        _tree(conditions);\n    }\n\n    function _root(ConditionFlat[] memory conditions) private pure {\n        uint256 count;\n\n        for (uint256 i; i < conditions.length; ++i) {\n            if (conditions[i].parent == i) ++count;\n        }\n        if (count != 1 || conditions[0].parent != 0) {\n            revert UnsuitableRootNode();\n        }\n    }\n\n    function _node(ConditionFlat memory condition, uint256 index) private pure {\n        Operator operator = condition.operator;\n        ParameterType paramType = condition.paramType;\n        bytes memory compValue = condition.compValue;\n        if (operator == Operator.Pass) {\n            if (condition.compValue.length != 0) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (operator >= Operator.And && operator <= Operator.Nor) {\n            if (paramType != ParameterType.None) {\n                revert UnsuitableParameterType(index);\n            }\n            if (condition.compValue.length != 0) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (operator == Operator.Matches) {\n            if (\n                paramType != ParameterType.Tuple &&\n                paramType != ParameterType.Array &&\n                paramType != ParameterType.Calldata &&\n                paramType != ParameterType.AbiEncoded\n            ) {\n                revert UnsuitableParameterType(index);\n            }\n            if (compValue.length != 0) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (\n            operator == Operator.ArraySome ||\n            operator == Operator.ArrayEvery ||\n            operator == Operator.ArraySubset\n        ) {\n            if (paramType != ParameterType.Array) {\n                revert UnsuitableParameterType(index);\n            }\n            if (compValue.length != 0) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (operator == Operator.EqualToAvatar) {\n            if (paramType != ParameterType.Static) {\n                revert UnsuitableParameterType(index);\n            }\n            if (compValue.length != 0) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (operator == Operator.EqualTo) {\n            if (\n                paramType != ParameterType.Static &&\n                paramType != ParameterType.Dynamic &&\n                paramType != ParameterType.Tuple &&\n                paramType != ParameterType.Array\n            ) {\n                revert UnsuitableParameterType(index);\n            }\n            if (compValue.length == 0 || compValue.length % 32 != 0) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (\n            operator == Operator.GreaterThan ||\n            operator == Operator.LessThan ||\n            operator == Operator.SignedIntGreaterThan ||\n            operator == Operator.SignedIntLessThan\n        ) {\n            if (paramType != ParameterType.Static) {\n                revert UnsuitableParameterType(index);\n            }\n            if (compValue.length != 32) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (operator == Operator.Bitmask) {\n            if (\n                paramType != ParameterType.Static &&\n                paramType != ParameterType.Dynamic\n            ) {\n                revert UnsuitableParameterType(index);\n            }\n            if (compValue.length != 32) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (operator == Operator.Custom) {\n            if (compValue.length != 32) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (operator == Operator.WithinAllowance) {\n            if (paramType != ParameterType.Static) {\n                revert UnsuitableParameterType(index);\n            }\n            if (compValue.length != 32) {\n                revert UnsuitableCompValue(index);\n            }\n        } else if (\n            operator == Operator.EtherWithinAllowance ||\n            operator == Operator.CallWithinAllowance\n        ) {\n            if (paramType != ParameterType.None) {\n                revert UnsuitableParameterType(index);\n            }\n            if (compValue.length != 32) {\n                revert UnsuitableCompValue(index);\n            }\n        } else {\n            revert UnsupportedOperator(index);\n        }\n    }\n\n    function _tree(ConditionFlat[] memory conditions) private pure {\n        uint256 length = conditions.length;\n        // check BFS\n        for (uint256 i = 1; i < length; ++i) {\n            if (conditions[i - 1].parent > conditions[i].parent) {\n                revert NotBFS();\n            }\n        }\n\n        for (uint256 i = 0; i < length; ++i) {\n            if (\n                (conditions[i].operator == Operator.EtherWithinAllowance ||\n                    conditions[i].operator == Operator.CallWithinAllowance) &&\n                conditions[conditions[i].parent].paramType !=\n                ParameterType.Calldata\n            ) {\n                revert UnsuitableParent(i);\n            }\n        }\n\n        Topology.Bounds[] memory childrenBounds = Topology.childrenBounds(\n            conditions\n        );\n\n        for (uint256 i = 0; i < conditions.length; i++) {\n            ConditionFlat memory condition = conditions[i];\n            Topology.Bounds memory childBounds = childrenBounds[i];\n\n            if (condition.paramType == ParameterType.None) {\n                if (\n                    (condition.operator == Operator.EtherWithinAllowance ||\n                        condition.operator == Operator.CallWithinAllowance) &&\n                    childBounds.length != 0\n                ) {\n                    revert UnsuitableChildCount(i);\n                }\n                if (\n                    (condition.operator >= Operator.And &&\n                        condition.operator <= Operator.Nor)\n                ) {\n                    if (childBounds.length == 0) {\n                        revert UnsuitableChildCount(i);\n                    }\n                }\n            } else if (\n                condition.paramType == ParameterType.Static ||\n                condition.paramType == ParameterType.Dynamic\n            ) {\n                if (childBounds.length != 0) {\n                    revert UnsuitableChildCount(i);\n                }\n            } else if (\n                condition.paramType == ParameterType.Tuple ||\n                condition.paramType == ParameterType.Calldata ||\n                condition.paramType == ParameterType.AbiEncoded\n            ) {\n                if (childBounds.length == 0) {\n                    revert UnsuitableChildCount(i);\n                }\n            } else {\n                assert(condition.paramType == ParameterType.Array);\n\n                if (childBounds.length == 0) {\n                    revert UnsuitableChildCount(i);\n                }\n\n                if (\n                    (condition.operator == Operator.ArraySome ||\n                        condition.operator == Operator.ArrayEvery) &&\n                    childBounds.length != 1\n                ) {\n                    revert UnsuitableChildCount(i);\n                } else if (\n                    condition.operator == Operator.ArraySubset &&\n                    childBounds.length > 256\n                ) {\n                    revert UnsuitableChildCount(i);\n                }\n            }\n        }\n\n        for (uint256 i = 0; i < conditions.length; i++) {\n            ConditionFlat memory condition = conditions[i];\n            if (\n                ((condition.operator >= Operator.And &&\n                    condition.operator <= Operator.Nor) ||\n                    condition.paramType == ParameterType.Array) &&\n                childrenBounds[i].length > 1\n            ) {\n                _compatibleSiblingTypes(conditions, i, childrenBounds);\n            }\n        }\n\n        Topology.TypeTree memory typeTree = Topology.typeTree(\n            conditions,\n            0,\n            childrenBounds\n        );\n\n        if (typeTree.paramType != ParameterType.Calldata) {\n            revert UnsuitableRootNode();\n        }\n    }\n\n    function _compatibleSiblingTypes(\n        ConditionFlat[] memory conditions,\n        uint256 index,\n        Topology.Bounds[] memory childrenBounds\n    ) private pure {\n        uint256 start = childrenBounds[index].start;\n        uint256 end = childrenBounds[index].end;\n\n        for (uint256 j = start + 1; j < end; ++j) {\n            if (\n                !_isTypeMatch(conditions, start, j, childrenBounds) &&\n                !_isTypeEquivalent(conditions, start, j, childrenBounds)\n            ) {\n                revert UnsuitableChildTypeTree(index);\n            }\n        }\n    }\n\n    function _isTypeMatch(\n        ConditionFlat[] memory conditions,\n        uint256 i,\n        uint256 j,\n        Topology.Bounds[] memory childrenBounds\n    ) private pure returns (bool) {\n        return\n            typeTreeId(Topology.typeTree(conditions, i, childrenBounds)) ==\n            typeTreeId(Topology.typeTree(conditions, j, childrenBounds));\n    }\n\n    function _isTypeEquivalent(\n        ConditionFlat[] memory conditions,\n        uint256 i,\n        uint256 j,\n        Topology.Bounds[] memory childrenBounds\n    ) private pure returns (bool) {\n        ParameterType leftParamType = Topology\n            .typeTree(conditions, i, childrenBounds)\n            .paramType;\n        return\n            (leftParamType == ParameterType.Calldata ||\n                leftParamType == ParameterType.AbiEncoded) &&\n            Topology.typeTree(conditions, j, childrenBounds).paramType ==\n            ParameterType.Dynamic;\n    }\n\n    function typeTreeId(\n        Topology.TypeTree memory node\n    ) private pure returns (bytes32) {\n        uint256 childCount = node.children.length;\n        if (childCount > 0) {\n            bytes32[] memory ids = new bytes32[](node.children.length);\n            for (uint256 i = 0; i < childCount; ++i) {\n                ids[i] = typeTreeId(node.children[i]);\n            }\n\n            return keccak256(abi.encodePacked(node.paramType, \"-\", ids));\n        } else {\n            return bytes32(uint256(node.paramType));\n        }\n    }\n}\n"},{"file_path":"contracts/Periphery.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"./adapters/Types.sol\";\n\n/**\n * @title Periphery - a coordinating component that facilitates plug-and-play\n * functionality for the Zodiac Roles Mod through the use of adapters.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n */\nabstract contract Periphery is OwnableUpgradeable {\n    event SetUnwrapAdapter(\n        address to,\n        bytes4 selector,\n        ITransactionUnwrapper adapter\n    );\n\n    mapping(bytes32 => ITransactionUnwrapper) public unwrappers;\n\n    function setTransactionUnwrapper(\n        address to,\n        bytes4 selector,\n        ITransactionUnwrapper adapter\n    ) external onlyOwner {\n        unwrappers[bytes32(bytes20(to)) | (bytes32(selector) >> 160)] = adapter;\n        emit SetUnwrapAdapter(to, selector, adapter);\n    }\n\n    function getTransactionUnwrapper(\n        address to,\n        bytes4 selector\n    ) internal view returns (ITransactionUnwrapper) {\n        return unwrappers[bytes32(bytes20(to)) | (bytes32(selector) >> 160)];\n    }\n}\n"},{"file_path":"contracts/PermissionBuilder.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"./Core.sol\";\nimport \"./Integrity.sol\";\n\nimport \"./packers/BufferPacker.sol\";\n\n/**\n * @title PermissionBuilder - a component of the Zodiac Roles Mod that is\n * responsible for constructing, managing, granting, and revoking all types\n * of permission data.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n * @author Jan-Felix Schwarz  - <jan-felix.schwarz@gnosis.io>\n */\nabstract contract PermissionBuilder is Core {\n    event AllowTarget(\n        bytes32 roleKey,\n        address targetAddress,\n        ExecutionOptions options\n    );\n    event RevokeTarget(bytes32 roleKey, address targetAddress);\n    event ScopeTarget(bytes32 roleKey, address targetAddress);\n\n    event AllowFunction(\n        bytes32 roleKey,\n        address targetAddress,\n        bytes4 selector,\n        ExecutionOptions options\n    );\n    event RevokeFunction(\n        bytes32 roleKey,\n        address targetAddress,\n        bytes4 selector\n    );\n    event ScopeFunction(\n        bytes32 roleKey,\n        address targetAddress,\n        bytes4 selector,\n        ConditionFlat[] conditions,\n        ExecutionOptions options\n    );\n\n    event SetAllowance(\n        bytes32 allowanceKey,\n        uint128 balance,\n        uint128 maxRefill,\n        uint128 refill,\n        uint64 period,\n        uint64 timestamp\n    );\n\n    /// @dev Allows transactions to a target address.\n    /// @param roleKey identifier of the role to be modified.\n    /// @param targetAddress Destination address of transaction.\n    /// @param options designates if a transaction can send ether and/or delegatecall to target.\n    function allowTarget(\n        bytes32 roleKey,\n        address targetAddress,\n        ExecutionOptions options\n    ) external onlyOwner {\n        roles[roleKey].targets[targetAddress] = TargetAddress({\n            clearance: Clearance.Target,\n            options: options\n        });\n        emit AllowTarget(roleKey, targetAddress, options);\n    }\n\n    /// @dev Removes transactions to a target address.\n    /// @param roleKey identifier of the role to be modified.\n    /// @param targetAddress Destination address of transaction.\n    function revokeTarget(\n        bytes32 roleKey,\n        address targetAddress\n    ) external onlyOwner {\n        roles[roleKey].targets[targetAddress] = TargetAddress({\n            clearance: Clearance.None,\n            options: ExecutionOptions.None\n        });\n        emit RevokeTarget(roleKey, targetAddress);\n    }\n\n    /// @dev Designates only specific functions can be called.\n    /// @param roleKey identifier of the role to be modified.\n    /// @param targetAddress Destination address of transaction.\n    function scopeTarget(\n        bytes32 roleKey,\n        address targetAddress\n    ) external onlyOwner {\n        roles[roleKey].targets[targetAddress] = TargetAddress({\n            clearance: Clearance.Function,\n            options: ExecutionOptions.None\n        });\n        emit ScopeTarget(roleKey, targetAddress);\n    }\n\n    /// @dev Specifies the functions that can be called.\n    /// @param roleKey identifier of the role to be modified.\n    /// @param targetAddress Destination address of transaction.\n    /// @param selector 4 byte function selector.\n    /// @param options designates if a transaction can send ether and/or delegatecall to target.\n    function allowFunction(\n        bytes32 roleKey,\n        address targetAddress,\n        bytes4 selector,\n        ExecutionOptions options\n    ) external onlyOwner {\n        roles[roleKey].scopeConfig[_key(targetAddress, selector)] = BufferPacker\n            .packHeaderAsWildcarded(options);\n\n        emit AllowFunction(roleKey, targetAddress, selector, options);\n    }\n\n    /// @dev Removes the functions that can be called.\n    /// @param roleKey identifier of the role to be modified.\n    /// @param targetAddress Destination address of transaction.\n    /// @param selector 4 byte function selector.\n    function revokeFunction(\n        bytes32 roleKey,\n        address targetAddress,\n        bytes4 selector\n    ) external onlyOwner {\n        delete roles[roleKey].scopeConfig[_key(targetAddress, selector)];\n        emit RevokeFunction(roleKey, targetAddress, selector);\n    }\n\n    /// @dev Sets conditions to enforce on calls to the specified target.\n    /// @param roleKey identifier of the role to be modified.\n    /// @param targetAddress Destination address of transaction.\n    /// @param selector 4 byte function selector.\n    /// @param conditions The conditions to enforce.\n    /// @param options designates if a transaction can send ether and/or delegatecall to target.\n    function scopeFunction(\n        bytes32 roleKey,\n        address targetAddress,\n        bytes4 selector,\n        ConditionFlat[] memory conditions,\n        ExecutionOptions options\n    ) external onlyOwner {\n        Integrity.enforce(conditions);\n\n        _store(\n            roles[roleKey],\n            _key(targetAddress, selector),\n            conditions,\n            options\n        );\n\n        emit ScopeFunction(\n            roleKey,\n            targetAddress,\n            selector,\n            conditions,\n            options\n        );\n    }\n\n    function setAllowance(\n        bytes32 key,\n        uint128 balance,\n        uint128 maxRefill,\n        uint128 refill,\n        uint64 period,\n        uint64 timestamp\n    ) external onlyOwner {\n        maxRefill = maxRefill != 0 ? maxRefill : type(uint128).max;\n        timestamp = timestamp != 0 ? timestamp : uint64(block.timestamp);\n\n        allowances[key] = Allowance({\n            refill: refill,\n            maxRefill: maxRefill,\n            period: period,\n            timestamp: timestamp,\n            balance: balance\n        });\n        emit SetAllowance(key, balance, maxRefill, refill, period, timestamp);\n    }\n}\n"},{"file_path":"contracts/PermissionChecker.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\nimport \"./Consumptions.sol\";\nimport \"./Core.sol\";\nimport \"./Decoder.sol\";\nimport \"./Periphery.sol\";\n\nimport \"./packers/BufferPacker.sol\";\n\n/**\n * @title PermissionChecker - a component of Zodiac Roles Mod responsible\n * for enforcing and authorizing actions performed on behalf of a role.\n *\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n * @author Jan-Felix Schwarz  - <jan-felix.schwarz@gnosis.io>\n */\nabstract contract PermissionChecker is Core, Periphery {\n    function _authorize(\n        bytes32 roleKey,\n        address to,\n        uint256 value,\n        bytes calldata data,\n        Enum.Operation operation\n    ) internal moduleOnly returns (Consumption[] memory) {\n        // We never authorize the zero role, as it could clash with the\n        // unassigned default role\n        if (roleKey == 0) {\n            revert NoMembership();\n        }\n\n        Role storage role = roles[roleKey];\n        if (!role.members[sentOrSignedByModule()]) {\n            revert NoMembership();\n        }\n\n        ITransactionUnwrapper adapter = getTransactionUnwrapper(\n            to,\n            bytes4(data)\n        );\n\n        Status status;\n        Result memory result;\n        if (address(adapter) == address(0)) {\n            (status, result) = _transaction(\n                role,\n                to,\n                value,\n                data,\n                operation,\n                result.consumptions\n            );\n        } else {\n            (status, result) = _multiEntrypoint(\n                ITransactionUnwrapper(adapter),\n                role,\n                to,\n                value,\n                data,\n                operation\n            );\n        }\n        if (status != Status.Ok) {\n            revert ConditionViolation(status, result.info);\n        }\n\n        return result.consumptions;\n    }\n\n    function _multiEntrypoint(\n        ITransactionUnwrapper adapter,\n        Role storage role,\n        address to,\n        uint256 value,\n        bytes calldata data,\n        Enum.Operation operation\n    ) private view returns (Status status, Result memory result) {\n        try adapter.unwrap(to, value, data, operation) returns (\n            UnwrappedTransaction[] memory transactions\n        ) {\n            for (uint256 i; i < transactions.length; ) {\n                UnwrappedTransaction memory transaction = transactions[i];\n                uint256 left = transaction.dataLocation;\n                uint256 right = left + transaction.dataSize;\n                (status, result) = _transaction(\n                    role,\n                    transaction.to,\n                    transaction.value,\n                    data[left:right],\n                    transaction.operation,\n                    result.consumptions\n                );\n                if (status != Status.Ok) {\n                    return (status, result);\n                }\n                unchecked {\n                    ++i;\n                }\n            }\n        } catch {\n            revert MalformedMultiEntrypoint();\n        }\n    }\n\n    /// @dev Inspects an individual transaction and performs checks based on permission scoping.\n    /// Wildcarded indicates whether params need to be inspected or not. When true, only ExecutionOptions are checked.\n    /// @param role Role to check for.\n    /// @param to Destination address of transaction.\n    /// @param value Ether value of module transaction.\n    /// @param data Data payload of module transaction.\n    /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n    function _transaction(\n        Role storage role,\n        address to,\n        uint256 value,\n        bytes calldata data,\n        Enum.Operation operation,\n        Consumption[] memory consumptions\n    ) private view returns (Status, Result memory) {\n        if (data.length != 0 && data.length < 4) {\n            revert FunctionSignatureTooShort();\n        }\n\n        if (role.targets[to].clearance == Clearance.Function) {\n            bytes32 key = _key(to, bytes4(data));\n            {\n                bytes32 header = role.scopeConfig[key];\n                if (header == 0) {\n                    return (\n                        Status.FunctionNotAllowed,\n                        Result({\n                            consumptions: consumptions,\n                            info: bytes32(bytes4(data))\n                        })\n                    );\n                }\n\n                (bool isWildcarded, ExecutionOptions options) = BufferPacker\n                    .unpackOptions(header);\n\n                Status status = _executionOptions(value, operation, options);\n                if (status != Status.Ok) {\n                    return (\n                        status,\n                        Result({consumptions: consumptions, info: 0})\n                    );\n                }\n\n                if (isWildcarded) {\n                    return (\n                        Status.Ok,\n                        Result({consumptions: consumptions, info: 0})\n                    );\n                }\n            }\n\n            return\n                _scopedFunction(\n                    role,\n                    key,\n                    data,\n                    Context({\n                        to: to,\n                        value: value,\n                        operation: operation,\n                        consumptions: consumptions\n                    })\n                );\n        } else if (role.targets[to].clearance == Clearance.Target) {\n            return (\n                _executionOptions(value, operation, role.targets[to].options),\n                Result({consumptions: consumptions, info: 0})\n            );\n        } else {\n            return (\n                Status.TargetAddressNotAllowed,\n                Result({consumptions: consumptions, info: 0})\n            );\n        }\n    }\n\n    /// @dev Examines the ether value and operation for a given role target.\n    /// @param value Ether value of module transaction.\n    /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n    /// @param options Determines if a transaction can send ether and/or delegatecall to target.\n    function _executionOptions(\n        uint256 value,\n        Enum.Operation operation,\n        ExecutionOptions options\n    ) private pure returns (Status) {\n        // isSend && !canSend\n        if (\n            value > 0 &&\n            options != ExecutionOptions.Send &&\n            options != ExecutionOptions.Both\n        ) {\n            return Status.SendNotAllowed;\n        }\n\n        // isDelegateCall && !canDelegateCall\n        if (\n            operation == Enum.Operation.DelegateCall &&\n            options != ExecutionOptions.DelegateCall &&\n            options != ExecutionOptions.Both\n        ) {\n            return Status.DelegateCallNotAllowed;\n        }\n\n        return Status.Ok;\n    }\n\n    function _scopedFunction(\n        Role storage role,\n        bytes32 key,\n        bytes calldata data,\n        Context memory context\n    ) private view returns (Status, Result memory) {\n        (Condition memory condition, Consumption[] memory consumptions) = _load(\n            role,\n            key\n        );\n        ParameterPayload memory payload = Decoder.inspect(data, condition);\n\n        context.consumptions = context.consumptions.length > 0\n            ? Consumptions.merge(context.consumptions, consumptions)\n            : consumptions;\n\n        return _walk(data, condition, payload, context);\n    }\n\n    function _walk(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private view returns (Status, Result memory) {\n        Operator operator = condition.operator;\n\n        if (operator < Operator.EqualTo) {\n            if (operator == Operator.Pass) {\n                return (\n                    Status.Ok,\n                    Result({consumptions: context.consumptions, info: 0})\n                );\n            } else if (operator == Operator.Matches) {\n                return _matches(data, condition, payload, context);\n            } else if (operator == Operator.And) {\n                return _and(data, condition, payload, context);\n            } else if (operator == Operator.Or) {\n                return _or(data, condition, payload, context);\n            } else if (operator == Operator.Nor) {\n                return _nor(data, condition, payload, context);\n            } else if (operator == Operator.ArraySome) {\n                return _arraySome(data, condition, payload, context);\n            } else if (operator == Operator.ArrayEvery) {\n                return _arrayEvery(data, condition, payload, context);\n            } else {\n                assert(operator == Operator.ArraySubset);\n                return _arraySubset(data, condition, payload, context);\n            }\n        } else {\n            if (operator <= Operator.LessThan) {\n                return (\n                    _compare(data, condition, payload),\n                    Result({consumptions: context.consumptions, info: 0})\n                );\n            } else if (operator <= Operator.SignedIntLessThan) {\n                return (\n                    _compareSignedInt(data, condition, payload),\n                    Result({consumptions: context.consumptions, info: 0})\n                );\n            } else if (operator == Operator.Bitmask) {\n                return (\n                    _bitmask(data, condition, payload),\n                    Result({consumptions: context.consumptions, info: 0})\n                );\n            } else if (operator == Operator.Custom) {\n                return _custom(data, condition, payload, context);\n            } else if (operator == Operator.WithinAllowance) {\n                return _withinAllowance(data, condition, payload, context);\n            } else if (operator == Operator.EtherWithinAllowance) {\n                return _etherWithinAllowance(condition, context);\n            } else {\n                assert(operator == Operator.CallWithinAllowance);\n                return _callWithinAllowance(condition, context);\n            }\n        }\n    }\n\n    function _matches(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private view returns (Status status, Result memory result) {\n        result.consumptions = context.consumptions;\n\n        if (condition.children.length != payload.children.length) {\n            return (Status.ParameterNotAMatch, result);\n        }\n\n        for (uint256 i; i < condition.children.length; ) {\n            (status, result) = _walk(\n                data,\n                condition.children[i],\n                payload.children[i],\n                Context({\n                    to: context.to,\n                    value: context.value,\n                    operation: context.operation,\n                    consumptions: result.consumptions\n                })\n            );\n            if (status != Status.Ok) {\n                return (\n                    status,\n                    Result({\n                        consumptions: context.consumptions,\n                        info: result.info\n                    })\n                );\n            }\n            unchecked {\n                ++i;\n            }\n        }\n\n        return (Status.Ok, result);\n    }\n\n    function _and(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private view returns (Status status, Result memory result) {\n        result.consumptions = context.consumptions;\n\n        for (uint256 i; i < condition.children.length; ) {\n            (status, result) = _walk(\n                data,\n                condition.children[i],\n                payload,\n                Context({\n                    to: context.to,\n                    value: context.value,\n                    operation: context.operation,\n                    consumptions: result.consumptions\n                })\n            );\n            if (status != Status.Ok) {\n                return (\n                    status,\n                    Result({\n                        consumptions: context.consumptions,\n                        info: result.info\n                    })\n                );\n            }\n            unchecked {\n                ++i;\n            }\n        }\n        return (Status.Ok, result);\n    }\n\n    function _or(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private view returns (Status status, Result memory result) {\n        result.consumptions = context.consumptions;\n\n        for (uint256 i; i < condition.children.length; ) {\n            (status, result) = _walk(\n                data,\n                condition.children[i],\n                payload,\n                Context({\n                    to: context.to,\n                    value: context.value,\n                    operation: context.operation,\n                    consumptions: result.consumptions\n                })\n            );\n            if (status == Status.Ok) {\n                return (status, result);\n            }\n            unchecked {\n                ++i;\n            }\n        }\n\n        return (\n            Status.OrViolation,\n            Result({consumptions: context.consumptions, info: 0})\n        );\n    }\n\n    function _nor(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private view returns (Status status, Result memory) {\n        for (uint256 i; i < condition.children.length; ) {\n            (status, ) = _walk(data, condition.children[i], payload, context);\n            if (status == Status.Ok) {\n                return (\n                    Status.NorViolation,\n                    Result({consumptions: context.consumptions, info: 0})\n                );\n            }\n            unchecked {\n                ++i;\n            }\n        }\n        return (\n            Status.Ok,\n            Result({consumptions: context.consumptions, info: 0})\n        );\n    }\n\n    function _arraySome(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private view returns (Status status, Result memory result) {\n        result.consumptions = context.consumptions;\n\n        uint256 length = condition.children.length;\n        for (uint256 i; i < length; ) {\n            (status, result) = _walk(\n                data,\n                condition.children[0],\n                payload.children[i],\n                Context({\n                    to: context.to,\n                    value: context.value,\n                    operation: context.operation,\n                    consumptions: result.consumptions\n                })\n            );\n            if (status == Status.Ok) {\n                return (status, result);\n            }\n            unchecked {\n                ++i;\n            }\n        }\n        return (\n            Status.NoArrayElementPasses,\n            Result({consumptions: context.consumptions, info: 0})\n        );\n    }\n\n    function _arrayEvery(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private view returns (Status status, Result memory result) {\n        result.consumptions = context.consumptions;\n\n        for (uint256 i; i < payload.children.length; ) {\n            (status, result) = _walk(\n                data,\n                condition.children[0],\n                payload.children[i],\n                Context({\n                    to: context.to,\n                    value: context.value,\n                    operation: context.operation,\n                    consumptions: result.consumptions\n                })\n            );\n            if (status != Status.Ok) {\n                return (\n                    Status.NotEveryArrayElementPasses,\n                    Result({consumptions: context.consumptions, info: 0})\n                );\n            }\n            unchecked {\n                ++i;\n            }\n        }\n        return (Status.Ok, result);\n    }\n\n    function _arraySubset(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private view returns (Status, Result memory result) {\n        result.consumptions = context.consumptions;\n\n        if (\n            payload.children.length == 0 ||\n            payload.children.length > condition.children.length\n        ) {\n            return (Status.ParameterNotSubsetOfAllowed, result);\n        }\n\n        uint256 taken;\n        for (uint256 i; i < payload.children.length; ++i) {\n            bool found = false;\n            for (uint256 j; j < condition.children.length; ++j) {\n                if (taken & (1 << j) != 0) continue;\n\n                (Status status, Result memory _result) = _walk(\n                    data,\n                    condition.children[j],\n                    payload.children[i],\n                    Context({\n                        to: context.to,\n                        value: context.value,\n                        operation: context.operation,\n                        consumptions: result.consumptions\n                    })\n                );\n                if (status == Status.Ok) {\n                    found = true;\n                    taken |= 1 << j;\n                    result = _result;\n                    break;\n                }\n            }\n            if (!found) {\n                return (\n                    Status.ParameterNotSubsetOfAllowed,\n                    Result({consumptions: context.consumptions, info: 0})\n                );\n            }\n        }\n\n        return (Status.Ok, result);\n    }\n\n    function _compare(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload\n    ) private pure returns (Status) {\n        Operator operator = condition.operator;\n        bytes32 compValue = condition.compValue;\n        bytes32 value = operator == Operator.EqualTo\n            ? keccak256(Decoder.pluck(data, payload.location, payload.size))\n            : Decoder.word(data, payload.location);\n\n        if (operator == Operator.EqualTo && value != compValue) {\n            return Status.ParameterNotAllowed;\n        } else if (operator == Operator.GreaterThan && value <= compValue) {\n            return Status.ParameterLessThanAllowed;\n        } else if (operator == Operator.LessThan && value >= compValue) {\n            return Status.ParameterGreaterThanAllowed;\n        } else {\n            return Status.Ok;\n        }\n    }\n\n    function _compareSignedInt(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload\n    ) private pure returns (Status) {\n        Operator operator = condition.operator;\n        int256 compValue = int256(uint256(condition.compValue));\n        int256 value = int256(uint256(Decoder.word(data, payload.location)));\n\n        if (operator == Operator.SignedIntGreaterThan && value <= compValue) {\n            return Status.ParameterLessThanAllowed;\n        } else if (\n            operator == Operator.SignedIntLessThan && value >= compValue\n        ) {\n            return Status.ParameterGreaterThanAllowed;\n        } else {\n            return Status.Ok;\n        }\n    }\n\n    /**\n     * Applies a shift and bitmask on the payload bytes and compares the\n     * result to the expected value. The shift offset, bitmask, and expected\n     * value are specified in the compValue parameter, which is tightly\n     * packed as follows:\n     * <2 bytes shift offset><15 bytes bitmask><15 bytes expected value>\n     */\n    function _bitmask(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload\n    ) private pure returns (Status) {\n        bytes32 compValue = condition.compValue;\n        bool isInline = condition.paramType == ParameterType.Static;\n        bytes calldata value = Decoder.pluck(\n            data,\n            payload.location + (isInline ? 0 : 32),\n            payload.size - (isInline ? 0 : 32)\n        );\n\n        uint256 shift = uint16(bytes2(compValue));\n        if (shift >= value.length) {\n            return Status.BitmaskOverflow;\n        }\n\n        bytes32 rinse = bytes15(0xffffffffffffffffffffffffffffff);\n        bytes32 mask = (compValue << 16) & rinse;\n        // while its necessary to apply the rinse to the mask its not strictly\n        // necessary to do so for the expected value, since we get remaining\n        // 15 bytes anyway (shifting the word by 17 bytes)\n        bytes32 expected = (compValue << (16 + 15 * 8)) & rinse;\n        bytes32 slice = bytes32(value[shift:]);\n\n        return\n            (slice & mask) == expected ? Status.Ok : Status.BitmaskNotAllowed;\n    }\n\n    function _custom(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private view returns (Status, Result memory) {\n        // 20 bytes on the left\n        ICustomCondition adapter = ICustomCondition(\n            address(bytes20(condition.compValue))\n        );\n        // 12 bytes on the right\n        bytes12 extra = bytes12(uint96(uint256(condition.compValue)));\n\n        (bool success, bytes32 info) = adapter.check(\n            context.to,\n            context.value,\n            data,\n            context.operation,\n            payload.location,\n            payload.size,\n            extra\n        );\n        return (\n            success ? Status.Ok : Status.CustomConditionViolation,\n            Result({consumptions: context.consumptions, info: info})\n        );\n    }\n\n    function _withinAllowance(\n        bytes calldata data,\n        Condition memory condition,\n        ParameterPayload memory payload,\n        Context memory context\n    ) private pure returns (Status, Result memory) {\n        uint256 value = uint256(Decoder.word(data, payload.location));\n        return __consume(value, condition, context.consumptions);\n    }\n\n    function _etherWithinAllowance(\n        Condition memory condition,\n        Context memory context\n    ) private pure returns (Status status, Result memory result) {\n        (status, result) = __consume(\n            context.value,\n            condition,\n            context.consumptions\n        );\n        return (\n            status == Status.Ok ? Status.Ok : Status.EtherAllowanceExceeded,\n            result\n        );\n    }\n\n    function _callWithinAllowance(\n        Condition memory condition,\n        Context memory context\n    ) private pure returns (Status status, Result memory result) {\n        (status, result) = __consume(1, condition, context.consumptions);\n        return (\n            status == Status.Ok ? Status.Ok : Status.CallAllowanceExceeded,\n            result\n        );\n    }\n\n    function __consume(\n        uint256 value,\n        Condition memory condition,\n        Consumption[] memory consumptions\n    ) private pure returns (Status, Result memory) {\n        (uint256 index, bool found) = Consumptions.find(\n            consumptions,\n            condition.compValue\n        );\n        assert(found);\n\n        if (\n            value + consumptions[index].consumed > consumptions[index].balance\n        ) {\n            return (\n                Status.AllowanceExceeded,\n                Result({\n                    consumptions: consumptions,\n                    info: consumptions[index].allowanceKey\n                })\n            );\n        } else {\n            consumptions = Consumptions.clone(consumptions);\n            consumptions[index].consumed += uint128(value);\n            return (Status.Ok, Result({consumptions: consumptions, info: 0}));\n        }\n    }\n\n    struct Context {\n        address to;\n        uint256 value;\n        Consumption[] consumptions;\n        Enum.Operation operation;\n    }\n\n    struct Result {\n        Consumption[] consumptions;\n        bytes32 info;\n    }\n\n    enum Status {\n        Ok,\n        /// Role not allowed to delegate call to target address\n        DelegateCallNotAllowed,\n        /// Role not allowed to call target address\n        TargetAddressNotAllowed,\n        /// Role not allowed to call this function on target address\n        FunctionNotAllowed,\n        /// Role not allowed to send to target address\n        SendNotAllowed,\n        /// Or conition not met\n        OrViolation,\n        /// Nor conition not met\n        NorViolation,\n        /// Parameter value is not equal to allowed\n        ParameterNotAllowed,\n        /// Parameter value less than allowed\n        ParameterLessThanAllowed,\n        /// Parameter value greater than maximum allowed by role\n        ParameterGreaterThanAllowed,\n        /// Parameter value does not match\n        ParameterNotAMatch,\n        /// Array elements do not meet allowed criteria for every element\n        NotEveryArrayElementPasses,\n        /// Array elements do not meet allowed criteria for at least one element\n        NoArrayElementPasses,\n        /// Parameter value not a subset of allowed\n        ParameterNotSubsetOfAllowed,\n        /// Bitmask exceeded value length\n        BitmaskOverflow,\n        /// Bitmask not an allowed value\n        BitmaskNotAllowed,\n        CustomConditionViolation,\n        AllowanceExceeded,\n        CallAllowanceExceeded,\n        EtherAllowanceExceeded\n    }\n\n    /// Sender is not a member of the role\n    error NoMembership();\n\n    /// Function signature too short\n    error FunctionSignatureTooShort();\n\n    /// Calldata unwrapping failed\n    error MalformedMultiEntrypoint();\n\n    error ConditionViolation(Status status, bytes32 info);\n}\n"},{"file_path":"contracts/PermissionLoader.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"@gnosis.pm/zodiac/contracts/core/Modifier.sol\";\nimport \"./Consumptions.sol\";\nimport \"./Core.sol\";\nimport \"./Topology.sol\";\nimport \"./WriteOnce.sol\";\n\nimport \"./packers/Packer.sol\";\n\n/**\n * @title PermissionLoader - a component of the Zodiac Roles Mod that handles\n * the writing and reading of permission data to and from storage.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n * @author Jan-Felix Schwarz  - <jan-felix.schwarz@gnosis.io>\n */\nabstract contract PermissionLoader is Core {\n    function _store(\n        Role storage role,\n        bytes32 key,\n        ConditionFlat[] memory conditions,\n        ExecutionOptions options\n    ) internal override {\n        bytes memory buffer = Packer.pack(conditions);\n        address pointer = WriteOnce.store(buffer);\n\n        role.scopeConfig[key] = BufferPacker.packHeader(\n            conditions.length,\n            options,\n            pointer\n        );\n    }\n\n    function _load(\n        Role storage role,\n        bytes32 key\n    )\n        internal\n        view\n        override\n        returns (Condition memory condition, Consumption[] memory consumptions)\n    {\n        (uint256 count, address pointer) = BufferPacker.unpackHeader(\n            role.scopeConfig[key]\n        );\n        bytes memory buffer = WriteOnce.load(pointer);\n        (\n            ConditionFlat[] memory conditionsFlat,\n            bytes32[] memory compValues\n        ) = BufferPacker.unpackBody(buffer, count);\n\n        uint256 allowanceCount;\n\n        for (uint256 i; i < conditionsFlat.length; ) {\n            Operator operator = conditionsFlat[i].operator;\n            if (operator >= Operator.WithinAllowance) {\n                ++allowanceCount;\n            } else if (operator == Operator.EqualToAvatar) {\n                // patch Operator.EqualToAvatar which in reality works as\n                // a placeholder\n                conditionsFlat[i].operator = Operator.EqualTo;\n                compValues[i] = keccak256(abi.encode(avatar));\n            }\n            unchecked {\n                ++i;\n            }\n        }\n\n        _conditionTree(\n            conditionsFlat,\n            compValues,\n            Topology.childrenBounds(conditionsFlat),\n            0,\n            condition\n        );\n\n        return (\n            condition,\n            allowanceCount > 0\n                ? _consumptions(conditionsFlat, compValues, allowanceCount)\n                : consumptions\n        );\n    }\n\n    function _conditionTree(\n        ConditionFlat[] memory conditionsFlat,\n        bytes32[] memory compValues,\n        Topology.Bounds[] memory childrenBounds,\n        uint256 index,\n        Condition memory treeNode\n    ) private pure {\n        // This function populates a buffer received as an argument instead of\n        // instantiating a result object. This is an important gas optimization\n\n        ConditionFlat memory conditionFlat = conditionsFlat[index];\n        treeNode.paramType = conditionFlat.paramType;\n        treeNode.operator = conditionFlat.operator;\n        treeNode.compValue = compValues[index];\n\n        if (childrenBounds[index].length == 0) {\n            return;\n        }\n\n        uint256 start = childrenBounds[index].start;\n        uint256 length = childrenBounds[index].length;\n\n        treeNode.children = new Condition[](length);\n        for (uint j; j < length; ) {\n            _conditionTree(\n                conditionsFlat,\n                compValues,\n                childrenBounds,\n                start + j,\n                treeNode.children[j]\n            );\n            unchecked {\n                ++j;\n            }\n        }\n    }\n\n    function _consumptions(\n        ConditionFlat[] memory conditions,\n        bytes32[] memory compValues,\n        uint256 maxAllowanceCount\n    ) private view returns (Consumption[] memory result) {\n        uint256 count = conditions.length;\n        result = new Consumption[](maxAllowanceCount);\n\n        uint256 insert;\n\n        for (uint256 i; i < count; ++i) {\n            if (conditions[i].operator < Operator.WithinAllowance) {\n                continue;\n            }\n\n            bytes32 key = compValues[i];\n            (, bool contains) = Consumptions.find(result, key);\n            if (contains) {\n                continue;\n            }\n\n            result[insert].allowanceKey = key;\n            (result[insert].balance, ) = _accruedAllowance(\n                allowances[key],\n                uint64(block.timestamp)\n            );\n            insert++;\n        }\n\n        if (insert < maxAllowanceCount) {\n            assembly {\n                mstore(result, insert)\n            }\n        }\n    }\n}\n"},{"file_path":"contracts/Topology.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"./Types.sol\";\n\n/**\n * @title Topology - a library that provides helper functions for dealing with\n * the flat representation of conditions.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n */\nlibrary Topology {\n    struct TypeTree {\n        ParameterType paramType;\n        TypeTree[] children;\n    }\n\n    struct Bounds {\n        uint256 start;\n        uint256 end;\n        uint256 length;\n    }\n\n    function childrenBounds(\n        ConditionFlat[] memory conditions\n    ) internal pure returns (Bounds[] memory result) {\n        uint256 count = conditions.length;\n        assert(count > 0);\n\n        // parents are breadth-first\n        result = new Bounds[](count);\n        result[0].start = type(uint256).max;\n\n        // first item is the root\n        for (uint256 i = 1; i < count; ) {\n            result[i].start = type(uint256).max;\n            Bounds memory parentBounds = result[conditions[i].parent];\n            if (parentBounds.start == type(uint256).max) {\n                parentBounds.start = i;\n            }\n            parentBounds.end = i + 1;\n            parentBounds.length = parentBounds.end - parentBounds.start;\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    function isInline(TypeTree memory node) internal pure returns (bool) {\n        ParameterType paramType = node.paramType;\n        if (paramType == ParameterType.Static) {\n            return true;\n        } else if (\n            paramType == ParameterType.Dynamic ||\n            paramType == ParameterType.Array ||\n            paramType == ParameterType.Calldata ||\n            paramType == ParameterType.AbiEncoded\n        ) {\n            return false;\n        } else {\n            uint256 length = node.children.length;\n\n            for (uint256 i; i < length; ) {\n                if (!isInline(node.children[i])) {\n                    return false;\n                }\n                unchecked {\n                    ++i;\n                }\n            }\n            return true;\n        }\n    }\n\n    function typeTree(\n        Condition memory condition\n    ) internal pure returns (TypeTree memory result) {\n        if (\n            condition.operator >= Operator.And &&\n            condition.operator <= Operator.Nor\n        ) {\n            assert(condition.children.length > 0);\n            return typeTree(condition.children[0]);\n        }\n\n        result.paramType = condition.paramType;\n        if (condition.children.length > 0) {\n            uint256 length = condition.paramType == ParameterType.Array\n                ? 1\n                : condition.children.length;\n            result.children = new TypeTree[](length);\n\n            for (uint256 i; i < length; ) {\n                result.children[i] = typeTree(condition.children[i]);\n\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n    }\n\n    function typeTree(\n        ConditionFlat[] memory conditions,\n        uint256 index,\n        Bounds[] memory bounds\n    ) internal pure returns (TypeTree memory result) {\n        ConditionFlat memory condition = conditions[index];\n        if (\n            condition.operator >= Operator.And &&\n            condition.operator <= Operator.Nor\n        ) {\n            assert(bounds[index].length > 0);\n            return typeTree(conditions, bounds[index].start, bounds);\n        }\n\n        result.paramType = condition.paramType;\n        if (bounds[index].length > 0) {\n            uint256 start = bounds[index].start;\n            uint256 end = condition.paramType == ParameterType.Array\n                ? bounds[index].start + 1\n                : bounds[index].end;\n            result.children = new TypeTree[](end - start);\n            for (uint256 i = start; i < end; ) {\n                result.children[i - start] = typeTree(conditions, i, bounds);\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n    }\n}\n"},{"file_path":"contracts/Types.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\n/**\n * @title Types - a file that contains all of the type definitions used throughout\n * the Zodiac Roles Mod.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n * @author Jan-Felix Schwarz  - <jan-felix.schwarz@gnosis.io>\n */\n\nenum ParameterType {\n    None,\n    Static,\n    Dynamic,\n    Tuple,\n    Array,\n    Calldata,\n    AbiEncoded\n}\n\nenum Operator {\n    // 00:    EMPTY EXPRESSION (default, always passes)\n    //          paramType: Static / Dynamic / Tuple / Array\n    //          ❓ children (only for paramType: Tuple / Array to describe their structure)\n    //          🚫 compValue\n    /* 00: */ Pass,\n    // ------------------------------------------------------------\n    // 01-04: LOGICAL EXPRESSIONS\n    //          paramType: None\n    //          ✅ children\n    //          🚫 compValue\n    /* 01: */ And,\n    /* 02: */ Or,\n    /* 03: */ Nor,\n    /* 04: */ _Placeholder04,\n    // ------------------------------------------------------------\n    // 05-14: COMPLEX EXPRESSIONS\n    //          paramType: Calldata / AbiEncoded / Tuple / Array,\n    //          ✅ children\n    //          🚫 compValue\n    /* 05: */ Matches,\n    /* 06: */ ArraySome,\n    /* 07: */ ArrayEvery,\n    /* 08: */ ArraySubset,\n    /* 09: */ _Placeholder09,\n    /* 10: */ _Placeholder10,\n    /* 11: */ _Placeholder11,\n    /* 12: */ _Placeholder12,\n    /* 13: */ _Placeholder13,\n    /* 14: */ _Placeholder14,\n    // ------------------------------------------------------------\n    // 15:    SPECIAL COMPARISON (without compValue)\n    //          paramType: Static\n    //          🚫 children\n    //          🚫 compValue\n    /* 15: */ EqualToAvatar,\n    // ------------------------------------------------------------\n    // 16-31: COMPARISON EXPRESSIONS\n    //          paramType: Static / Dynamic / Tuple / Array\n    //          ❓ children (only for paramType: Tuple / Array to describe their structure)\n    //          ✅ compValue\n    /* 16: */ EqualTo, // paramType: Static / Dynamic / Tuple / Array\n    /* 17: */ GreaterThan, // paramType: Static\n    /* 18: */ LessThan, // paramType: Static\n    /* 19: */ SignedIntGreaterThan, // paramType: Static\n    /* 20: */ SignedIntLessThan, // paramType: Static\n    /* 21: */ Bitmask, // paramType: Static / Dynamic\n    /* 22: */ Custom, // paramType: Static / Dynamic / Tuple / Array\n    /* 23: */ _Placeholder23,\n    /* 24: */ _Placeholder24,\n    /* 25: */ _Placeholder25,\n    /* 26: */ _Placeholder26,\n    /* 27: */ _Placeholder27,\n    /* 28: */ WithinAllowance, // paramType: Static\n    /* 29: */ EtherWithinAllowance, // paramType: None\n    /* 30: */ CallWithinAllowance, // paramType: None\n    /* 31: */ _Placeholder31\n}\n\nenum ExecutionOptions {\n    None,\n    Send,\n    DelegateCall,\n    Both\n}\n\nenum Clearance {\n    None,\n    Target,\n    Function\n}\n\n// This struct is a flattened version of Condition\n// used for ABI encoding a scope config tree\n// (ABI does not support recursive types)\nstruct ConditionFlat {\n    uint8 parent;\n    ParameterType paramType;\n    Operator operator;\n    bytes compValue;\n}\n\nstruct Condition {\n    ParameterType paramType;\n    Operator operator;\n    bytes32 compValue;\n    Condition[] children;\n}\nstruct ParameterPayload {\n    uint256 location;\n    uint256 size;\n    ParameterPayload[] children;\n}\n\nstruct TargetAddress {\n    Clearance clearance;\n    ExecutionOptions options;\n}\n\nstruct Role {\n    mapping(address => bool) members;\n    mapping(address => TargetAddress) targets;\n    mapping(bytes32 => bytes32) scopeConfig;\n}\n\n/// @notice The order of members in the `Allowance` struct is significant; members updated during accrual (`balance` and `timestamp`) should be stored in the same word.\n/// @custom:member refill Amount added to balance after each period elapses.\n/// @custom:member maxRefill Refilling stops when balance reaches this value.\n/// @custom:member period Duration, in seconds, before a refill occurs. If set to 0, the allowance is for one-time use and won't be replenished.\n/// @custom:member balance Remaining allowance available for use. Decreases with usage and increases after each refill by the specified refill amount.\n/// @custom:member timestamp Timestamp when the last refill occurred.\nstruct Allowance {\n    uint128 refill;\n    uint128 maxRefill;\n    uint64 period;\n    uint128 balance;\n    uint64 timestamp;\n}\n\nstruct Consumption {\n    bytes32 allowanceKey;\n    uint128 balance;\n    uint128 consumed;\n}\n"},{"file_path":"contracts/WriteOnce.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\ninterface ISingletonFactory {\n    function deploy(\n        bytes memory initCode,\n        bytes32 salt\n    ) external returns (address);\n}\n\nlibrary WriteOnce {\n    address public constant SINGLETON_FACTORY =\n        0xce0042B868300000d44A59004Da54A005ffdcf9f;\n\n    bytes32 public constant SALT =\n        0x0000000000000000000000000000000000000000000000000000000000000000;\n\n    /**\n    @notice Stores `data` and returns `pointer` as key for later retrieval\n    @dev The pointer is a contract address with `data` as code\n    @param data to be written\n    @return pointer Pointer to the written `data`\n  */\n    function store(bytes memory data) internal returns (address pointer) {\n        bytes memory creationBytecode = creationBytecodeFor(data);\n        pointer = addressFor(creationBytecode);\n\n        uint256 size;\n        assembly {\n            size := extcodesize(pointer)\n        }\n\n        if (size == 0) {\n            assert(\n                pointer ==\n                    ISingletonFactory(SINGLETON_FACTORY).deploy(\n                        creationBytecode,\n                        SALT\n                    )\n            );\n        }\n    }\n\n    /**\n    @notice Reads the contents of the `pointer` code as data, skips the first byte\n    @dev The function is intended for reading pointers generated by `store`\n    @param pointer to be read\n    @return runtimeBytecode read from `pointer` contract\n  */\n    function load(\n        address pointer\n    ) internal view returns (bytes memory runtimeBytecode) {\n        uint256 rawSize;\n        assembly {\n            rawSize := extcodesize(pointer)\n        }\n        assert(rawSize > 1);\n\n        // jump over the prepended 00\n        uint256 offset = 1;\n        // don't count with the 00\n        uint256 size = rawSize - 1;\n\n        runtimeBytecode = new bytes(size);\n        assembly {\n            extcodecopy(pointer, add(runtimeBytecode, 32), offset, size)\n        }\n    }\n\n    function addressFor(\n        bytes memory creationBytecode\n    ) private pure returns (address) {\n        bytes32 hash = keccak256(\n            abi.encodePacked(\n                bytes1(0xff),\n                SINGLETON_FACTORY,\n                SALT,\n                keccak256(creationBytecode)\n            )\n        );\n        // get the right most 20 bytes\n        return address(uint160(uint256(hash)));\n    }\n\n    /**\n    @notice Generate a creation code that results on a contract with `data` as bytecode\n    @param data the buffer to be stored\n    @return creationBytecode (constructor) for new contract\n    */\n    function creationBytecodeFor(\n        bytes memory data\n    ) private pure returns (bytes memory) {\n        /*\n      0x00    0x63         0x63XXXXXX  PUSH4 _code.length  size\n      0x01    0x80         0x80        DUP1                size size\n      0x02    0x60         0x600e      PUSH1 14            14 size size\n      0x03    0x60         0x6000      PUSH1 00            0 14 size size\n      0x04    0x39         0x39        CODECOPY            size\n      0x05    0x60         0x6000      PUSH1 00            0 size\n      0x06    0xf3         0xf3        RETURN\n      <CODE>\n    */\n\n        return\n            abi.encodePacked(\n                hex\"63\",\n                uint32(data.length + 1),\n                hex\"80_60_0E_60_00_39_60_00_F3\",\n                // Prepend 00 to data so contract can't be called\n                hex\"00\",\n                data\n            );\n    }\n}\n"},{"file_path":"contracts/adapters/Types.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IMultiSend {\n    function multiSend(bytes memory transactions) external payable;\n}\n\nstruct UnwrappedTransaction {\n    Enum.Operation operation;\n    address to;\n    uint256 value;\n    // We wanna deal in calldata slices. We return location, let invoker slice\n    uint256 dataLocation;\n    uint256 dataSize;\n}\n\ninterface ITransactionUnwrapper {\n    function unwrap(\n        address to,\n        uint256 value,\n        bytes calldata data,\n        Enum.Operation operation\n    ) external view returns (UnwrappedTransaction[] memory result);\n}\n\ninterface ICustomCondition {\n    function check(\n        address to,\n        uint256 value,\n        bytes calldata data,\n        Enum.Operation operation,\n        uint256 location,\n        uint256 size,\n        bytes12 extra\n    ) external view returns (bool success, bytes32 reason);\n}\n"},{"file_path":"contracts/packers/BufferPacker.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"../Types.sol\";\n\n/**\n * @title BufferPacker a library that provides packing and unpacking functions\n * for conditions. It allows packing externally provided ConditionsFlat[] into\n * a storage-optimized buffer, and later unpack it into memory.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n */\nlibrary BufferPacker {\n    // HEADER (stored as a single word in storage)\n    // 2   bytes -> count (Condition count)\n    // 1   bytes -> options (ExecutionOptions)\n    // 1   bytes -> isWildcarded\n    // 8   bytes -> unused\n    // 20  bytes -> pointer (address containining packed conditions)\n    uint256 private constant OFFSET_COUNT = 240;\n    uint256 private constant OFFSET_OPTIONS = 224;\n    uint256 private constant OFFSET_IS_WILDCARDED = 216;\n    uint256 private constant MASK_COUNT = 0xffff << OFFSET_COUNT;\n    uint256 private constant MASK_OPTIONS = 0xff << OFFSET_OPTIONS;\n    uint256 private constant MASK_IS_WILDCARDED = 0x1 << OFFSET_IS_WILDCARDED;\n    // CONDITION (stored as runtimeBytecode at pointer address kept in header)\n    // 8    bits -> parent\n    // 3    bits -> type\n    // 5    bits -> operator\n    uint256 private constant BYTES_PER_CONDITION = 2;\n    uint16 private constant OFFSET_PARENT = 8;\n    uint16 private constant OFFSET_PARAM_TYPE = 5;\n    uint16 private constant OFFSET_OPERATOR = 0;\n    uint16 private constant MASK_PARENT = uint16(0xff << OFFSET_PARENT);\n    uint16 private constant MASK_PARAM_TYPE = uint16(0x07 << OFFSET_PARAM_TYPE);\n    uint16 private constant MASK_OPERATOR = uint16(0x1f << OFFSET_OPERATOR);\n\n    function packedSize(\n        ConditionFlat[] memory conditions\n    ) internal pure returns (uint256 result) {\n        uint256 count = conditions.length;\n\n        result = count * BYTES_PER_CONDITION;\n        for (uint256 i; i < count; ++i) {\n            if (conditions[i].operator >= Operator.EqualTo) {\n                result += 32;\n            }\n        }\n    }\n\n    function packHeader(\n        uint256 count,\n        ExecutionOptions options,\n        address pointer\n    ) internal pure returns (bytes32) {\n        return\n            bytes32(count << OFFSET_COUNT) |\n            (bytes32(uint256(options)) << OFFSET_OPTIONS) |\n            bytes32(uint256(uint160(pointer)));\n    }\n\n    function packHeaderAsWildcarded(\n        ExecutionOptions options\n    ) internal pure returns (bytes32) {\n        return\n            bytes32(uint256(options) << OFFSET_OPTIONS) |\n            bytes32(MASK_IS_WILDCARDED);\n    }\n\n    function unpackHeader(\n        bytes32 header\n    ) internal pure returns (uint256 count, address pointer) {\n        count = (uint256(header) & MASK_COUNT) >> OFFSET_COUNT;\n        pointer = address(bytes20(uint160(uint256(header))));\n    }\n\n    function unpackOptions(\n        bytes32 header\n    ) internal pure returns (bool isWildcarded, ExecutionOptions options) {\n        isWildcarded = uint256(header) & MASK_IS_WILDCARDED != 0;\n        options = ExecutionOptions(\n            (uint256(header) & MASK_OPTIONS) >> OFFSET_OPTIONS\n        );\n    }\n\n    function packCondition(\n        bytes memory buffer,\n        uint256 index,\n        ConditionFlat memory condition\n    ) internal pure {\n        uint256 offset = index * BYTES_PER_CONDITION;\n        buffer[offset] = bytes1(condition.parent);\n        buffer[offset + 1] = bytes1(\n            (uint8(condition.paramType) << uint8(OFFSET_PARAM_TYPE)) |\n                uint8(condition.operator)\n        );\n    }\n\n    function packCompValue(\n        bytes memory buffer,\n        uint256 offset,\n        ConditionFlat memory condition\n    ) internal pure {\n        bytes32 word = condition.operator == Operator.EqualTo\n            ? keccak256(condition.compValue)\n            : bytes32(condition.compValue);\n\n        assembly {\n            mstore(add(buffer, offset), word)\n        }\n    }\n\n    function unpackBody(\n        bytes memory buffer,\n        uint256 count\n    )\n        internal\n        pure\n        returns (ConditionFlat[] memory result, bytes32[] memory compValues)\n    {\n        result = new ConditionFlat[](count);\n        compValues = new bytes32[](count);\n\n        bytes32 word;\n        uint256 offset = 32;\n        uint256 compValueOffset = 32 + count * BYTES_PER_CONDITION;\n\n        for (uint256 i; i < count; ) {\n            assembly {\n                word := mload(add(buffer, offset))\n            }\n            offset += BYTES_PER_CONDITION;\n\n            uint16 bits = uint16(bytes2(word));\n            ConditionFlat memory condition = result[i];\n            condition.parent = uint8((bits & MASK_PARENT) >> OFFSET_PARENT);\n            condition.paramType = ParameterType(\n                (bits & MASK_PARAM_TYPE) >> OFFSET_PARAM_TYPE\n            );\n            condition.operator = Operator(bits & MASK_OPERATOR);\n\n            if (condition.operator >= Operator.EqualTo) {\n                assembly {\n                    word := mload(add(buffer, compValueOffset))\n                }\n                compValueOffset += 32;\n                compValues[i] = word;\n            }\n            unchecked {\n                ++i;\n            }\n        }\n    }\n}\n"},{"file_path":"contracts/packers/Packer.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"@gnosis.pm/zodiac/contracts/core/Modifier.sol\";\n\nimport \"./BufferPacker.sol\";\n\n/**\n * @title Packer - a library that coordinates the process of packing\n * conditionsFlat into a storage optimized buffer.\n * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>\n */\nlibrary Packer {\n    function pack(\n        ConditionFlat[] memory conditionsFlat\n    ) external pure returns (bytes memory buffer) {\n        _removeExtraneousOffsets(conditionsFlat);\n\n        buffer = new bytes(BufferPacker.packedSize(conditionsFlat));\n\n        uint256 count = conditionsFlat.length;\n        uint256 offset = 32 + count * 2;\n        for (uint256 i; i < count; ++i) {\n            BufferPacker.packCondition(buffer, i, conditionsFlat[i]);\n            if (conditionsFlat[i].operator >= Operator.EqualTo) {\n                BufferPacker.packCompValue(buffer, offset, conditionsFlat[i]);\n                offset += 32;\n            }\n        }\n    }\n\n    /**\n     * @dev This function removes unnecessary offsets from compValue fields of\n     * the `conditions` array. Its purpose is to ensure a consistent API where\n     * every `compValue` provided for use in `Operations.EqualsTo` is obtained\n     * by calling `abi.encode` directly.\n     *\n     * By removing the leading extraneous offsets this function makes\n     * abi.encode(...) match the output produced by Decoder inspection.\n     * Without it, the encoded fields would need to be patched externally\n     * depending on whether the payload is fully encoded inline or not.\n     *\n     * @param conditionsFlat Array of ConditionFlat structs to remove extraneous\n     * offsets from\n     */\n    function _removeExtraneousOffsets(\n        ConditionFlat[] memory conditionsFlat\n    ) private pure {\n        uint256 count = conditionsFlat.length;\n        for (uint256 i; i < count; ++i) {\n            if (\n                conditionsFlat[i].operator == Operator.EqualTo &&\n                !_isInline(conditionsFlat, i)\n            ) {\n                bytes memory compValue = conditionsFlat[i].compValue;\n                uint256 length = compValue.length;\n                assembly {\n                    compValue := add(compValue, 32)\n                    mstore(compValue, sub(length, 32))\n                }\n                conditionsFlat[i].compValue = compValue;\n            }\n        }\n    }\n\n    function _isInline(\n        ConditionFlat[] memory conditions,\n        uint256 index\n    ) private pure returns (bool) {\n        ParameterType paramType = conditions[index].paramType;\n        if (paramType == ParameterType.Static) {\n            return true;\n        } else if (\n            paramType == ParameterType.Dynamic ||\n            paramType == ParameterType.Array ||\n            paramType == ParameterType.Calldata ||\n            paramType == ParameterType.AbiEncoded\n        ) {\n            return false;\n        } else {\n            uint256 length = conditions.length;\n\n            for (uint256 j = index + 1; j < length; ++j) {\n                uint8 parent = conditions[j].parent;\n                if (parent < index) {\n                    continue;\n                }\n\n                if (parent > index) {\n                    break;\n                }\n\n                if (!_isInline(conditions, j)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n    }\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_avatar","type":"address"},{"internalType":"address","name":"_target","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"AlreadyDisabledModule","type":"error"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"AlreadyEnabledModule","type":"error"},{"inputs":[],"name":"ArraysDifferentLength","type":"error"},{"inputs":[],"name":"CalldataOutOfBounds","type":"error"},{"inputs":[{"internalType":"enum PermissionChecker.Status","name":"status","type":"uint8"},{"internalType":"bytes32","name":"info","type":"bytes32"}],"name":"ConditionViolation","type":"error"},{"inputs":[],"name":"FunctionSignatureTooShort","type":"error"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"HashAlreadyConsumed","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"InvalidModule","type":"error"},{"inputs":[],"name":"InvalidPageSize","type":"error"},{"inputs":[],"name":"MalformedMultiEntrypoint","type":"error"},{"inputs":[],"name":"ModuleTransactionFailed","type":"error"},{"inputs":[],"name":"NoMembership","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"SetupModulesAlreadyCalled","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"indexed":false,"internalType":"address","name":"targetAddress","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"enum ExecutionOptions","name":"options","type":"uint8"}],"name":"AllowFunction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"indexed":false,"internalType":"address","name":"targetAddress","type":"address"},{"indexed":false,"internalType":"enum ExecutionOptions","name":"options","type":"uint8"}],"name":"AllowTarget","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"},{"indexed":false,"internalType":"bytes32[]","name":"roleKeys","type":"bytes32[]"},{"indexed":false,"internalType":"bool[]","name":"memberOf","type":"bool[]"}],"name":"AssignRoles","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousAvatar","type":"address"},{"indexed":true,"internalType":"address","name":"newAvatar","type":"address"}],"name":"AvatarSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"allowanceKey","type":"bytes32"},{"indexed":false,"internalType":"uint128","name":"consumed","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"newBalance","type":"uint128"}],"name":"ConsumeAllowance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"}],"name":"DisabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"}],"name":"EnabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"","type":"bytes32"}],"name":"HashExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"","type":"bytes32"}],"name":"HashInvalidated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"indexed":false,"internalType":"address","name":"targetAddress","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"RevokeFunction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"indexed":false,"internalType":"address","name":"targetAddress","type":"address"}],"name":"RevokeTarget","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"avatar","type":"address"},{"indexed":false,"internalType":"address","name":"target","type":"address"}],"name":"RolesModSetup","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"indexed":false,"internalType":"address","name":"targetAddress","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"components":[{"internalType":"uint8","name":"parent","type":"uint8"},{"internalType":"enum ParameterType","name":"paramType","type":"uint8"},{"internalType":"enum Operator","name":"operator","type":"uint8"},{"internalType":"bytes","name":"compValue","type":"bytes"}],"indexed":false,"internalType":"struct ConditionFlat[]","name":"conditions","type":"tuple[]"},{"indexed":false,"internalType":"enum ExecutionOptions","name":"options","type":"uint8"}],"name":"ScopeFunction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"indexed":false,"internalType":"address","name":"targetAddress","type":"address"}],"name":"ScopeTarget","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"allowanceKey","type":"bytes32"},{"indexed":false,"internalType":"uint128","name":"balance","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"maxRefill","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"refill","type":"uint128"},{"indexed":false,"internalType":"uint64","name":"period","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"timestamp","type":"uint64"}],"name":"SetAllowance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"module","type":"address"},{"indexed":false,"internalType":"bytes32","name":"defaultRoleKey","type":"bytes32"}],"name":"SetDefaultRole","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"contract ITransactionUnwrapper","name":"adapter","type":"address"}],"name":"SetUnwrapAdapter","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousTarget","type":"address"},{"indexed":true,"internalType":"address","name":"newTarget","type":"address"}],"name":"TargetSet","type":"event"},{"inputs":[{"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"internalType":"address","name":"targetAddress","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"enum ExecutionOptions","name":"options","type":"uint8"}],"name":"allowFunction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"internalType":"address","name":"targetAddress","type":"address"},{"internalType":"enum ExecutionOptions","name":"options","type":"uint8"}],"name":"allowTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"allowances","outputs":[{"internalType":"uint128","name":"refill","type":"uint128"},{"internalType":"uint128","name":"maxRefill","type":"uint128"},{"internalType":"uint64","name":"period","type":"uint64"},{"internalType":"uint128","name":"balance","type":"uint128"},{"internalType":"uint64","name":"timestamp","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"},{"internalType":"bytes32[]","name":"roleKeys","type":"bytes32[]"},{"internalType":"bool[]","name":"memberOf","type":"bool[]"}],"name":"assignRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"avatar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"consumed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"defaultRoles","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"prevModule","type":"address"},{"internalType":"address","name":"module","type":"address"}],"name":"disableModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"}],"name":"enableModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModule","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModuleReturnData","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"},{"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"internalType":"bool","name":"shouldRevert","type":"bool"}],"name":"execTransactionWithRole","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"},{"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"internalType":"bool","name":"shouldRevert","type":"bool"}],"name":"execTransactionWithRoleReturnData","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"start","type":"address"},{"internalType":"uint256","name":"pageSize","type":"uint256"}],"name":"getModulesPaginated","outputs":[{"internalType":"address[]","name":"array","type":"address[]"},{"internalType":"address","name":"next","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"}],"name":"invalidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_module","type":"address"}],"name":"isModuleEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"moduleTxHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"internalType":"address","name":"targetAddress","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"revokeFunction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"internalType":"address","name":"targetAddress","type":"address"}],"name":"revokeTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"internalType":"address","name":"targetAddress","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"},{"components":[{"internalType":"uint8","name":"parent","type":"uint8"},{"internalType":"enum ParameterType","name":"paramType","type":"uint8"},{"internalType":"enum Operator","name":"operator","type":"uint8"},{"internalType":"bytes","name":"compValue","type":"bytes"}],"internalType":"struct ConditionFlat[]","name":"conditions","type":"tuple[]"},{"internalType":"enum ExecutionOptions","name":"options","type":"uint8"}],"name":"scopeFunction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"internalType":"address","name":"targetAddress","type":"address"}],"name":"scopeTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint128","name":"balance","type":"uint128"},{"internalType":"uint128","name":"maxRefill","type":"uint128"},{"internalType":"uint128","name":"refill","type":"uint128"},{"internalType":"uint64","name":"period","type":"uint64"},{"internalType":"uint64","name":"timestamp","type":"uint64"}],"name":"setAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_avatar","type":"address"}],"name":"setAvatar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"},{"internalType":"bytes32","name":"roleKey","type":"bytes32"}],"name":"setDefaultRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"}],"name":"setTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"contract ITransactionUnwrapper","name":"adapter","type":"address"}],"name":"setTransactionUnwrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"initParams","type":"bytes"}],"name":"setUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"target","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"unwrappers","outputs":[{"internalType":"contract ITransactionUnwrapper","name":"","type":"address"}],"stateMutability":"view","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":"000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001"}