{"file_path":"EVMScriptRegistry.sol","creation_status":"success","source_code":"// File: contracts/common/UnstructuredStorage.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\nlibrary UnstructuredStorage {\r\n    function getStorageBool(bytes32 position) internal view returns (bool data) {\r\n        assembly { data := sload(position) }\r\n    }\r\n\r\n    function getStorageAddress(bytes32 position) internal view returns (address data) {\r\n        assembly { data := sload(position) }\r\n    }\r\n\r\n    function getStorageBytes32(bytes32 position) internal view returns (bytes32 data) {\r\n        assembly { data := sload(position) }\r\n    }\r\n\r\n    function getStorageUint256(bytes32 position) internal view returns (uint256 data) {\r\n        assembly { data := sload(position) }\r\n    }\r\n\r\n    function setStorageBool(bytes32 position, bool data) internal {\r\n        assembly { sstore(position, data) }\r\n    }\r\n\r\n    function setStorageAddress(bytes32 position, address data) internal {\r\n        assembly { sstore(position, data) }\r\n    }\r\n\r\n    function setStorageBytes32(bytes32 position, bytes32 data) internal {\r\n        assembly { sstore(position, data) }\r\n    }\r\n\r\n    function setStorageUint256(bytes32 position, uint256 data) internal {\r\n        assembly { sstore(position, data) }\r\n    }\r\n}\r\n\r\n// File: contracts/acl/IACL.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\ninterface IACL {\r\n    function initialize(address permissionsCreator) external;\r\n\r\n    // TODO: this should be external\r\n    // See https://github.com/ethereum/solidity/issues/4832\r\n    function hasPermission(address who, address where, bytes32 what, bytes how) public view returns (bool);\r\n}\r\n\r\n// File: contracts/common/IVaultRecoverable.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\ninterface IVaultRecoverable {\r\n    event RecoverToVault(address indexed vault, address indexed token, uint256 amount);\r\n\r\n    function transferToVault(address token) external;\r\n\r\n    function allowRecoverability(address token) external view returns (bool);\r\n    function getRecoveryVault() external view returns (address);\r\n}\r\n\r\n// File: contracts/kernel/IKernel.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n\r\ninterface IKernelEvents {\r\n    event SetApp(bytes32 indexed namespace, bytes32 indexed appId, address app);\r\n}\r\n\r\n\r\n// This should be an interface, but interfaces can't inherit yet :(\r\ncontract IKernel is IKernelEvents, IVaultRecoverable {\r\n    function acl() public view returns (IACL);\r\n    function hasPermission(address who, address where, bytes32 what, bytes how) public view returns (bool);\r\n\r\n    function setApp(bytes32 namespace, bytes32 appId, address app) public;\r\n    function getApp(bytes32 namespace, bytes32 appId) public view returns (address);\r\n}\r\n\r\n// File: contracts/apps/AppStorage.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n\r\ncontract AppStorage {\r\n    using UnstructuredStorage for bytes32;\r\n\r\n    /* Hardcoded constants to save gas\r\n    bytes32 internal constant KERNEL_POSITION = keccak256(\"aragonOS.appStorage.kernel\");\r\n    bytes32 internal constant APP_ID_POSITION = keccak256(\"aragonOS.appStorage.appId\");\r\n    */\r\n    bytes32 internal constant KERNEL_POSITION = 0x4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b;\r\n    bytes32 internal constant APP_ID_POSITION = 0xd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b;\r\n\r\n    function kernel() public view returns (IKernel) {\r\n        return IKernel(KERNEL_POSITION.getStorageAddress());\r\n    }\r\n\r\n    function appId() public view returns (bytes32) {\r\n        return APP_ID_POSITION.getStorageBytes32();\r\n    }\r\n\r\n    function setKernel(IKernel _kernel) internal {\r\n        KERNEL_POSITION.setStorageAddress(address(_kernel));\r\n    }\r\n\r\n    function setAppId(bytes32 _appId) internal {\r\n        APP_ID_POSITION.setStorageBytes32(_appId);\r\n    }\r\n}\r\n\r\n// File: contracts/acl/ACLSyntaxSugar.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\ncontract ACLSyntaxSugar {\r\n    function arr() internal pure returns (uint256[]) {\r\n        return new uint256[](0);\r\n    }\r\n\r\n    function arr(bytes32 _a) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a));\r\n    }\r\n\r\n    function arr(bytes32 _a, bytes32 _b) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a), uint256(_b));\r\n    }\r\n\r\n    function arr(address _a) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a));\r\n    }\r\n\r\n    function arr(address _a, address _b) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a), uint256(_b));\r\n    }\r\n\r\n    function arr(address _a, uint256 _b, uint256 _c) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a), _b, _c);\r\n    }\r\n\r\n    function arr(address _a, uint256 _b, uint256 _c, uint256 _d) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a), _b, _c, _d);\r\n    }\r\n\r\n    function arr(address _a, uint256 _b) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a), uint256(_b));\r\n    }\r\n\r\n    function arr(address _a, address _b, uint256 _c, uint256 _d, uint256 _e) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a), uint256(_b), _c, _d, _e);\r\n    }\r\n\r\n    function arr(address _a, address _b, address _c) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a), uint256(_b), uint256(_c));\r\n    }\r\n\r\n    function arr(address _a, address _b, uint256 _c) internal pure returns (uint256[] r) {\r\n        return arr(uint256(_a), uint256(_b), uint256(_c));\r\n    }\r\n\r\n    function arr(uint256 _a) internal pure returns (uint256[] r) {\r\n        r = new uint256[](1);\r\n        r[0] = _a;\r\n    }\r\n\r\n    function arr(uint256 _a, uint256 _b) internal pure returns (uint256[] r) {\r\n        r = new uint256[](2);\r\n        r[0] = _a;\r\n        r[1] = _b;\r\n    }\r\n\r\n    function arr(uint256 _a, uint256 _b, uint256 _c) internal pure returns (uint256[] r) {\r\n        r = new uint256[](3);\r\n        r[0] = _a;\r\n        r[1] = _b;\r\n        r[2] = _c;\r\n    }\r\n\r\n    function arr(uint256 _a, uint256 _b, uint256 _c, uint256 _d) internal pure returns (uint256[] r) {\r\n        r = new uint256[](4);\r\n        r[0] = _a;\r\n        r[1] = _b;\r\n        r[2] = _c;\r\n        r[3] = _d;\r\n    }\r\n\r\n    function arr(uint256 _a, uint256 _b, uint256 _c, uint256 _d, uint256 _e) internal pure returns (uint256[] r) {\r\n        r = new uint256[](5);\r\n        r[0] = _a;\r\n        r[1] = _b;\r\n        r[2] = _c;\r\n        r[3] = _d;\r\n        r[4] = _e;\r\n    }\r\n}\r\n\r\n\r\ncontract ACLHelpers {\r\n    function decodeParamOp(uint256 _x) internal pure returns (uint8 b) {\r\n        return uint8(_x >> (8 * 30));\r\n    }\r\n\r\n    function decodeParamId(uint256 _x) internal pure returns (uint8 b) {\r\n        return uint8(_x >> (8 * 31));\r\n    }\r\n\r\n    function decodeParamsList(uint256 _x) internal pure returns (uint32 a, uint32 b, uint32 c) {\r\n        a = uint32(_x);\r\n        b = uint32(_x >> (8 * 4));\r\n        c = uint32(_x >> (8 * 8));\r\n    }\r\n}\r\n\r\n// File: contracts/common/Uint256Helpers.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\nlibrary Uint256Helpers {\r\n    uint256 private constant MAX_UINT64 = uint64(-1);\r\n\r\n    string private constant ERROR_NUMBER_TOO_BIG = \"UINT64_NUMBER_TOO_BIG\";\r\n\r\n    function toUint64(uint256 a) internal pure returns (uint64) {\r\n        require(a <= MAX_UINT64, ERROR_NUMBER_TOO_BIG);\r\n        return uint64(a);\r\n    }\r\n}\r\n\r\n// File: contracts/common/TimeHelpers.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\ncontract TimeHelpers {\r\n    using Uint256Helpers for uint256;\r\n\r\n    /**\r\n    * @dev Returns the current block number.\r\n    *      Using a function rather than `block.number` allows us to easily mock the block number in\r\n    *      tests.\r\n    */\r\n    function getBlockNumber() internal view returns (uint256) {\r\n        return block.number;\r\n    }\r\n\r\n    /**\r\n    * @dev Returns the current block number, converted to uint64.\r\n    *      Using a function rather than `block.number` allows us to easily mock the block number in\r\n    *      tests.\r\n    */\r\n    function getBlockNumber64() internal view returns (uint64) {\r\n        return getBlockNumber().toUint64();\r\n    }\r\n\r\n    /**\r\n    * @dev Returns the current timestamp.\r\n    *      Using a function rather than `block.timestamp` allows us to easily mock it in\r\n    *      tests.\r\n    */\r\n    function getTimestamp() internal view returns (uint256) {\r\n        return block.timestamp; // solium-disable-line security/no-block-members\r\n    }\r\n\r\n    /**\r\n    * @dev Returns the current timestamp, converted to uint64.\r\n    *      Using a function rather than `block.timestamp` allows us to easily mock it in\r\n    *      tests.\r\n    */\r\n    function getTimestamp64() internal view returns (uint64) {\r\n        return getTimestamp().toUint64();\r\n    }\r\n}\r\n\r\n// File: contracts/common/Initializable.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n\r\ncontract Initializable is TimeHelpers {\r\n    using UnstructuredStorage for bytes32;\r\n\r\n    // keccak256(\"aragonOS.initializable.initializationBlock\")\r\n    bytes32 internal constant INITIALIZATION_BLOCK_POSITION = 0xebb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e;\r\n\r\n    string private constant ERROR_ALREADY_INITIALIZED = \"INIT_ALREADY_INITIALIZED\";\r\n    string private constant ERROR_NOT_INITIALIZED = \"INIT_NOT_INITIALIZED\";\r\n\r\n    modifier onlyInit {\r\n        require(getInitializationBlock() == 0, ERROR_ALREADY_INITIALIZED);\r\n        _;\r\n    }\r\n\r\n    modifier isInitialized {\r\n        require(hasInitialized(), ERROR_NOT_INITIALIZED);\r\n        _;\r\n    }\r\n\r\n    /**\r\n    * @return Block number in which the contract was initialized\r\n    */\r\n    function getInitializationBlock() public view returns (uint256) {\r\n        return INITIALIZATION_BLOCK_POSITION.getStorageUint256();\r\n    }\r\n\r\n    /**\r\n    * @return Whether the contract has been initialized by the time of the current block\r\n    */\r\n    function hasInitialized() public view returns (bool) {\r\n        uint256 initializationBlock = getInitializationBlock();\r\n        return initializationBlock != 0 && getBlockNumber() >= initializationBlock;\r\n    }\r\n\r\n    /**\r\n    * @dev Function to be called by top level contract after initialization has finished.\r\n    */\r\n    function initialized() internal onlyInit {\r\n        INITIALIZATION_BLOCK_POSITION.setStorageUint256(getBlockNumber());\r\n    }\r\n\r\n    /**\r\n    * @dev Function to be called by top level contract after initialization to enable the contract\r\n    *      at a future block number rather than immediately.\r\n    */\r\n    function initializedAt(uint256 _blockNumber) internal onlyInit {\r\n        INITIALIZATION_BLOCK_POSITION.setStorageUint256(_blockNumber);\r\n    }\r\n}\r\n\r\n// File: contracts/common/Petrifiable.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\ncontract Petrifiable is Initializable {\r\n    // Use block UINT256_MAX (which should be never) as the initializable date\r\n    uint256 internal constant PETRIFIED_BLOCK = uint256(-1);\r\n\r\n    function isPetrified() public view returns (bool) {\r\n        return getInitializationBlock() == PETRIFIED_BLOCK;\r\n    }\r\n\r\n    /**\r\n    * @dev Function to be called by top level contract to prevent being initialized.\r\n    *      Useful for freezing base contracts when they're used behind proxies.\r\n    */\r\n    function petrify() internal onlyInit {\r\n        initializedAt(PETRIFIED_BLOCK);\r\n    }\r\n}\r\n\r\n// File: contracts/common/Autopetrified.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\ncontract Autopetrified is Petrifiable {\r\n    constructor() public {\r\n        // Immediately petrify base (non-proxy) instances of inherited contracts on deploy.\r\n        // This renders them uninitializable (and unusable without a proxy).\r\n        petrify();\r\n    }\r\n}\r\n\r\n// File: contracts/common/ConversionHelpers.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\nlibrary ConversionHelpers {\r\n    string private constant ERROR_IMPROPER_LENGTH = \"CONVERSION_IMPROPER_LENGTH\";\r\n\r\n    function dangerouslyCastUintArrayToBytes(uint256[] memory _input) internal pure returns (bytes memory output) {\r\n        // Force cast the uint256[] into a bytes array, by overwriting its length\r\n        // Note that the bytes array doesn't need to be initialized as we immediately overwrite it\r\n        // with the input and a new length. The input becomes invalid from this point forward.\r\n        uint256 byteLength = _input.length * 32;\r\n        assembly {\r\n            output := _input\r\n            mstore(output, byteLength)\r\n        }\r\n    }\r\n\r\n    function dangerouslyCastBytesToUintArray(bytes memory _input) internal pure returns (uint256[] memory output) {\r\n        // Force cast the bytes array into a uint256[], by overwriting its length\r\n        // Note that the uint256[] doesn't need to be initialized as we immediately overwrite it\r\n        // with the input and a new length. The input becomes invalid from this point forward.\r\n        uint256 intsLength = _input.length / 32;\r\n        require(_input.length == intsLength * 32, ERROR_IMPROPER_LENGTH);\r\n\r\n        assembly {\r\n            output := _input\r\n            mstore(output, intsLength)\r\n        }\r\n    }\r\n}\r\n\r\n// File: contracts/common/ReentrancyGuard.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\ncontract ReentrancyGuard {\r\n    using UnstructuredStorage for bytes32;\r\n\r\n    /* Hardcoded constants to save gas\r\n    bytes32 internal constant REENTRANCY_MUTEX_POSITION = keccak256(\"aragonOS.reentrancyGuard.mutex\");\r\n    */\r\n    bytes32 private constant REENTRANCY_MUTEX_POSITION = 0xe855346402235fdd185c890e68d2c4ecad599b88587635ee285bce2fda58dacb;\r\n\r\n    string private constant ERROR_REENTRANT = \"REENTRANCY_REENTRANT_CALL\";\r\n\r\n    modifier nonReentrant() {\r\n        // Ensure mutex is unlocked\r\n        require(!REENTRANCY_MUTEX_POSITION.getStorageBool(), ERROR_REENTRANT);\r\n\r\n        // Lock mutex before function call\r\n        REENTRANCY_MUTEX_POSITION.setStorageBool(true);\r\n\r\n        // Perform function call\r\n        _;\r\n\r\n        // Unlock mutex after function call\r\n        REENTRANCY_MUTEX_POSITION.setStorageBool(false);\r\n    }\r\n}\r\n\r\n// File: contracts/lib/token/ERC20.sol\r\n\r\n// See https://github.com/OpenZeppelin/openzeppelin-solidity/blob/a9f910d34f0ab33a1ae5e714f69f9596a02b4d91/contracts/token/ERC20/ERC20.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n/**\r\n * @title ERC20 interface\r\n * @dev see https://github.com/ethereum/EIPs/issues/20\r\n */\r\ncontract ERC20 {\r\n    function totalSupply() public view returns (uint256);\r\n\r\n    function balanceOf(address _who) public view returns (uint256);\r\n\r\n    function allowance(address _owner, address _spender)\r\n        public view returns (uint256);\r\n\r\n    function transfer(address _to, uint256 _value) public returns (bool);\r\n\r\n    function approve(address _spender, uint256 _value)\r\n        public returns (bool);\r\n\r\n    function transferFrom(address _from, address _to, uint256 _value)\r\n        public returns (bool);\r\n\r\n    event Transfer(\r\n        address indexed from,\r\n        address indexed to,\r\n        uint256 value\r\n    );\r\n\r\n    event Approval(\r\n        address indexed owner,\r\n        address indexed spender,\r\n        uint256 value\r\n    );\r\n}\r\n\r\n// File: contracts/common/EtherTokenConstant.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n// aragonOS and aragon-apps rely on address(0) to denote native ETH, in\r\n// contracts where both tokens and ETH are accepted\r\ncontract EtherTokenConstant {\r\n    address internal constant ETH = address(0);\r\n}\r\n\r\n// File: contracts/common/IsContract.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\ncontract IsContract {\r\n    /*\r\n    * NOTE: this should NEVER be used for authentication\r\n    * (see pitfalls: https://github.com/fergarrui/ethereum-security/tree/master/contracts/extcodesize).\r\n    *\r\n    * This is only intended to be used as a sanity check that an address is actually a contract,\r\n    * RATHER THAN an address not being a contract.\r\n    */\r\n    function isContract(address _target) internal view returns (bool) {\r\n        if (_target == address(0)) {\r\n            return false;\r\n        }\r\n\r\n        uint256 size;\r\n        assembly { size := extcodesize(_target) }\r\n        return size > 0;\r\n    }\r\n}\r\n\r\n// File: contracts/common/SafeERC20.sol\r\n\r\n// Inspired by AdEx (https://github.com/AdExNetwork/adex-protocol-eth/blob/b9df617829661a7518ee10f4cb6c4108659dd6d5/contracts/libs/SafeERC20.sol)\r\n// and 0x (https://github.com/0xProject/0x-monorepo/blob/737d1dc54d72872e24abce5a1dbe1b66d35fa21a/contracts/protocol/contracts/protocol/AssetProxy/ERC20Proxy.sol#L143)\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\nlibrary SafeERC20 {\r\n    // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`:\r\n    // https://github.com/ethereum/solidity/issues/3544\r\n    bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb;\r\n\r\n    string private constant ERROR_TOKEN_BALANCE_REVERTED = \"SAFE_ERC_20_BALANCE_REVERTED\";\r\n    string private constant ERROR_TOKEN_ALLOWANCE_REVERTED = \"SAFE_ERC_20_ALLOWANCE_REVERTED\";\r\n\r\n    function invokeAndCheckSuccess(address _addr, bytes memory _calldata)\r\n        private\r\n        returns (bool)\r\n    {\r\n        bool ret;\r\n        assembly {\r\n            let ptr := mload(0x40)    // free memory pointer\r\n\r\n            let success := call(\r\n                gas,                  // forward all gas\r\n                _addr,                // address\r\n                0,                    // no value\r\n                add(_calldata, 0x20), // calldata start\r\n                mload(_calldata),     // calldata length\r\n                ptr,                  // write output over free memory\r\n                0x20                  // uint256 return\r\n            )\r\n\r\n            if gt(success, 0) {\r\n                // Check number of bytes returned from last function call\r\n                switch returndatasize\r\n\r\n                // No bytes returned: assume success\r\n                case 0 {\r\n                    ret := 1\r\n                }\r\n\r\n                // 32 bytes returned: check if non-zero\r\n                case 0x20 {\r\n                    // Only return success if returned data was true\r\n                    // Already have output in ptr\r\n                    ret := eq(mload(ptr), 1)\r\n                }\r\n\r\n                // Not sure what was returned: don't mark as success\r\n                default { }\r\n            }\r\n        }\r\n        return ret;\r\n    }\r\n\r\n    function staticInvoke(address _addr, bytes memory _calldata)\r\n        private\r\n        view\r\n        returns (bool, uint256)\r\n    {\r\n        bool success;\r\n        uint256 ret;\r\n        assembly {\r\n            let ptr := mload(0x40)    // free memory pointer\r\n\r\n            success := staticcall(\r\n                gas,                  // forward all gas\r\n                _addr,                // address\r\n                add(_calldata, 0x20), // calldata start\r\n                mload(_calldata),     // calldata length\r\n                ptr,                  // write output over free memory\r\n                0x20                  // uint256 return\r\n            )\r\n\r\n            if gt(success, 0) {\r\n                ret := mload(ptr)\r\n            }\r\n        }\r\n        return (success, ret);\r\n    }\r\n\r\n    /**\r\n    * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\r\n    *      Note that this makes an external call to the token.\r\n    */\r\n    function safeTransfer(ERC20 _token, address _to, uint256 _amount) internal returns (bool) {\r\n        bytes memory transferCallData = abi.encodeWithSelector(\r\n            TRANSFER_SELECTOR,\r\n            _to,\r\n            _amount\r\n        );\r\n        return invokeAndCheckSuccess(_token, transferCallData);\r\n    }\r\n\r\n    /**\r\n    * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\r\n    *      Note that this makes an external call to the token.\r\n    */\r\n    function safeTransferFrom(ERC20 _token, address _from, address _to, uint256 _amount) internal returns (bool) {\r\n        bytes memory transferFromCallData = abi.encodeWithSelector(\r\n            _token.transferFrom.selector,\r\n            _from,\r\n            _to,\r\n            _amount\r\n        );\r\n        return invokeAndCheckSuccess(_token, transferFromCallData);\r\n    }\r\n\r\n    /**\r\n    * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\r\n    *      Note that this makes an external call to the token.\r\n    */\r\n    function safeApprove(ERC20 _token, address _spender, uint256 _amount) internal returns (bool) {\r\n        bytes memory approveCallData = abi.encodeWithSelector(\r\n            _token.approve.selector,\r\n            _spender,\r\n            _amount\r\n        );\r\n        return invokeAndCheckSuccess(_token, approveCallData);\r\n    }\r\n\r\n    /**\r\n    * @dev Static call into ERC20.balanceOf().\r\n    * Reverts if the call fails for some reason (should never fail).\r\n    */\r\n    function staticBalanceOf(ERC20 _token, address _owner) internal view returns (uint256) {\r\n        bytes memory balanceOfCallData = abi.encodeWithSelector(\r\n            _token.balanceOf.selector,\r\n            _owner\r\n        );\r\n\r\n        (bool success, uint256 tokenBalance) = staticInvoke(_token, balanceOfCallData);\r\n        require(success, ERROR_TOKEN_BALANCE_REVERTED);\r\n\r\n        return tokenBalance;\r\n    }\r\n\r\n    /**\r\n    * @dev Static call into ERC20.allowance().\r\n    * Reverts if the call fails for some reason (should never fail).\r\n    */\r\n    function staticAllowance(ERC20 _token, address _owner, address _spender) internal view returns (uint256) {\r\n        bytes memory allowanceCallData = abi.encodeWithSelector(\r\n            _token.allowance.selector,\r\n            _owner,\r\n            _spender\r\n        );\r\n\r\n        (bool success, uint256 allowance) = staticInvoke(_token, allowanceCallData);\r\n        require(success, ERROR_TOKEN_ALLOWANCE_REVERTED);\r\n\r\n        return allowance;\r\n    }\r\n\r\n    /**\r\n    * @dev Static call into ERC20.totalSupply().\r\n    * Reverts if the call fails for some reason (should never fail).\r\n    */\r\n    function staticTotalSupply(ERC20 _token) internal view returns (uint256) {\r\n        bytes memory totalSupplyCallData = abi.encodeWithSelector(_token.totalSupply.selector);\r\n\r\n        (bool success, uint256 totalSupply) = staticInvoke(_token, totalSupplyCallData);\r\n        require(success, ERROR_TOKEN_ALLOWANCE_REVERTED);\r\n\r\n        return totalSupply;\r\n    }\r\n}\r\n\r\n// File: contracts/common/VaultRecoverable.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\ncontract VaultRecoverable is IVaultRecoverable, EtherTokenConstant, IsContract {\r\n    using SafeERC20 for ERC20;\r\n\r\n    string private constant ERROR_DISALLOWED = \"RECOVER_DISALLOWED\";\r\n    string private constant ERROR_VAULT_NOT_CONTRACT = \"RECOVER_VAULT_NOT_CONTRACT\";\r\n    string private constant ERROR_TOKEN_TRANSFER_FAILED = \"RECOVER_TOKEN_TRANSFER_FAILED\";\r\n\r\n    /**\r\n     * @notice Send funds to recovery Vault. This contract should never receive funds,\r\n     *         but in case it does, this function allows one to recover them.\r\n     * @param _token Token balance to be sent to recovery vault.\r\n     */\r\n    function transferToVault(address _token) external {\r\n        require(allowRecoverability(_token), ERROR_DISALLOWED);\r\n        address vault = getRecoveryVault();\r\n        require(isContract(vault), ERROR_VAULT_NOT_CONTRACT);\r\n\r\n        uint256 balance;\r\n        if (_token == ETH) {\r\n            balance = address(this).balance;\r\n            vault.transfer(balance);\r\n        } else {\r\n            ERC20 token = ERC20(_token);\r\n            balance = token.staticBalanceOf(this);\r\n            require(token.safeTransfer(vault, balance), ERROR_TOKEN_TRANSFER_FAILED);\r\n        }\r\n\r\n        emit RecoverToVault(vault, _token, balance);\r\n    }\r\n\r\n    /**\r\n    * @dev By default deriving from AragonApp makes it recoverable\r\n    * @param token Token address that would be recovered\r\n    * @return bool whether the app allows the recovery\r\n    */\r\n    function allowRecoverability(address token) public view returns (bool) {\r\n        return true;\r\n    }\r\n\r\n    // Cast non-implemented interface to be public so we can use it internally\r\n    function getRecoveryVault() public view returns (address);\r\n}\r\n\r\n// File: contracts/evmscript/IEVMScriptExecutor.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\ninterface IEVMScriptExecutor {\r\n    function execScript(bytes script, bytes input, address[] blacklist) external returns (bytes);\r\n    function executorType() external pure returns (bytes32);\r\n}\r\n\r\n// File: contracts/evmscript/IEVMScriptRegistry.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\ncontract EVMScriptRegistryConstants {\r\n    /* Hardcoded constants to save gas\r\n    bytes32 internal constant EVMSCRIPT_REGISTRY_APP_ID = apmNamehash(\"evmreg\");\r\n    */\r\n    bytes32 internal constant EVMSCRIPT_REGISTRY_APP_ID = 0xddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd61;\r\n}\r\n\r\n\r\ninterface IEVMScriptRegistry {\r\n    function addScriptExecutor(IEVMScriptExecutor executor) external returns (uint id);\r\n    function disableScriptExecutor(uint256 executorId) external;\r\n\r\n    // TODO: this should be external\r\n    // See https://github.com/ethereum/solidity/issues/4832\r\n    function getScriptExecutor(bytes script) public view returns (IEVMScriptExecutor);\r\n}\r\n\r\n// File: contracts/kernel/KernelConstants.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\ncontract KernelAppIds {\r\n    /* Hardcoded constants to save gas\r\n    bytes32 internal constant KERNEL_CORE_APP_ID = apmNamehash(\"kernel\");\r\n    bytes32 internal constant KERNEL_DEFAULT_ACL_APP_ID = apmNamehash(\"acl\");\r\n    bytes32 internal constant KERNEL_DEFAULT_VAULT_APP_ID = apmNamehash(\"vault\");\r\n    */\r\n    bytes32 internal constant KERNEL_CORE_APP_ID = 0x3b4bf6bf3ad5000ecf0f989d5befde585c6860fea3e574a4fab4c49d1c177d9c;\r\n    bytes32 internal constant KERNEL_DEFAULT_ACL_APP_ID = 0xe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a;\r\n    bytes32 internal constant KERNEL_DEFAULT_VAULT_APP_ID = 0x7e852e0fcfce6551c13800f1e7476f982525c2b5277ba14b24339c68416336d1;\r\n}\r\n\r\n\r\ncontract KernelNamespaceConstants {\r\n    /* Hardcoded constants to save gas\r\n    bytes32 internal constant KERNEL_CORE_NAMESPACE = keccak256(\"core\");\r\n    bytes32 internal constant KERNEL_APP_BASES_NAMESPACE = keccak256(\"base\");\r\n    bytes32 internal constant KERNEL_APP_ADDR_NAMESPACE = keccak256(\"app\");\r\n    */\r\n    bytes32 internal constant KERNEL_CORE_NAMESPACE = 0xc681a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8;\r\n    bytes32 internal constant KERNEL_APP_BASES_NAMESPACE = 0xf1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f;\r\n    bytes32 internal constant KERNEL_APP_ADDR_NAMESPACE = 0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb;\r\n}\r\n\r\n// File: contracts/evmscript/EVMScriptRunner.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\ncontract EVMScriptRunner is AppStorage, Initializable, EVMScriptRegistryConstants, KernelNamespaceConstants {\r\n    string private constant ERROR_EXECUTOR_UNAVAILABLE = \"EVMRUN_EXECUTOR_UNAVAILABLE\";\r\n    string private constant ERROR_PROTECTED_STATE_MODIFIED = \"EVMRUN_PROTECTED_STATE_MODIFIED\";\r\n\r\n    /* This is manually crafted in assembly\r\n    string private constant ERROR_EXECUTOR_INVALID_RETURN = \"EVMRUN_EXECUTOR_INVALID_RETURN\";\r\n    */\r\n\r\n    event ScriptResult(address indexed executor, bytes script, bytes input, bytes returnData);\r\n\r\n    function getEVMScriptExecutor(bytes _script) public view returns (IEVMScriptExecutor) {\r\n        return IEVMScriptExecutor(getEVMScriptRegistry().getScriptExecutor(_script));\r\n    }\r\n\r\n    function getEVMScriptRegistry() public view returns (IEVMScriptRegistry) {\r\n        address registryAddr = kernel().getApp(KERNEL_APP_ADDR_NAMESPACE, EVMSCRIPT_REGISTRY_APP_ID);\r\n        return IEVMScriptRegistry(registryAddr);\r\n    }\r\n\r\n    function runScript(bytes _script, bytes _input, address[] _blacklist)\r\n        internal\r\n        isInitialized\r\n        protectState\r\n        returns (bytes)\r\n    {\r\n        IEVMScriptExecutor executor = getEVMScriptExecutor(_script);\r\n        require(address(executor) != address(0), ERROR_EXECUTOR_UNAVAILABLE);\r\n\r\n        bytes4 sig = executor.execScript.selector;\r\n        bytes memory data = abi.encodeWithSelector(sig, _script, _input, _blacklist);\r\n\r\n        bytes memory output;\r\n        assembly {\r\n            let success := delegatecall(\r\n                gas,                // forward all gas\r\n                executor,           // address\r\n                add(data, 0x20),    // calldata start\r\n                mload(data),        // calldata length\r\n                0,                  // don't write output (we'll handle this ourselves)\r\n                0                   // don't write output\r\n            )\r\n\r\n            output := mload(0x40) // free mem ptr get\r\n\r\n            switch success\r\n            case 0 {\r\n                // If the call errored, forward its full error data\r\n                returndatacopy(output, 0, returndatasize)\r\n                revert(output, returndatasize)\r\n            }\r\n            default {\r\n                switch gt(returndatasize, 0x3f)\r\n                case 0 {\r\n                    // Need at least 0x40 bytes returned for properly ABI-encoded bytes values,\r\n                    // revert with \"EVMRUN_EXECUTOR_INVALID_RETURN\"\r\n                    // See remix: doing a `revert(\"EVMRUN_EXECUTOR_INVALID_RETURN\")` always results in\r\n                    // this memory layout\r\n                    mstore(output, 0x08c379a000000000000000000000000000000000000000000000000000000000)         // error identifier\r\n                    mstore(add(output, 0x04), 0x0000000000000000000000000000000000000000000000000000000000000020) // starting offset\r\n                    mstore(add(output, 0x24), 0x000000000000000000000000000000000000000000000000000000000000001e) // reason length\r\n                    mstore(add(output, 0x44), 0x45564d52554e5f4558454355544f525f494e56414c49445f52455455524e0000) // reason\r\n\r\n                    revert(output, 100) // 100 = 4 + 3 * 32 (error identifier + 3 words for the ABI encoded error)\r\n                }\r\n                default {\r\n                    // Copy result\r\n                    //\r\n                    // Needs to perform an ABI decode for the expected `bytes` return type of\r\n                    // `executor.execScript()` as solidity will automatically ABI encode the returned bytes as:\r\n                    //    [ position of the first dynamic length return value = 0x20 (32 bytes) ]\r\n                    //    [ output length (32 bytes) ]\r\n                    //    [ output content (N bytes) ]\r\n                    //\r\n                    // Perform the ABI decode by ignoring the first 32 bytes of the return data\r\n                    let copysize := sub(returndatasize, 0x20)\r\n                    returndatacopy(output, 0x20, copysize)\r\n\r\n                    mstore(0x40, add(output, copysize)) // free mem ptr set\r\n                }\r\n            }\r\n        }\r\n\r\n        emit ScriptResult(address(executor), _script, _input, output);\r\n\r\n        return output;\r\n    }\r\n\r\n    modifier protectState {\r\n        address preKernel = address(kernel());\r\n        bytes32 preAppId = appId();\r\n        _; // exec\r\n        require(address(kernel()) == preKernel, ERROR_PROTECTED_STATE_MODIFIED);\r\n        require(appId() == preAppId, ERROR_PROTECTED_STATE_MODIFIED);\r\n    }\r\n}\r\n\r\n// File: contracts/apps/AragonApp.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// Contracts inheriting from AragonApp are, by default, immediately petrified upon deployment so\r\n// that they can never be initialized.\r\n// Unless overriden, this behaviour enforces those contracts to be usable only behind an AppProxy.\r\n// ReentrancyGuard, EVMScriptRunner, and ACLSyntaxSugar are not directly used by this contract, but\r\n// are included so that they are automatically usable by subclassing contracts\r\ncontract AragonApp is AppStorage, Autopetrified, VaultRecoverable, ReentrancyGuard, EVMScriptRunner, ACLSyntaxSugar {\r\n    string private constant ERROR_AUTH_FAILED = \"APP_AUTH_FAILED\";\r\n\r\n    modifier auth(bytes32 _role) {\r\n        require(canPerform(msg.sender, _role, new uint256[](0)), ERROR_AUTH_FAILED);\r\n        _;\r\n    }\r\n\r\n    modifier authP(bytes32 _role, uint256[] _params) {\r\n        require(canPerform(msg.sender, _role, _params), ERROR_AUTH_FAILED);\r\n        _;\r\n    }\r\n\r\n    /**\r\n    * @dev Check whether an action can be performed by a sender for a particular role on this app\r\n    * @param _sender Sender of the call\r\n    * @param _role Role on this app\r\n    * @param _params Permission params for the role\r\n    * @return Boolean indicating whether the sender has the permissions to perform the action.\r\n    *         Always returns false if the app hasn't been initialized yet.\r\n    */\r\n    function canPerform(address _sender, bytes32 _role, uint256[] _params) public view returns (bool) {\r\n        if (!hasInitialized()) {\r\n            return false;\r\n        }\r\n\r\n        IKernel linkedKernel = kernel();\r\n        if (address(linkedKernel) == address(0)) {\r\n            return false;\r\n        }\r\n\r\n        return linkedKernel.hasPermission(\r\n            _sender,\r\n            address(this),\r\n            _role,\r\n            ConversionHelpers.dangerouslyCastUintArrayToBytes(_params)\r\n        );\r\n    }\r\n\r\n    /**\r\n    * @dev Get the recovery vault for the app\r\n    * @return Recovery vault address for the app\r\n    */\r\n    function getRecoveryVault() public view returns (address) {\r\n        // Funds recovery via a vault is only available when used with a kernel\r\n        return kernel().getRecoveryVault(); // if kernel is not set, it will revert\r\n    }\r\n}\r\n\r\n// File: contracts/evmscript/ScriptHelpers.sol\r\n\r\n/*\r\n * SPDX-License-Identitifer:    MIT\r\n */\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\nlibrary ScriptHelpers {\r\n    function getSpecId(bytes _script) internal pure returns (uint32) {\r\n        return uint32At(_script, 0);\r\n    }\r\n\r\n    function uint256At(bytes _data, uint256 _location) internal pure returns (uint256 result) {\r\n        assembly {\r\n            result := mload(add(_data, add(0x20, _location)))\r\n        }\r\n    }\r\n\r\n    function addressAt(bytes _data, uint256 _location) internal pure returns (address result) {\r\n        uint256 word = uint256At(_data, _location);\r\n\r\n        assembly {\r\n            result := div(and(word, 0xffffffffffffffffffffffffffffffffffffffff000000000000000000000000),\r\n            0x1000000000000000000000000)\r\n        }\r\n    }\r\n\r\n    function uint32At(bytes _data, uint256 _location) internal pure returns (uint32 result) {\r\n        uint256 word = uint256At(_data, _location);\r\n\r\n        assembly {\r\n            result := div(and(word, 0xffffffff00000000000000000000000000000000000000000000000000000000),\r\n            0x100000000000000000000000000000000000000000000000000000000)\r\n        }\r\n    }\r\n\r\n    function locationOf(bytes _data, uint256 _location) internal pure returns (uint256 result) {\r\n        assembly {\r\n            result := add(_data, add(0x20, _location))\r\n        }\r\n    }\r\n\r\n    function toBytes(bytes4 _sig) internal pure returns (bytes) {\r\n        bytes memory payload = new bytes(4);\r\n        assembly { mstore(add(payload, 0x20), _sig) }\r\n        return payload;\r\n    }\r\n}\r\n\r\n// File: contracts/evmscript/EVMScriptRegistry.sol\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n\r\n/* solium-disable function-order */\r\n// Allow public initialize() to be first\r\ncontract EVMScriptRegistry is IEVMScriptRegistry, EVMScriptRegistryConstants, AragonApp {\r\n    using ScriptHelpers for bytes;\r\n\r\n    /* Hardcoded constants to save gas\r\n    bytes32 public constant REGISTRY_ADD_EXECUTOR_ROLE = keccak256(\"REGISTRY_ADD_EXECUTOR_ROLE\");\r\n    bytes32 public constant REGISTRY_MANAGER_ROLE = keccak256(\"REGISTRY_MANAGER_ROLE\");\r\n    */\r\n    bytes32 public constant REGISTRY_ADD_EXECUTOR_ROLE = 0xc4e90f38eea8c4212a009ca7b8947943ba4d4a58d19b683417f65291d1cd9ed2;\r\n    // WARN: Manager can censor all votes and the like happening in an org\r\n    bytes32 public constant REGISTRY_MANAGER_ROLE = 0xf7a450ef335e1892cb42c8ca72e7242359d7711924b75db5717410da3f614aa3;\r\n\r\n    uint256 internal constant SCRIPT_START_LOCATION = 4;\r\n\r\n    string private constant ERROR_INEXISTENT_EXECUTOR = \"EVMREG_INEXISTENT_EXECUTOR\";\r\n    string private constant ERROR_EXECUTOR_ENABLED = \"EVMREG_EXECUTOR_ENABLED\";\r\n    string private constant ERROR_EXECUTOR_DISABLED = \"EVMREG_EXECUTOR_DISABLED\";\r\n    string private constant ERROR_SCRIPT_LENGTH_TOO_SHORT = \"EVMREG_SCRIPT_LENGTH_TOO_SHORT\";\r\n\r\n    struct ExecutorEntry {\r\n        IEVMScriptExecutor executor;\r\n        bool enabled;\r\n    }\r\n\r\n    uint256 private executorsNextIndex;\r\n    mapping (uint256 => ExecutorEntry) public executors;\r\n\r\n    event EnableExecutor(uint256 indexed executorId, address indexed executorAddress);\r\n    event DisableExecutor(uint256 indexed executorId, address indexed executorAddress);\r\n\r\n    modifier executorExists(uint256 _executorId) {\r\n        require(_executorId > 0 && _executorId < executorsNextIndex, ERROR_INEXISTENT_EXECUTOR);\r\n        _;\r\n    }\r\n\r\n    /**\r\n    * @notice Initialize the registry\r\n    */\r\n    function initialize() public onlyInit {\r\n        initialized();\r\n        // Create empty record to begin executor IDs at 1\r\n        executorsNextIndex = 1;\r\n    }\r\n\r\n    /**\r\n    * @notice Add a new script executor with address `_executor` to the registry\r\n    * @param _executor Address of the IEVMScriptExecutor that will be added to the registry\r\n    * @return id Identifier of the executor in the registry\r\n    */\r\n    function addScriptExecutor(IEVMScriptExecutor _executor) external auth(REGISTRY_ADD_EXECUTOR_ROLE) returns (uint256 id) {\r\n        uint256 executorId = executorsNextIndex++;\r\n        executors[executorId] = ExecutorEntry(_executor, true);\r\n        emit EnableExecutor(executorId, _executor);\r\n        return executorId;\r\n    }\r\n\r\n    /**\r\n    * @notice Disable script executor with ID `_executorId`\r\n    * @param _executorId Identifier of the executor in the registry\r\n    */\r\n    function disableScriptExecutor(uint256 _executorId)\r\n        external\r\n        authP(REGISTRY_MANAGER_ROLE, arr(_executorId))\r\n    {\r\n        // Note that we don't need to check for an executor's existence in this case, as only\r\n        // existing executors can be enabled\r\n        ExecutorEntry storage executorEntry = executors[_executorId];\r\n        require(executorEntry.enabled, ERROR_EXECUTOR_DISABLED);\r\n        executorEntry.enabled = false;\r\n        emit DisableExecutor(_executorId, executorEntry.executor);\r\n    }\r\n\r\n    /**\r\n    * @notice Enable script executor with ID `_executorId`\r\n    * @param _executorId Identifier of the executor in the registry\r\n    */\r\n    function enableScriptExecutor(uint256 _executorId)\r\n        external\r\n        authP(REGISTRY_MANAGER_ROLE, arr(_executorId))\r\n        executorExists(_executorId)\r\n    {\r\n        ExecutorEntry storage executorEntry = executors[_executorId];\r\n        require(!executorEntry.enabled, ERROR_EXECUTOR_ENABLED);\r\n        executorEntry.enabled = true;\r\n        emit EnableExecutor(_executorId, executorEntry.executor);\r\n    }\r\n\r\n    /**\r\n    * @dev Get the script executor that can execute a particular script based on its first 4 bytes\r\n    * @param _script EVMScript being inspected\r\n    */\r\n    function getScriptExecutor(bytes _script) public view returns (IEVMScriptExecutor) {\r\n        require(_script.length >= SCRIPT_START_LOCATION, ERROR_SCRIPT_LENGTH_TOO_SHORT);\r\n        uint256 id = _script.getSpecId();\r\n\r\n        // Note that we don't need to check for an executor's existence in this case, as only\r\n        // existing executors can be enabled\r\n        ExecutorEntry storage entry = executors[id];\r\n        return entry.enabled ? entry.executor : IEVMScriptExecutor(0);\r\n    }\r\n}","deployed_bytecode":"0x6080604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bf2a7f811461010b5780630803fac01461018d57806319f3d10f146101b65780632914b9bd146101dd57806332f0a3b5146102365780635ca4d4bb1461024b5780637e7db6e11461026557806380afdea8146102935780638129fc1c146102a857806387a16f12146102bd5780638b3dd749146102eb5780639d4941d814610300578063a1658fad1461032e578063a479e508146103a2578063bd8fde1c146103b7578063cff606a0146103cc578063d4aae0c4146103e4578063de4796ed146103f9578063f97a05df1461040e575b600080fd5b34801561011757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101649436949293602493928401919081908401838280828437509497506104569650505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561019957600080fd5b506101a26105a8565b604080519115158252519081900360200190f35b3480156101c257600080fd5b506101cb6105d1565b60408051918252519081900360200190f35b3480156101e957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101649436949293602493928401919081908401838280828437509497506105f59650505050505050565b34801561024257600080fd5b50610164610701565b34801561025757600080fd5b5061026360043561079f565b005b34801561027157600080fd5b506101a273ffffffffffffffffffffffffffffffffffffffff600435166109b3565b34801561029f57600080fd5b506101cb6109b9565b3480156102b457600080fd5b506102636109e9565b3480156102c957600080fd5b506101cb73ffffffffffffffffffffffffffffffffffffffff60043516610a9d565b3480156102f757600080fd5b506101cb610c61565b34801561030c57600080fd5b5061026373ffffffffffffffffffffffffffffffffffffffff60043516610c8c565b34801561033a57600080fd5b5060408051602060046044358181013583810280860185019096528085526101a295833573ffffffffffffffffffffffffffffffffffffffff16956024803596369695606495939492019291829185019084908082843750949750610fae9650505050505050565b3480156103ae57600080fd5b5061016461113e565b3480156103c357600080fd5b506101cb611200565b3480156103d857600080fd5b50610263600435611224565b3480156103f057600080fd5b506101646114ff565b34801561040557600080fd5b506101a261152a565b34801561041a57600080fd5b5061042660043561155b565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835290151560208301528051918290030190f35b60008060006004845110156040805190810160405280601e81526020017f45564d5245475f5343524950545f4c454e4754485f544f4f5f53484f5254000081525090151561053c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105015781810151838201526020016104e9565b50505050905090810190601f16801561052e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50610546846115a0565b63ffffffff1660008181526001602052604090208054919350915074010000000000000000000000000000000000000000900460ff166105875760006105a0565b805473ffffffffffffffffffffffffffffffffffffffff165b949350505050565b6000806105b3610c61565b905080158015906105cb5750806105c86115b3565b10155b91505090565b7fc4e90f38eea8c4212a009ca7b8947943ba4d4a58d19b683417f65291d1cd9ed281565b60006105ff61113e565b73ffffffffffffffffffffffffffffffffffffffff166304bf2a7f836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561068357818101518382015260200161066b565b50505050905090810190601f1680156106b05780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1580156106cf57600080fd5b505af11580156106e3573d6000803e3d6000fd5b505050506040513d60208110156106f957600080fd5b505192915050565b600061070b6114ff565b73ffffffffffffffffffffffffffffffffffffffff166332f0a3b56040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561076e57600080fd5b505af1158015610782573d6000803e3d6000fd5b505050506040513d602081101561079857600080fd5b5051905090565b60007ff7a450ef335e1892cb42c8ca72e7242359d7711924b75db5717410da3f614aa36107cb836115b7565b6107d6338383610fae565b60408051808201909152600f81527f4150505f415554485f4641494c454400000000000000000000000000000000006020820152901515610873576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5060008481526001602090815260409182902080548351808501909452601884527f45564d5245475f4558454355544f525f44495341424c4544000000000000000092840192909252945074010000000000000000000000000000000000000000900460ff161515610941576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5082547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116845560405173ffffffffffffffffffffffffffffffffffffffff9091169085907fc13cd9238f8ab1e5ab1f95cde77e89288fe5c328d04739adffd57b144b408fd190600090a350505050565b50600190565b60006109e47fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b6115f8565b905090565b6109f1610c61565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a4544000000000000000060208201529015610a8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b50610a966115fc565b6001600055565b6040805160008082526020820190925281907fc4e90f38eea8c4212a009ca7b8947943ba4d4a58d19b683417f65291d1cd9ed290610ade9033908390610fae565b60408051808201909152600f81527f4150505f415554485f4641494c454400000000000000000000000000000000006020820152901515610b7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b50600080546001808201835560408051808201825273ffffffffffffffffffffffffffffffffffffffff808a168083526020808401868152878952959052838720925183549551151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff919093167fffffffffffffffffffffffff00000000000000000000000000000000000000009096169590951794909416179055519194509184917f7697fa3288629310075a63816e294207c84f3cfc18ccf8e18eb917ec0bb566999190a35092915050565b60006109e47febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e6115f8565b6000806000610c9a846109b3565b60408051808201909152601281527f5245434f5645525f444953414c4c4f57454400000000000000000000000000006020820152901515610d37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b50610d40610701565b9250610d4b836116df565b60408051808201909152601a81527f5245434f5645525f5641554c545f4e4f545f434f4e54524143540000000000006020820152901515610de8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5073ffffffffffffffffffffffffffffffffffffffff84161515610e53576040513031925073ffffffffffffffffffffffffffffffffffffffff84169083156108fc029084906000818181858888f19350505050158015610e4d573d6000803e3d6000fd5b50610f43565b5082610e7b73ffffffffffffffffffffffffffffffffffffffff82163063ffffffff61171916565b9150610ea473ffffffffffffffffffffffffffffffffffffffff8216848463ffffffff61185216565b60408051808201909152601d81527f5245434f5645525f544f4b454e5f5452414e534645525f4641494c45440000006020820152901515610f41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b505b8373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f596caf56044b55fb8c4ca640089bbc2b63cae3e978b851f5745cbb7c5b288e02846040518082815260200191505060405180910390a350505050565b600080610fb96105a8565b1515610fc85760009150611136565b610fd06114ff565b905073ffffffffffffffffffffffffffffffffffffffff81161515610ff85760009150611136565b8073ffffffffffffffffffffffffffffffffffffffff1663fdef9106863087611020886118ea565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff871602815273ffffffffffffffffffffffffffffffffffffffff808616600483019081529085166024830152604482018490526080606483019081528351608484015283519192909160a490910190602085019080838360005b838110156110b85781810151838201526020016110a0565b50505050905090810190601f1680156110e55780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561110757600080fd5b505af115801561111b573d6000803e3d6000fd5b505050506040513d602081101561113157600080fd5b505191505b509392505050565b6000806111496114ff565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb60048201527fddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd616024820152905173ffffffffffffffffffffffffffffffffffffffff929092169163be00bbd8916044808201926020929091908290030181600087803b1580156106cf57600080fd5b7ff7a450ef335e1892cb42c8ca72e7242359d7711924b75db5717410da3f614aa381565b60007ff7a450ef335e1892cb42c8ca72e7242359d7711924b75db5717410da3f614aa3611250836115b7565b61125b338383610fae565b60408051808201909152600f81527f4150505f415554485f4641494c4544000000000000000000000000000000000060208201529015156112f8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b508360008111801561130b575060005481105b60408051808201909152601a81527f45564d5245475f494e4558495354454e545f4558454355544f5200000000000060208201529015156113a8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5060008581526001602090815260409182902080548351808501909452601784527f45564d5245475f4558454355544f525f454e41424c454400000000000000000092840192909252955074010000000000000000000000000000000000000000900460ff1615611475576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5083547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001780855560405173ffffffffffffffffffffffffffffffffffffffff9091169086907f7697fa3288629310075a63816e294207c84f3cfc18ccf8e18eb917ec0bb5669990600090a35050505050565b60006109e47f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b6115f8565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611555610c61565b14905090565b60016020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000900460ff1682565b60006115ad8260006118f4565b92915050565b4390565b60408051600180825281830190925260609160208083019080388339019050509050818160008151811015156115e957fe5b60209081029091010152919050565b5490565b611604610c61565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a45440000000000000000602082015290156116a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b506116d96116ac6115b3565b7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e9063ffffffff61194c16565b565b5490565b60008073ffffffffffffffffffffffffffffffffffffffff831615156117085760009150611713565b823b90506000811191505b50919050565b6040805173ffffffffffffffffffffffffffffffffffffffff83166024808301919091528251808303909101815260449091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f70a082310000000000000000000000000000000000000000000000000000000017905260009081806117a68684611950565b60408051808201909152601c81527f534146455f4552435f32305f42414c414e43455f52455645525445440000000060208201529193509150821515611848576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5095945050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526000906118e18582611981565b95945050505050565b8051602002815290565b60008061190184846119cf565b7c01000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000090911604949350505050565b9055565b6000806000806040516020818751602089018a5afa9250600083111561197557805191505b50909590945092505050565b6000806040516020818551602087016000895af160008111156119c5573d80156119b257602081146119bb576119c3565b600193506119c3565b600183511493505b505b5090949350505050565b0160200151905600a165627a7a72305820890040e124e4df90f160b91ec9203a3317432d822585bf001452455c7ca6f9190029","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"byzantium","libraries":{},"optimizer":{"enabled":true,"runs":10000},"remappings":[]},"optimization_runs":10000,"sourcify_repo_url":"https://repo.sourcify.dev/contracts/partial_match/1/0xBF1Ce0Bc4EdaAD8e576b3b55e19c4C15Cf6999eb/","decoded_constructor_args":null,"compiler_version":"0.4.24+commit.e67f0147","is_verified_via_verifier_alliance":false,"verified_at":"2024-04-19T11:00:40.742198Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x6080604052620000176401000000006200001d810204565b6200023b565b6200003064010000000062000125810204565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a45440000000000000000602082015290156200010c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620000d0578181015183820152602001620000b6565b50505050905090810190601f168015620000fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506200012360001964010000000062000154810204565b565b60006200014f60008051602062001c4e833981519152640100000000620015f86200023382021704565b905090565b6200016764010000000062000125810204565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a454400000000000000006020820152901562000206576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620000d0578181015183820152602001620000b6565b506200023060008051602062001c4e833981519152826401000000006200194c6200023782021704565b50565b5490565b9055565b611a03806200024b6000396000f3006080604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bf2a7f811461010b5780630803fac01461018d57806319f3d10f146101b65780632914b9bd146101dd57806332f0a3b5146102365780635ca4d4bb1461024b5780637e7db6e11461026557806380afdea8146102935780638129fc1c146102a857806387a16f12146102bd5780638b3dd749146102eb5780639d4941d814610300578063a1658fad1461032e578063a479e508146103a2578063bd8fde1c146103b7578063cff606a0146103cc578063d4aae0c4146103e4578063de4796ed146103f9578063f97a05df1461040e575b600080fd5b34801561011757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101649436949293602493928401919081908401838280828437509497506104569650505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561019957600080fd5b506101a26105a8565b604080519115158252519081900360200190f35b3480156101c257600080fd5b506101cb6105d1565b60408051918252519081900360200190f35b3480156101e957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101649436949293602493928401919081908401838280828437509497506105f59650505050505050565b34801561024257600080fd5b50610164610701565b34801561025757600080fd5b5061026360043561079f565b005b34801561027157600080fd5b506101a273ffffffffffffffffffffffffffffffffffffffff600435166109b3565b34801561029f57600080fd5b506101cb6109b9565b3480156102b457600080fd5b506102636109e9565b3480156102c957600080fd5b506101cb73ffffffffffffffffffffffffffffffffffffffff60043516610a9d565b3480156102f757600080fd5b506101cb610c61565b34801561030c57600080fd5b5061026373ffffffffffffffffffffffffffffffffffffffff60043516610c8c565b34801561033a57600080fd5b5060408051602060046044358181013583810280860185019096528085526101a295833573ffffffffffffffffffffffffffffffffffffffff16956024803596369695606495939492019291829185019084908082843750949750610fae9650505050505050565b3480156103ae57600080fd5b5061016461113e565b3480156103c357600080fd5b506101cb611200565b3480156103d857600080fd5b50610263600435611224565b3480156103f057600080fd5b506101646114ff565b34801561040557600080fd5b506101a261152a565b34801561041a57600080fd5b5061042660043561155b565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835290151560208301528051918290030190f35b60008060006004845110156040805190810160405280601e81526020017f45564d5245475f5343524950545f4c454e4754485f544f4f5f53484f5254000081525090151561053c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105015781810151838201526020016104e9565b50505050905090810190601f16801561052e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50610546846115a0565b63ffffffff1660008181526001602052604090208054919350915074010000000000000000000000000000000000000000900460ff166105875760006105a0565b805473ffffffffffffffffffffffffffffffffffffffff165b949350505050565b6000806105b3610c61565b905080158015906105cb5750806105c86115b3565b10155b91505090565b7fc4e90f38eea8c4212a009ca7b8947943ba4d4a58d19b683417f65291d1cd9ed281565b60006105ff61113e565b73ffffffffffffffffffffffffffffffffffffffff166304bf2a7f836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561068357818101518382015260200161066b565b50505050905090810190601f1680156106b05780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1580156106cf57600080fd5b505af11580156106e3573d6000803e3d6000fd5b505050506040513d60208110156106f957600080fd5b505192915050565b600061070b6114ff565b73ffffffffffffffffffffffffffffffffffffffff166332f0a3b56040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561076e57600080fd5b505af1158015610782573d6000803e3d6000fd5b505050506040513d602081101561079857600080fd5b5051905090565b60007ff7a450ef335e1892cb42c8ca72e7242359d7711924b75db5717410da3f614aa36107cb836115b7565b6107d6338383610fae565b60408051808201909152600f81527f4150505f415554485f4641494c454400000000000000000000000000000000006020820152901515610873576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5060008481526001602090815260409182902080548351808501909452601884527f45564d5245475f4558454355544f525f44495341424c4544000000000000000092840192909252945074010000000000000000000000000000000000000000900460ff161515610941576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5082547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116845560405173ffffffffffffffffffffffffffffffffffffffff9091169085907fc13cd9238f8ab1e5ab1f95cde77e89288fe5c328d04739adffd57b144b408fd190600090a350505050565b50600190565b60006109e47fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b6115f8565b905090565b6109f1610c61565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a4544000000000000000060208201529015610a8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b50610a966115fc565b6001600055565b6040805160008082526020820190925281907fc4e90f38eea8c4212a009ca7b8947943ba4d4a58d19b683417f65291d1cd9ed290610ade9033908390610fae565b60408051808201909152600f81527f4150505f415554485f4641494c454400000000000000000000000000000000006020820152901515610b7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b50600080546001808201835560408051808201825273ffffffffffffffffffffffffffffffffffffffff808a168083526020808401868152878952959052838720925183549551151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff919093167fffffffffffffffffffffffff00000000000000000000000000000000000000009096169590951794909416179055519194509184917f7697fa3288629310075a63816e294207c84f3cfc18ccf8e18eb917ec0bb566999190a35092915050565b60006109e47febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e6115f8565b6000806000610c9a846109b3565b60408051808201909152601281527f5245434f5645525f444953414c4c4f57454400000000000000000000000000006020820152901515610d37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b50610d40610701565b9250610d4b836116df565b60408051808201909152601a81527f5245434f5645525f5641554c545f4e4f545f434f4e54524143540000000000006020820152901515610de8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5073ffffffffffffffffffffffffffffffffffffffff84161515610e53576040513031925073ffffffffffffffffffffffffffffffffffffffff84169083156108fc029084906000818181858888f19350505050158015610e4d573d6000803e3d6000fd5b50610f43565b5082610e7b73ffffffffffffffffffffffffffffffffffffffff82163063ffffffff61171916565b9150610ea473ffffffffffffffffffffffffffffffffffffffff8216848463ffffffff61185216565b60408051808201909152601d81527f5245434f5645525f544f4b454e5f5452414e534645525f4641494c45440000006020820152901515610f41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b505b8373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f596caf56044b55fb8c4ca640089bbc2b63cae3e978b851f5745cbb7c5b288e02846040518082815260200191505060405180910390a350505050565b600080610fb96105a8565b1515610fc85760009150611136565b610fd06114ff565b905073ffffffffffffffffffffffffffffffffffffffff81161515610ff85760009150611136565b8073ffffffffffffffffffffffffffffffffffffffff1663fdef9106863087611020886118ea565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff871602815273ffffffffffffffffffffffffffffffffffffffff808616600483019081529085166024830152604482018490526080606483019081528351608484015283519192909160a490910190602085019080838360005b838110156110b85781810151838201526020016110a0565b50505050905090810190601f1680156110e55780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561110757600080fd5b505af115801561111b573d6000803e3d6000fd5b505050506040513d602081101561113157600080fd5b505191505b509392505050565b6000806111496114ff565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb60048201527fddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd616024820152905173ffffffffffffffffffffffffffffffffffffffff929092169163be00bbd8916044808201926020929091908290030181600087803b1580156106cf57600080fd5b7ff7a450ef335e1892cb42c8ca72e7242359d7711924b75db5717410da3f614aa381565b60007ff7a450ef335e1892cb42c8ca72e7242359d7711924b75db5717410da3f614aa3611250836115b7565b61125b338383610fae565b60408051808201909152600f81527f4150505f415554485f4641494c4544000000000000000000000000000000000060208201529015156112f8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b508360008111801561130b575060005481105b60408051808201909152601a81527f45564d5245475f494e4558495354454e545f4558454355544f5200000000000060208201529015156113a8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5060008581526001602090815260409182902080548351808501909452601784527f45564d5245475f4558454355544f525f454e41424c454400000000000000000092840192909252955074010000000000000000000000000000000000000000900460ff1615611475576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5083547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001780855560405173ffffffffffffffffffffffffffffffffffffffff9091169086907f7697fa3288629310075a63816e294207c84f3cfc18ccf8e18eb917ec0bb5669990600090a35050505050565b60006109e47f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b6115f8565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611555610c61565b14905090565b60016020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000900460ff1682565b60006115ad8260006118f4565b92915050565b4390565b60408051600180825281830190925260609160208083019080388339019050509050818160008151811015156115e957fe5b60209081029091010152919050565b5490565b611604610c61565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a45440000000000000000602082015290156116a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b506116d96116ac6115b3565b7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e9063ffffffff61194c16565b565b5490565b60008073ffffffffffffffffffffffffffffffffffffffff831615156117085760009150611713565b823b90506000811191505b50919050565b6040805173ffffffffffffffffffffffffffffffffffffffff83166024808301919091528251808303909101815260449091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f70a082310000000000000000000000000000000000000000000000000000000017905260009081806117a68684611950565b60408051808201909152601c81527f534146455f4552435f32305f42414c414e43455f52455645525445440000000060208201529193509150821515611848576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382528381815181526020019150805190602001908083836000838110156105015781810151838201526020016104e9565b5095945050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526000906118e18582611981565b95945050505050565b8051602002815290565b60008061190184846119cf565b7c01000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000090911604949350505050565b9055565b6000806000806040516020818751602089018a5afa9250600083111561197557805191505b50909590945092505050565b6000806040516020818551602087016000895af160008111156119c5573d80156119b257602081146119bb576119c3565b600193506119c3565b600183511493505b505b5090949350505050565b0160200151905600a165627a7a72305820890040e124e4df90f160b91ec9203a3317432d822585bf001452455c7ca6f9190029ebb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e","name":"EVMScriptRegistry","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"byzantium","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":true,"additional_sources":[],"certified":false,"conflicting_implementations":null,"abi":[{"constant":true,"inputs":[{"name":"_script","type":"bytes"}],"name":"getScriptExecutor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hasInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REGISTRY_ADD_EXECUTOR_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_script","type":"bytes"}],"name":"getEVMScriptExecutor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getRecoveryVault","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_executorId","type":"uint256"}],"name":"disableScriptExecutor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"allowRecoverability","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"appId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_executor","type":"address"}],"name":"addScriptExecutor","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getInitializationBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"transferToVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_sender","type":"address"},{"name":"_role","type":"bytes32"},{"name":"_params","type":"uint256[]"}],"name":"canPerform","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getEVMScriptRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REGISTRY_MANAGER_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_executorId","type":"uint256"}],"name":"enableScriptExecutor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kernel","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isPetrified","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"executors","outputs":[{"name":"executor","type":"address"},{"name":"enabled","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"executorId","type":"uint256"},{"indexed":true,"name":"executorAddress","type":"address"}],"name":"EnableExecutor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"executorId","type":"uint256"},{"indexed":true,"name":"executorAddress","type":"address"}],"name":"DisableExecutor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"executor","type":"address"},{"indexed":false,"name":"script","type":"bytes"},{"indexed":false,"name":"input","type":"bytes"},{"indexed":false,"name":"returnData","type":"bytes"}],"name":"ScriptResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"vault","type":"address"},{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"RecoverToVault","type":"event"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":null}