Cipher-Zero/contracts/bridges/bridge/zksync/libraries/artifacts/build-info/16e53d7af532632852adf33f973e5add.json
2024-09-01 23:29:11 +03:00

33876 lines
1.1 MiB

{
"id": "16e53d7af532632852adf33f973e5add",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.26",
"solcLongVersion": "0.8.26+commit.8a97fa7a",
"input": {
"language": "Solidity",
"sources": {
"contracts/bridges/bridge/zksync/libraries/Diamond.sol": {
"content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.8.13;\r\n\r\nimport \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\r\nimport \"../../common/libraries/UncheckedMath.sol\";\r\n\r\n/// @author Matter Labs\r\n/// @custom:security-contact security@matterlabs.dev\r\n/// @notice The helper library for managing the EIP-2535 diamond proxy.\r\nlibrary Diamond {\r\n using UncheckedMath for uint256;\r\n using SafeCast for uint256;\r\n\r\n /// @dev Magic value that should be returned by diamond cut initialize contracts.\r\n /// @dev Used to distinguish calls to contracts that were supposed to be used as diamond initializer from other contracts.\r\n bytes32 constant DIAMOND_INIT_SUCCESS_RETURN_VALUE =\r\n 0x33774e659306e47509050e97cb651e731180a42d458212294d30751925c551a2; // keccak256(\"diamond.zksync.init\") - 1\r\n\r\n /// @dev Storage position of `DiamondStorage` structure.\r\n bytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b; // keccak256(\"diamond.standard.diamond.storage\") - 1;\r\n\r\n event DiamondCut(FacetCut[] facetCuts, address initAddress, bytes initCalldata);\r\n\r\n /// @dev Utility struct that contains associated facet & meta information of selector\r\n /// @param facetAddress address of the facet which is connected with selector\r\n /// @param selectorPosition index in `FacetToSelectors.selectors` array, where is selector stored\r\n /// @param isFreezable denotes whether the selector can be frozen.\r\n struct SelectorToFacet {\r\n address facetAddress;\r\n uint16 selectorPosition;\r\n bool isFreezable;\r\n }\r\n\r\n /// @dev Utility struct that contains associated selectors & meta information of facet\r\n /// @param selectors list of all selectors that belong to the facet\r\n /// @param facetPosition index in `DiamondStorage.facets` array, where is facet stored\r\n struct FacetToSelectors {\r\n bytes4[] selectors;\r\n uint16 facetPosition;\r\n }\r\n\r\n /// @notice The structure that holds all diamond proxy associated parameters\r\n /// @dev According to the EIP-2535 should be stored on a special storage key - `DIAMOND_STORAGE_POSITION`\r\n /// @param selectorToFacet A mapping from the selector to the facet address and its meta information\r\n /// @param facetToSelectors A mapping from facet address to its selectors with meta information\r\n /// @param facets The array of all unique facet addresses that belong to the diamond proxy\r\n /// @param isFrozen Denotes whether the diamond proxy is frozen and all freezable facets are not accessible\r\n struct DiamondStorage {\r\n mapping(bytes4 => SelectorToFacet) selectorToFacet;\r\n mapping(address => FacetToSelectors) facetToSelectors;\r\n address[] facets;\r\n bool isFrozen;\r\n }\r\n\r\n /// @dev Parameters for diamond changes that touch one of the facets\r\n /// @param facet The address of facet that's affected by the cut\r\n /// @param action The action that is made on the facet\r\n /// @param isFreezable Denotes whether the facet & all their selectors can be frozen\r\n /// @param selectors An array of unique selectors that belongs to the facet address\r\n struct FacetCut {\r\n address facet;\r\n Action action;\r\n bool isFreezable;\r\n bytes4[] selectors;\r\n }\r\n\r\n /// @dev Structure of the diamond proxy changes\r\n /// @param facetCuts The set of changes (adding/removing/replacement) of implementation contracts\r\n /// @param initAddress The address that's delegate called after setting up new facet changes\r\n /// @param initCalldata Calldata for the delegate call to `initAddress`\r\n struct DiamondCutData {\r\n FacetCut[] facetCuts;\r\n address initAddress;\r\n bytes initCalldata;\r\n }\r\n\r\n /// @dev Type of change over diamond: add/replace/remove facets\r\n enum Action {\r\n Add,\r\n Replace,\r\n Remove\r\n }\r\n\r\n /// @return diamondStorage The pointer to the storage where all specific diamond proxy parameters stored\r\n function getDiamondStorage() internal pure returns (DiamondStorage storage diamondStorage) {\r\n bytes32 position = DIAMOND_STORAGE_POSITION;\r\n assembly {\r\n diamondStorage.slot := position\r\n }\r\n }\r\n\r\n /// @dev Add/replace/remove any number of selectors and optionally execute a function with delegatecall\r\n /// @param _diamondCut Diamond's facet changes and the parameters to optional initialization delegatecall\r\n function diamondCut(DiamondCutData memory _diamondCut) internal {\r\n FacetCut[] memory facetCuts = _diamondCut.facetCuts;\r\n address initAddress = _diamondCut.initAddress;\r\n bytes memory initCalldata = _diamondCut.initCalldata;\r\n uint256 facetCutsLength = facetCuts.length;\r\n for (uint256 i = 0; i < facetCutsLength; i = i.uncheckedInc()) {\r\n Action action = facetCuts[i].action;\r\n address facet = facetCuts[i].facet;\r\n bool isFacetFreezable = facetCuts[i].isFreezable;\r\n bytes4[] memory selectors = facetCuts[i].selectors;\r\n\r\n require(selectors.length > 0, \"B\"); // no functions for diamond cut\r\n\r\n if (action == Action.Add) {\r\n _addFunctions(facet, selectors, isFacetFreezable);\r\n } else if (action == Action.Replace) {\r\n _replaceFunctions(facet, selectors, isFacetFreezable);\r\n } else if (action == Action.Remove) {\r\n _removeFunctions(facet, selectors);\r\n } else {\r\n revert(\"C\"); // undefined diamond cut action\r\n }\r\n }\r\n\r\n _initializeDiamondCut(initAddress, initCalldata);\r\n emit DiamondCut(facetCuts, initAddress, initCalldata);\r\n }\r\n\r\n /// @dev Add new functions to the diamond proxy\r\n /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array\r\n function _addFunctions(\r\n address _facet,\r\n bytes4[] memory _selectors,\r\n bool _isFacetFreezable\r\n ) private {\r\n DiamondStorage storage ds = getDiamondStorage();\r\n\r\n require(_facet != address(0), \"G\"); // facet with zero address cannot be added\r\n\r\n // Add facet to the list of facets if the facet address is new one\r\n _saveFacetIfNew(_facet);\r\n\r\n uint256 selectorsLength = _selectors.length;\r\n for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) {\r\n bytes4 selector = _selectors[i];\r\n SelectorToFacet memory oldFacet = ds.selectorToFacet[selector];\r\n require(oldFacet.facetAddress == address(0), \"J\"); // facet for this selector already exists\r\n\r\n _addOneFunction(_facet, selector, _isFacetFreezable);\r\n }\r\n }\r\n\r\n /// @dev Change associated facets to already known function selectors\r\n /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array\r\n function _replaceFunctions(\r\n address _facet,\r\n bytes4[] memory _selectors,\r\n bool _isFacetFreezable\r\n ) private {\r\n DiamondStorage storage ds = getDiamondStorage();\r\n\r\n require(_facet != address(0), \"K\"); // cannot replace facet with zero address\r\n\r\n uint256 selectorsLength = _selectors.length;\r\n for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) {\r\n bytes4 selector = _selectors[i];\r\n SelectorToFacet memory oldFacet = ds.selectorToFacet[selector];\r\n require(oldFacet.facetAddress != address(0), \"L\"); // it is impossible to replace the facet with zero address\r\n\r\n _removeOneFunction(oldFacet.facetAddress, selector);\r\n // Add facet to the list of facets if the facet address is a new one\r\n _saveFacetIfNew(_facet);\r\n _addOneFunction(_facet, selector, _isFacetFreezable);\r\n }\r\n }\r\n\r\n /// @dev Remove association with function and facet\r\n /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array\r\n function _removeFunctions(address _facet, bytes4[] memory _selectors) private {\r\n DiamondStorage storage ds = getDiamondStorage();\r\n\r\n require(_facet == address(0), \"a1\"); // facet address must be zero\r\n\r\n uint256 selectorsLength = _selectors.length;\r\n for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) {\r\n bytes4 selector = _selectors[i];\r\n SelectorToFacet memory oldFacet = ds.selectorToFacet[selector];\r\n require(oldFacet.facetAddress != address(0), \"a2\"); // Can't delete a non-existent facet\r\n\r\n _removeOneFunction(oldFacet.facetAddress, selector);\r\n }\r\n }\r\n\r\n /// @dev Add address to the list of known facets if it is not on the list yet\r\n /// NOTE: should be called ONLY before adding a new selector associated with the address\r\n function _saveFacetIfNew(address _facet) private {\r\n DiamondStorage storage ds = getDiamondStorage();\r\n\r\n uint256 selectorsLength = ds.facetToSelectors[_facet].selectors.length;\r\n // If there are no selectors associated with facet then save facet as new one\r\n if (selectorsLength == 0) {\r\n ds.facetToSelectors[_facet].facetPosition = ds.facets.length.toUint16();\r\n ds.facets.push(_facet);\r\n }\r\n }\r\n\r\n /// @dev Add one function to the already known facet\r\n /// NOTE: It is expected but NOT enforced that:\r\n /// - `_facet` is NON-ZERO address\r\n /// - `_facet` is already stored address in `DiamondStorage.facets`\r\n /// - `_selector` is NOT associated by another facet\r\n function _addOneFunction(\r\n address _facet,\r\n bytes4 _selector,\r\n bool _isSelectorFreezable\r\n ) private {\r\n DiamondStorage storage ds = getDiamondStorage();\r\n\r\n uint16 selectorPosition = (ds.facetToSelectors[_facet].selectors.length).toUint16();\r\n\r\n // if selectorPosition is nonzero, it means it is not a new facet\r\n // so the freezability of the first selector must be matched to _isSelectorFreezable\r\n // so all the selectors in a facet will have the same freezability\r\n if (selectorPosition != 0) {\r\n bytes4 selector0 = ds.facetToSelectors[_facet].selectors[0];\r\n require(_isSelectorFreezable == ds.selectorToFacet[selector0].isFreezable, \"J1\");\r\n }\r\n\r\n ds.selectorToFacet[_selector] = SelectorToFacet({\r\n facetAddress: _facet,\r\n selectorPosition: selectorPosition,\r\n isFreezable: _isSelectorFreezable\r\n });\r\n ds.facetToSelectors[_facet].selectors.push(_selector);\r\n }\r\n\r\n /// @dev Remove one associated function with facet\r\n /// NOTE: It is expected but NOT enforced that `_facet` is NON-ZERO address\r\n function _removeOneFunction(address _facet, bytes4 _selector) private {\r\n DiamondStorage storage ds = getDiamondStorage();\r\n\r\n // Get index of `FacetToSelectors.selectors` of the selector and last element of array\r\n uint256 selectorPosition = ds.selectorToFacet[_selector].selectorPosition;\r\n uint256 lastSelectorPosition = ds.facetToSelectors[_facet].selectors.length - 1;\r\n\r\n // If the selector is not at the end of the array then move the last element to the selector position\r\n if (selectorPosition != lastSelectorPosition) {\r\n bytes4 lastSelector = ds.facetToSelectors[_facet].selectors[lastSelectorPosition];\r\n\r\n ds.facetToSelectors[_facet].selectors[selectorPosition] = lastSelector;\r\n ds.selectorToFacet[lastSelector].selectorPosition = selectorPosition.toUint16();\r\n }\r\n\r\n // Remove last element from the selectors array\r\n ds.facetToSelectors[_facet].selectors.pop();\r\n\r\n // Finally, clean up the association with facet\r\n delete ds.selectorToFacet[_selector];\r\n\r\n // If there are no selectors for facet then remove the facet from the list of known facets\r\n if (lastSelectorPosition == 0) {\r\n _removeFacet(_facet);\r\n }\r\n }\r\n\r\n /// @dev remove facet from the list of known facets\r\n /// NOTE: It is expected but NOT enforced that there are no selectors associated with `_facet`\r\n function _removeFacet(address _facet) private {\r\n DiamondStorage storage ds = getDiamondStorage();\r\n\r\n // Get index of `DiamondStorage.facets` of the facet and last element of array\r\n uint256 facetPosition = ds.facetToSelectors[_facet].facetPosition;\r\n uint256 lastFacetPosition = ds.facets.length - 1;\r\n\r\n // If the facet is not at the end of the array then move the last element to the facet position\r\n if (facetPosition != lastFacetPosition) {\r\n address lastFacet = ds.facets[lastFacetPosition];\r\n\r\n ds.facets[facetPosition] = lastFacet;\r\n ds.facetToSelectors[lastFacet].facetPosition = facetPosition.toUint16();\r\n }\r\n\r\n // Remove last element from the facets array\r\n ds.facets.pop();\r\n }\r\n\r\n /// @dev Delegates call to the initialization address with provided calldata\r\n /// @dev Used as a final step of diamond cut to execute the logic of the initialization for changed facets\r\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\r\n if (_init == address(0)) {\r\n require(_calldata.length == 0, \"H\"); // Non-empty calldata for zero address\r\n } else {\r\n // Do not check whether `_init` is a contract since later we check that it returns data.\r\n (bool success, bytes memory data) = _init.delegatecall(_calldata);\r\n if (!success) {\r\n // If the returndata is too small, we still want to produce some meaningful error\r\n if (data.length <= 4) {\r\n revert(\"I\"); // delegatecall failed\r\n }\r\n\r\n assembly {\r\n revert(add(data, 0x20), mload(data))\r\n }\r\n }\r\n\r\n // Check that called contract returns magic value to make sure that contract logic\r\n // supposed to be used as diamond cut initializer.\r\n require(data.length == 32, \"lp\");\r\n require(abi.decode(data, (bytes32)) == DIAMOND_INIT_SUCCESS_RETURN_VALUE, \"lp1\");\r\n }\r\n }\r\n}\r\n"
},
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol": {
"content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.8.13;\r\n\r\n/**\r\n * @author Matter Labs\r\n * @custom:security-contact security@matterlabs.dev\r\n * @notice The library for unchecked math.\r\n */\r\nlibrary UncheckedMath {\r\n function uncheckedInc(uint256 _number) internal pure returns (uint256) {\r\n unchecked {\r\n return _number + 1;\r\n }\r\n }\r\n\r\n function uncheckedAdd(uint256 _lhs, uint256 _rhs) internal pure returns (uint256) {\r\n unchecked {\r\n return _lhs + _rhs;\r\n }\r\n }\r\n}\r\n"
},
"@openzeppelin/contracts/utils/math/SafeCast.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev An uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\n /**\n * @dev Returns the downcasted uint248 from uint256, reverting on\n * overflow (when the input is greater than largest uint248).\n *\n * Counterpart to Solidity's `uint248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n */\n function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\n return uint248(value);\n }\n\n /**\n * @dev Returns the downcasted uint240 from uint256, reverting on\n * overflow (when the input is greater than largest uint240).\n *\n * Counterpart to Solidity's `uint240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n */\n function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\n return uint240(value);\n }\n\n /**\n * @dev Returns the downcasted uint232 from uint256, reverting on\n * overflow (when the input is greater than largest uint232).\n *\n * Counterpart to Solidity's `uint232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n */\n function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\n return uint232(value);\n }\n\n /**\n * @dev Returns the downcasted uint224 from uint256, reverting on\n * overflow (when the input is greater than largest uint224).\n *\n * Counterpart to Solidity's `uint224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n */\n function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\n return uint224(value);\n }\n\n /**\n * @dev Returns the downcasted uint216 from uint256, reverting on\n * overflow (when the input is greater than largest uint216).\n *\n * Counterpart to Solidity's `uint216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n */\n function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\n return uint216(value);\n }\n\n /**\n * @dev Returns the downcasted uint208 from uint256, reverting on\n * overflow (when the input is greater than largest uint208).\n *\n * Counterpart to Solidity's `uint208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n */\n function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\n return uint208(value);\n }\n\n /**\n * @dev Returns the downcasted uint200 from uint256, reverting on\n * overflow (when the input is greater than largest uint200).\n *\n * Counterpart to Solidity's `uint200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n */\n function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\n return uint200(value);\n }\n\n /**\n * @dev Returns the downcasted uint192 from uint256, reverting on\n * overflow (when the input is greater than largest uint192).\n *\n * Counterpart to Solidity's `uint192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n */\n function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\n return uint192(value);\n }\n\n /**\n * @dev Returns the downcasted uint184 from uint256, reverting on\n * overflow (when the input is greater than largest uint184).\n *\n * Counterpart to Solidity's `uint184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n */\n function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\n return uint184(value);\n }\n\n /**\n * @dev Returns the downcasted uint176 from uint256, reverting on\n * overflow (when the input is greater than largest uint176).\n *\n * Counterpart to Solidity's `uint176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n */\n function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\n return uint176(value);\n }\n\n /**\n * @dev Returns the downcasted uint168 from uint256, reverting on\n * overflow (when the input is greater than largest uint168).\n *\n * Counterpart to Solidity's `uint168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n */\n function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\n return uint168(value);\n }\n\n /**\n * @dev Returns the downcasted uint160 from uint256, reverting on\n * overflow (when the input is greater than largest uint160).\n *\n * Counterpart to Solidity's `uint160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n */\n function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\n return uint160(value);\n }\n\n /**\n * @dev Returns the downcasted uint152 from uint256, reverting on\n * overflow (when the input is greater than largest uint152).\n *\n * Counterpart to Solidity's `uint152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n */\n function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\n return uint152(value);\n }\n\n /**\n * @dev Returns the downcasted uint144 from uint256, reverting on\n * overflow (when the input is greater than largest uint144).\n *\n * Counterpart to Solidity's `uint144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n */\n function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\n return uint144(value);\n }\n\n /**\n * @dev Returns the downcasted uint136 from uint256, reverting on\n * overflow (when the input is greater than largest uint136).\n *\n * Counterpart to Solidity's `uint136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n */\n function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\n return uint136(value);\n }\n\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint120 from uint256, reverting on\n * overflow (when the input is greater than largest uint120).\n *\n * Counterpart to Solidity's `uint120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n */\n function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\n return uint120(value);\n }\n\n /**\n * @dev Returns the downcasted uint112 from uint256, reverting on\n * overflow (when the input is greater than largest uint112).\n *\n * Counterpart to Solidity's `uint112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n */\n function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\n return uint112(value);\n }\n\n /**\n * @dev Returns the downcasted uint104 from uint256, reverting on\n * overflow (when the input is greater than largest uint104).\n *\n * Counterpart to Solidity's `uint104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n */\n function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\n return uint104(value);\n }\n\n /**\n * @dev Returns the downcasted uint96 from uint256, reverting on\n * overflow (when the input is greater than largest uint96).\n *\n * Counterpart to Solidity's `uint96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n */\n function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\n return uint96(value);\n }\n\n /**\n * @dev Returns the downcasted uint88 from uint256, reverting on\n * overflow (when the input is greater than largest uint88).\n *\n * Counterpart to Solidity's `uint88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n */\n function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\n return uint88(value);\n }\n\n /**\n * @dev Returns the downcasted uint80 from uint256, reverting on\n * overflow (when the input is greater than largest uint80).\n *\n * Counterpart to Solidity's `uint80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n */\n function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\n return uint80(value);\n }\n\n /**\n * @dev Returns the downcasted uint72 from uint256, reverting on\n * overflow (when the input is greater than largest uint72).\n *\n * Counterpart to Solidity's `uint72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n */\n function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\n return uint72(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint56 from uint256, reverting on\n * overflow (when the input is greater than largest uint56).\n *\n * Counterpart to Solidity's `uint56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n */\n function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\n return uint56(value);\n }\n\n /**\n * @dev Returns the downcasted uint48 from uint256, reverting on\n * overflow (when the input is greater than largest uint48).\n *\n * Counterpart to Solidity's `uint48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n */\n function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\n return uint48(value);\n }\n\n /**\n * @dev Returns the downcasted uint40 from uint256, reverting on\n * overflow (when the input is greater than largest uint40).\n *\n * Counterpart to Solidity's `uint40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n */\n function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\n return uint40(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint24 from uint256, reverting on\n * overflow (when the input is greater than largest uint24).\n *\n * Counterpart to Solidity's `uint24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n */\n function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\n return uint24(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int248 from int256, reverting on\n * overflow (when the input is less than smallest int248 or\n * greater than largest int248).\n *\n * Counterpart to Solidity's `int248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n */\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int240 from int256, reverting on\n * overflow (when the input is less than smallest int240 or\n * greater than largest int240).\n *\n * Counterpart to Solidity's `int240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n */\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int232 from int256, reverting on\n * overflow (when the input is less than smallest int232 or\n * greater than largest int232).\n *\n * Counterpart to Solidity's `int232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n */\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int224 from int256, reverting on\n * overflow (when the input is less than smallest int224 or\n * greater than largest int224).\n *\n * Counterpart to Solidity's `int224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n */\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int216 from int256, reverting on\n * overflow (when the input is less than smallest int216 or\n * greater than largest int216).\n *\n * Counterpart to Solidity's `int216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n */\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int208 from int256, reverting on\n * overflow (when the input is less than smallest int208 or\n * greater than largest int208).\n *\n * Counterpart to Solidity's `int208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n */\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int200 from int256, reverting on\n * overflow (when the input is less than smallest int200 or\n * greater than largest int200).\n *\n * Counterpart to Solidity's `int200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n */\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int192 from int256, reverting on\n * overflow (when the input is less than smallest int192 or\n * greater than largest int192).\n *\n * Counterpart to Solidity's `int192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n */\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int184 from int256, reverting on\n * overflow (when the input is less than smallest int184 or\n * greater than largest int184).\n *\n * Counterpart to Solidity's `int184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n */\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int176 from int256, reverting on\n * overflow (when the input is less than smallest int176 or\n * greater than largest int176).\n *\n * Counterpart to Solidity's `int176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n */\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int168 from int256, reverting on\n * overflow (when the input is less than smallest int168 or\n * greater than largest int168).\n *\n * Counterpart to Solidity's `int168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n */\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int160 from int256, reverting on\n * overflow (when the input is less than smallest int160 or\n * greater than largest int160).\n *\n * Counterpart to Solidity's `int160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n */\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int152 from int256, reverting on\n * overflow (when the input is less than smallest int152 or\n * greater than largest int152).\n *\n * Counterpart to Solidity's `int152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n */\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int144 from int256, reverting on\n * overflow (when the input is less than smallest int144 or\n * greater than largest int144).\n *\n * Counterpart to Solidity's `int144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n */\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int136 from int256, reverting on\n * overflow (when the input is less than smallest int136 or\n * greater than largest int136).\n *\n * Counterpart to Solidity's `int136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n */\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int120 from int256, reverting on\n * overflow (when the input is less than smallest int120 or\n * greater than largest int120).\n *\n * Counterpart to Solidity's `int120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n */\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int112 from int256, reverting on\n * overflow (when the input is less than smallest int112 or\n * greater than largest int112).\n *\n * Counterpart to Solidity's `int112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n */\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int104 from int256, reverting on\n * overflow (when the input is less than smallest int104 or\n * greater than largest int104).\n *\n * Counterpart to Solidity's `int104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n */\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int96 from int256, reverting on\n * overflow (when the input is less than smallest int96 or\n * greater than largest int96).\n *\n * Counterpart to Solidity's `int96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n */\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int88 from int256, reverting on\n * overflow (when the input is less than smallest int88 or\n * greater than largest int88).\n *\n * Counterpart to Solidity's `int88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n */\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int80 from int256, reverting on\n * overflow (when the input is less than smallest int80 or\n * greater than largest int80).\n *\n * Counterpart to Solidity's `int80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n */\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int72 from int256, reverting on\n * overflow (when the input is less than smallest int72 or\n * greater than largest int72).\n *\n * Counterpart to Solidity's `int72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n */\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int56 from int256, reverting on\n * overflow (when the input is less than smallest int56 or\n * greater than largest int56).\n *\n * Counterpart to Solidity's `int56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n */\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int48 from int256, reverting on\n * overflow (when the input is less than smallest int48 or\n * greater than largest int48).\n *\n * Counterpart to Solidity's `int48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n */\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int40 from int256, reverting on\n * overflow (when the input is less than smallest int40 or\n * greater than largest int40).\n *\n * Counterpart to Solidity's `int40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n */\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int24 from int256, reverting on\n * overflow (when the input is less than smallest int24 or\n * greater than largest int24).\n *\n * Counterpart to Solidity's `int24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n */\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n */\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
},
"remappings": []
}
},
"output": {
"contracts": {
"@openzeppelin/contracts/utils/math/SafeCast.sol": {
"SafeCast": {
"abi": [
{
"inputs": [
{
"internalType": "uint8",
"name": "bits",
"type": "uint8"
},
{
"internalType": "int256",
"name": "value",
"type": "int256"
}
],
"name": "SafeCastOverflowedIntDowncast",
"type": "error"
},
{
"inputs": [
{
"internalType": "int256",
"name": "value",
"type": "int256"
}
],
"name": "SafeCastOverflowedIntToUint",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "bits",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "SafeCastOverflowedUintDowncast",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "SafeCastOverflowedUintToInt",
"type": "error"
}
],
"devdoc": {
"details": "Wrappers over Solidity's uintXX/intXX casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.",
"errors": {
"SafeCastOverflowedIntDowncast(uint8,int256)": [
{
"details": "Value doesn't fit in an int of `bits` size."
}
],
"SafeCastOverflowedIntToUint(int256)": [
{
"details": "An int value doesn't fit in an uint of `bits` size."
}
],
"SafeCastOverflowedUintDowncast(uint8,uint256)": [
{
"details": "Value doesn't fit in an uint of `bits` size."
}
],
"SafeCastOverflowedUintToInt(uint256)": [
{
"details": "An uint value doesn't fit in an int of `bits` size."
}
]
},
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"@openzeppelin/contracts/utils/math/SafeCast.sol\":764:34691 library SafeCast {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"@openzeppelin/contracts/utils/math/SafeCast.sol\":764:34691 library SafeCast {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa2646970667358221220980149f5a5ad7807ab77a289d39282aca512ef9698137806ef5734fbcb76e57b64736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220980149f5a5ad7807ab77a289d39282aca512ef9698137806ef5734fbcb76e57b64736f6c634300081a0033",
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP9 ADD BLOBHASH CREATE2 0xA5 0xAD PUSH25 0x7AB77A289D39282ACA512EF9698137806EF5734FBCB76E57B PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "764:33927:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220980149f5a5ad7807ab77a289d39282aca512ef9698137806ef5734fbcb76e57b64736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP9 ADD BLOBHASH CREATE2 0xA5 0xAD PUSH25 0x7AB77A289D39282ACA512EF9698137806EF5734FBCB76E57B PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "764:33927:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"toInt104(int256)": "infinite",
"toInt112(int256)": "infinite",
"toInt120(int256)": "infinite",
"toInt128(int256)": "infinite",
"toInt136(int256)": "infinite",
"toInt144(int256)": "infinite",
"toInt152(int256)": "infinite",
"toInt16(int256)": "infinite",
"toInt160(int256)": "infinite",
"toInt168(int256)": "infinite",
"toInt176(int256)": "infinite",
"toInt184(int256)": "infinite",
"toInt192(int256)": "infinite",
"toInt200(int256)": "infinite",
"toInt208(int256)": "infinite",
"toInt216(int256)": "infinite",
"toInt224(int256)": "infinite",
"toInt232(int256)": "infinite",
"toInt24(int256)": "infinite",
"toInt240(int256)": "infinite",
"toInt248(int256)": "infinite",
"toInt256(uint256)": "infinite",
"toInt32(int256)": "infinite",
"toInt40(int256)": "infinite",
"toInt48(int256)": "infinite",
"toInt56(int256)": "infinite",
"toInt64(int256)": "infinite",
"toInt72(int256)": "infinite",
"toInt8(int256)": "infinite",
"toInt80(int256)": "infinite",
"toInt88(int256)": "infinite",
"toInt96(int256)": "infinite",
"toUint104(uint256)": "infinite",
"toUint112(uint256)": "infinite",
"toUint120(uint256)": "infinite",
"toUint128(uint256)": "infinite",
"toUint136(uint256)": "infinite",
"toUint144(uint256)": "infinite",
"toUint152(uint256)": "infinite",
"toUint16(uint256)": "infinite",
"toUint160(uint256)": "infinite",
"toUint168(uint256)": "infinite",
"toUint176(uint256)": "infinite",
"toUint184(uint256)": "infinite",
"toUint192(uint256)": "infinite",
"toUint200(uint256)": "infinite",
"toUint208(uint256)": "infinite",
"toUint216(uint256)": "infinite",
"toUint224(uint256)": "infinite",
"toUint232(uint256)": "infinite",
"toUint24(uint256)": "infinite",
"toUint240(uint256)": "infinite",
"toUint248(uint256)": "infinite",
"toUint256(int256)": "infinite",
"toUint32(uint256)": "infinite",
"toUint40(uint256)": "infinite",
"toUint48(uint256)": "infinite",
"toUint56(uint256)": "infinite",
"toUint64(uint256)": "infinite",
"toUint72(uint256)": "infinite",
"toUint8(uint256)": "infinite",
"toUint80(uint256)": "infinite",
"toUint88(uint256)": "infinite",
"toUint96(uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 764,
"end": 34691,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 764,
"end": 34691,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 764,
"end": 34691,
"name": "DUP3",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "DUP3",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "DUP3",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "CODECOPY",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "DUP1",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "MLOAD",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 764,
"end": 34691,
"name": "BYTE",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 764,
"end": 34691,
"name": "EQ",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 764,
"end": 34691,
"name": "JUMPI",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 764,
"end": 34691,
"name": "MSTORE",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 764,
"end": 34691,
"name": "MSTORE",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "24"
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 764,
"end": 34691,
"name": "REVERT",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 764,
"end": 34691,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "ADDRESS",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 764,
"end": 34691,
"name": "MSTORE",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 764,
"end": 34691,
"name": "DUP2",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "MSTORE8",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "DUP3",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "DUP2",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a2646970667358221220980149f5a5ad7807ab77a289d39282aca512ef9698137806ef5734fbcb76e57b64736f6c634300081a0033",
".code": [
{
"begin": 764,
"end": 34691,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "ADDRESS",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "EQ",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 764,
"end": 34691,
"name": "MSTORE",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 764,
"end": 34691,
"name": "DUP1",
"source": 0
},
{
"begin": 764,
"end": 34691,
"name": "REVERT",
"source": 0
}
]
}
},
"sourceList": [
"@openzeppelin/contracts/utils/math/SafeCast.sol",
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol",
"contracts/bridges/bridge/zksync/libraries/Diamond.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"int256\",\"name\":\"value\",\"type\":\"int256\"}],\"name\":\"SafeCastOverflowedIntDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"value\",\"type\":\"int256\"}],\"name\":\"SafeCastOverflowedIntToUint\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintToInt\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Wrappers over Solidity's uintXX/intXX casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"errors\":{\"SafeCastOverflowedIntDowncast(uint8,int256)\":[{\"details\":\"Value doesn't fit in an int of `bits` size.\"}],\"SafeCastOverflowedIntToUint(int256)\":[{\"details\":\"An int value doesn't fit in an uint of `bits` size.\"}],\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeCastOverflowedUintToInt(uint256)\":[{\"details\":\"An uint value doesn't fit in an int of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":\"SafeCast\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xe19a4d5f31d2861e7344e8e535e2feafb913d806d3e2b5fe7782741a2a7094fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4aed79c0fa6f0546ed02f2f683e8f77f0fd2ed7eb34d8bbf3d373c9a6d95b13c\",\"dweb:/ipfs/QmWqVz6UAVqmnWU5pqYPt1o6iDEZyPaBraAA3rKfTTSfYj\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
},
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol": {
"UncheckedMath": {
"abi": [],
"devdoc": {
"author": "Matter Labs",
"custom:security-contact": "security@matterlabs.dev",
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":194:533 library UncheckedMath {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":194:533 library UncheckedMath {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212205bd83f97d7c378fa45458026c62282a19fb35af7f45774396c0421868ffc9e3a64736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212205bd83f97d7c378fa45458026c62282a19fb35af7f45774396c0421868ffc9e3a64736f6c634300081a0033",
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 JUMPDEST 0xD8 EXTCODEHASH SWAP8 0xD7 0xC3 PUSH25 0xFA45458026C62282A19FB35AF7F45774396C0421868FFC9E3A PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "194:339:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212205bd83f97d7c378fa45458026c62282a19fb35af7f45774396c0421868ffc9e3a64736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 JUMPDEST 0xD8 EXTCODEHASH SWAP8 0xD7 0xC3 PUSH25 0xFA45458026C62282A19FB35AF7F45774396C0421868FFC9E3A PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "194:339:1:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"uncheckedAdd(uint256,uint256)": "infinite",
"uncheckedInc(uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 194,
"end": 533,
"name": "PUSH #[$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 194,
"end": 533,
"name": "PUSH [$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "B"
},
{
"begin": 194,
"end": 533,
"name": "DUP3",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "DUP3",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "DUP3",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "CODECOPY",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "DUP1",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "MLOAD",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "BYTE",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 194,
"end": 533,
"name": "EQ",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH [tag]",
"source": 1,
"value": "1"
},
{
"begin": 194,
"end": 533,
"name": "JUMPI",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "MSTORE",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "4"
},
{
"begin": 194,
"end": 533,
"name": "MSTORE",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "24"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "REVERT",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "tag",
"source": 1,
"value": "1"
},
{
"begin": 194,
"end": 533,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "ADDRESS",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "MSTORE",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 194,
"end": 533,
"name": "DUP2",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "MSTORE8",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "DUP3",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "DUP2",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "RETURN",
"source": 1
}
],
".data": {
"0": {
".auxdata": "a26469706673582212205bd83f97d7c378fa45458026c62282a19fb35af7f45774396c0421868ffc9e3a64736f6c634300081a0033",
".code": [
{
"begin": 194,
"end": 533,
"name": "PUSHDEPLOYADDRESS",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "ADDRESS",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "EQ",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "80"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "40"
},
{
"begin": 194,
"end": 533,
"name": "MSTORE",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "DUP1",
"source": 1
},
{
"begin": 194,
"end": 533,
"name": "REVERT",
"source": 1
}
]
}
},
"sourceList": [
"@openzeppelin/contracts/utils/math/SafeCast.sol",
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol",
"contracts/bridges/bridge/zksync/libraries/Diamond.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Matter Labs\",\"custom:security-contact\":\"security@matterlabs.dev\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"The library for unchecked math.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":\"UncheckedMath\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":{\"keccak256\":\"0x2cf9e93e085f3261240197efe90c17f47635db4cb9dc3f6006e229334d72464f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c2750b3ec07b265e363a99a422c2fe98b14629f849a7f7e04532c25bf6c57e3\",\"dweb:/ipfs/QmcfvmA4dh1hTp45ogvXPmTVcdz9Cq6je3QnrbZdBbPfZY\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"notice": "The library for unchecked math.",
"version": 1
}
}
},
"contracts/bridges/bridge/zksync/libraries/Diamond.sol": {
"Diamond": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "facet",
"type": "address"
},
{
"internalType": "enum Diamond.Action",
"name": "action",
"type": "uint8"
},
{
"internalType": "bool",
"name": "isFreezable",
"type": "bool"
},
{
"internalType": "bytes4[]",
"name": "selectors",
"type": "bytes4[]"
}
],
"indexed": false,
"internalType": "struct Diamond.FacetCut[]",
"name": "facetCuts",
"type": "tuple[]"
},
{
"indexed": false,
"internalType": "address",
"name": "initAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes",
"name": "initCalldata",
"type": "bytes"
}
],
"name": "DiamondCut",
"type": "event"
}
],
"devdoc": {
"author": "Matter Labs",
"custom:security-contact": "security@matterlabs.dev",
"kind": "dev",
"methods": {},
"stateVariables": {
"DIAMOND_INIT_SUCCESS_RETURN_VALUE": {
"details": "Magic value that should be returned by diamond cut initialize contracts.Used to distinguish calls to contracts that were supposed to be used as diamond initializer from other contracts."
},
"DIAMOND_STORAGE_POSITION": {
"details": "Storage position of `DiamondStorage` structure."
}
},
"version": 1
},
"evm": {
"assembly": " /* \"contracts/bridges/bridge/zksync/libraries/Diamond.sol\":328:14245 library Diamond {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/bridges/bridge/zksync/libraries/Diamond.sol\":328:14245 library Diamond {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa2646970667358221220ab9ef43c112a69f035e2a2dcea689b4ce21d9328b532e7ae6331a2f061a1f04664736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220ab9ef43c112a69f035e2a2dcea689b4ce21d9328b532e7ae6331a2f061a1f04664736f6c634300081a0033",
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xAB SWAP15 DELEGATECALL EXTCODECOPY GT 0x2A PUSH10 0xF035E2A2DCEA689B4CE2 SAR SWAP4 0x28 0xB5 ORIGIN 0xE7 0xAE PUSH4 0x31A2F061 LOG1 CREATE CHAINID PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "328:13917:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220ab9ef43c112a69f035e2a2dcea689b4ce21d9328b532e7ae6331a2f061a1f04664736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xAB SWAP15 DELEGATECALL EXTCODECOPY GT 0x2A PUSH10 0xF035E2A2DCEA689B4CE2 SAR SWAP4 0x28 0xB5 ORIGIN 0xE7 0xAE PUSH4 0x31A2F061 LOG1 CREATE CHAINID PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "328:13917:2:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"_addFunctions(address,bytes4[] memory,bool)": "infinite",
"_addOneFunction(address,bytes4,bool)": "infinite",
"_initializeDiamondCut(address,bytes memory)": "infinite",
"_removeFacet(address)": "infinite",
"_removeFunctions(address,bytes4[] memory)": "infinite",
"_removeOneFunction(address,bytes4)": "infinite",
"_replaceFunctions(address,bytes4[] memory,bool)": "infinite",
"_saveFacetIfNew(address)": "infinite",
"diamondCut(struct Diamond.DiamondCutData memory)": "infinite",
"getDiamondStorage()": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 328,
"end": 14245,
"name": "PUSH #[$]",
"source": 2,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 328,
"end": 14245,
"name": "PUSH [$]",
"source": 2,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "B"
},
{
"begin": 328,
"end": 14245,
"name": "DUP3",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "DUP3",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "DUP3",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "CODECOPY",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "DUP1",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "MLOAD",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 328,
"end": 14245,
"name": "BYTE",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "73"
},
{
"begin": 328,
"end": 14245,
"name": "EQ",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH [tag]",
"source": 2,
"value": "1"
},
{
"begin": 328,
"end": 14245,
"name": "JUMPI",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 328,
"end": 14245,
"name": "MSTORE",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "4"
},
{
"begin": 328,
"end": 14245,
"name": "MSTORE",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "24"
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 328,
"end": 14245,
"name": "REVERT",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "tag",
"source": 2,
"value": "1"
},
{
"begin": 328,
"end": 14245,
"name": "JUMPDEST",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "ADDRESS",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 328,
"end": 14245,
"name": "MSTORE",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "73"
},
{
"begin": 328,
"end": 14245,
"name": "DUP2",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "MSTORE8",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "DUP3",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "DUP2",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "RETURN",
"source": 2
}
],
".data": {
"0": {
".auxdata": "a2646970667358221220ab9ef43c112a69f035e2a2dcea689b4ce21d9328b532e7ae6331a2f061a1f04664736f6c634300081a0033",
".code": [
{
"begin": 328,
"end": 14245,
"name": "PUSHDEPLOYADDRESS",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "ADDRESS",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "EQ",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "80"
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "40"
},
{
"begin": 328,
"end": 14245,
"name": "MSTORE",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "PUSH",
"source": 2,
"value": "0"
},
{
"begin": 328,
"end": 14245,
"name": "DUP1",
"source": 2
},
{
"begin": 328,
"end": 14245,
"name": "REVERT",
"source": 2
}
]
}
},
"sourceList": [
"@openzeppelin/contracts/utils/math/SafeCast.sol",
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol",
"contracts/bridges/bridge/zksync/libraries/Diamond.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"facet\",\"type\":\"address\"},{\"internalType\":\"enum Diamond.Action\",\"name\":\"action\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isFreezable\",\"type\":\"bool\"},{\"internalType\":\"bytes4[]\",\"name\":\"selectors\",\"type\":\"bytes4[]\"}],\"indexed\":false,\"internalType\":\"struct Diamond.FacetCut[]\",\"name\":\"facetCuts\",\"type\":\"tuple[]\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"initCalldata\",\"type\":\"bytes\"}],\"name\":\"DiamondCut\",\"type\":\"event\"}],\"devdoc\":{\"author\":\"Matter Labs\",\"custom:security-contact\":\"security@matterlabs.dev\",\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"DIAMOND_INIT_SUCCESS_RETURN_VALUE\":{\"details\":\"Magic value that should be returned by diamond cut initialize contracts.Used to distinguish calls to contracts that were supposed to be used as diamond initializer from other contracts.\"},\"DIAMOND_STORAGE_POSITION\":{\"details\":\"Storage position of `DiamondStorage` structure.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"The helper library for managing the EIP-2535 diamond proxy.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridges/bridge/zksync/libraries/Diamond.sol\":\"Diamond\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xe19a4d5f31d2861e7344e8e535e2feafb913d806d3e2b5fe7782741a2a7094fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4aed79c0fa6f0546ed02f2f683e8f77f0fd2ed7eb34d8bbf3d373c9a6d95b13c\",\"dweb:/ipfs/QmWqVz6UAVqmnWU5pqYPt1o6iDEZyPaBraAA3rKfTTSfYj\"]},\"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":{\"keccak256\":\"0x2cf9e93e085f3261240197efe90c17f47635db4cb9dc3f6006e229334d72464f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c2750b3ec07b265e363a99a422c2fe98b14629f849a7f7e04532c25bf6c57e3\",\"dweb:/ipfs/QmcfvmA4dh1hTp45ogvXPmTVcdz9Cq6je3QnrbZdBbPfZY\"]},\"contracts/bridges/bridge/zksync/libraries/Diamond.sol\":{\"keccak256\":\"0x85a5810ee5903adfe3a5fa8d003088ef90ce0b5fa8ce5ad3f7cb955649ff968a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9b79dc9686b663555af050450210b198ec6ad337f1f1432a94f5959bb6cd81cb\",\"dweb:/ipfs/QmXxxLLCtiajsfe1eSnrvDR7PaDrTB9j3v6BKsvJPSP4EH\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"notice": "The helper library for managing the EIP-2535 diamond proxy.",
"version": 1
}
}
}
},
"sources": {
"@openzeppelin/contracts/utils/math/SafeCast.sol": {
"ast": {
"absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol",
"exportedSymbols": {
"SafeCast": [
1754
]
},
"id": 1755,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".20"
],
"nodeType": "PragmaDirective",
"src": "192:24:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "SafeCast",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "218:545:0",
"text": " @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n checks.\n Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n easily result in undesired exploitation or bugs, since developers usually\n assume that overflows raise errors. `SafeCast` restores this intuition by\n reverting the transaction when such an operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always."
},
"fullyImplemented": true,
"id": 1754,
"linearizedBaseContracts": [
1754
],
"name": "SafeCast",
"nameLocation": "772:8:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "787:68:0",
"text": " @dev Value doesn't fit in an uint of `bits` size."
},
"errorSelector": "6dfcc650",
"id": 9,
"name": "SafeCastOverflowedUintDowncast",
"nameLocation": "866:30:0",
"nodeType": "ErrorDefinition",
"parameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "bits",
"nameLocation": "903:4:0",
"nodeType": "VariableDeclaration",
"scope": 9,
"src": "897:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 4,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "897:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "value",
"nameLocation": "917:5:0",
"nodeType": "VariableDeclaration",
"scope": 9,
"src": "909:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "909:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "896:27:0"
},
"src": "860:64:0"
},
{
"documentation": {
"id": 10,
"nodeType": "StructuredDocumentation",
"src": "930:75:0",
"text": " @dev An int value doesn't fit in an uint of `bits` size."
},
"errorSelector": "a8ce4432",
"id": 14,
"name": "SafeCastOverflowedIntToUint",
"nameLocation": "1016:27:0",
"nodeType": "ErrorDefinition",
"parameters": {
"id": 13,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12,
"mutability": "mutable",
"name": "value",
"nameLocation": "1051:5:0",
"nodeType": "VariableDeclaration",
"scope": 14,
"src": "1044:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 11,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1044:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "1043:14:0"
},
"src": "1010:48:0"
},
{
"documentation": {
"id": 15,
"nodeType": "StructuredDocumentation",
"src": "1064:67:0",
"text": " @dev Value doesn't fit in an int of `bits` size."
},
"errorSelector": "327269a7",
"id": 21,
"name": "SafeCastOverflowedIntDowncast",
"nameLocation": "1142:29:0",
"nodeType": "ErrorDefinition",
"parameters": {
"id": 20,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17,
"mutability": "mutable",
"name": "bits",
"nameLocation": "1178:4:0",
"nodeType": "VariableDeclaration",
"scope": 21,
"src": "1172:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 16,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1172:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 19,
"mutability": "mutable",
"name": "value",
"nameLocation": "1191:5:0",
"nodeType": "VariableDeclaration",
"scope": 21,
"src": "1184:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 18,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1184:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "1171:26:0"
},
"src": "1136:62:0"
},
{
"documentation": {
"id": 22,
"nodeType": "StructuredDocumentation",
"src": "1204:75:0",
"text": " @dev An uint value doesn't fit in an int of `bits` size."
},
"errorSelector": "24775e06",
"id": 26,
"name": "SafeCastOverflowedUintToInt",
"nameLocation": "1290:27:0",
"nodeType": "ErrorDefinition",
"parameters": {
"id": 25,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24,
"mutability": "mutable",
"name": "value",
"nameLocation": "1326:5:0",
"nodeType": "VariableDeclaration",
"scope": 26,
"src": "1318:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 23,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1318:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1317:15:0"
},
"src": "1284:49:0"
},
{
"body": {
"id": 53,
"nodeType": "Block",
"src": "1690:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 40,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 34,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29,
"src": "1704:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 37,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1717:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint248_$",
"typeString": "type(uint248)"
},
"typeName": {
"id": 36,
"name": "uint248",
"nodeType": "ElementaryTypeName",
"src": "1717:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint248_$",
"typeString": "type(uint248)"
}
],
"id": 35,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "1712:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1712:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint248",
"typeString": "type(uint248)"
}
},
"id": 39,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "1726:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "1712:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint248",
"typeString": "uint248"
}
},
"src": "1704:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 47,
"nodeType": "IfStatement",
"src": "1700:105:0",
"trueBody": {
"id": 46,
"nodeType": "Block",
"src": "1731:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323438",
"id": 42,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1783:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_248_by_1",
"typeString": "int_const 248"
},
"value": "248"
},
{
"id": 43,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29,
"src": "1788:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_248_by_1",
"typeString": "int_const 248"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 41,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "1752:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 44,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1752:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 45,
"nodeType": "RevertStatement",
"src": "1745:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 50,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29,
"src": "1829:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 49,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1821:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint248_$",
"typeString": "type(uint248)"
},
"typeName": {
"id": 48,
"name": "uint248",
"nodeType": "ElementaryTypeName",
"src": "1821:7:0",
"typeDescriptions": {}
}
},
"id": 51,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1821:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint248",
"typeString": "uint248"
}
},
"functionReturnParameters": 33,
"id": 52,
"nodeType": "Return",
"src": "1814:21:0"
}
]
},
"documentation": {
"id": 27,
"nodeType": "StructuredDocumentation",
"src": "1339:280:0",
"text": " @dev Returns the downcasted uint248 from uint256, reverting on\n overflow (when the input is greater than largest uint248).\n Counterpart to Solidity's `uint248` operator.\n Requirements:\n - input must fit into 248 bits"
},
"id": 54,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint248",
"nameLocation": "1633:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 30,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 29,
"mutability": "mutable",
"name": "value",
"nameLocation": "1651:5:0",
"nodeType": "VariableDeclaration",
"scope": 54,
"src": "1643:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 28,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1643:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1642:15:0"
},
"returnParameters": {
"id": 33,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 32,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 54,
"src": "1681:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint248",
"typeString": "uint248"
},
"typeName": {
"id": 31,
"name": "uint248",
"nodeType": "ElementaryTypeName",
"src": "1681:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint248",
"typeString": "uint248"
}
},
"visibility": "internal"
}
],
"src": "1680:9:0"
},
"scope": 1754,
"src": "1624:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 81,
"nodeType": "Block",
"src": "2199:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 68,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 62,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 57,
"src": "2213:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 65,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2226:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint240_$",
"typeString": "type(uint240)"
},
"typeName": {
"id": 64,
"name": "uint240",
"nodeType": "ElementaryTypeName",
"src": "2226:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint240_$",
"typeString": "type(uint240)"
}
],
"id": 63,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "2221:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 66,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2221:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint240",
"typeString": "type(uint240)"
}
},
"id": 67,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2235:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "2221:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint240",
"typeString": "uint240"
}
},
"src": "2213:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 75,
"nodeType": "IfStatement",
"src": "2209:105:0",
"trueBody": {
"id": 74,
"nodeType": "Block",
"src": "2240:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323430",
"id": 70,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2292:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_240_by_1",
"typeString": "int_const 240"
},
"value": "240"
},
{
"id": 71,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 57,
"src": "2297:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_240_by_1",
"typeString": "int_const 240"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 69,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "2261:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 72,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2261:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 73,
"nodeType": "RevertStatement",
"src": "2254:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 78,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 57,
"src": "2338:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 77,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2330:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint240_$",
"typeString": "type(uint240)"
},
"typeName": {
"id": 76,
"name": "uint240",
"nodeType": "ElementaryTypeName",
"src": "2330:7:0",
"typeDescriptions": {}
}
},
"id": 79,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2330:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint240",
"typeString": "uint240"
}
},
"functionReturnParameters": 61,
"id": 80,
"nodeType": "Return",
"src": "2323:21:0"
}
]
},
"documentation": {
"id": 55,
"nodeType": "StructuredDocumentation",
"src": "1848:280:0",
"text": " @dev Returns the downcasted uint240 from uint256, reverting on\n overflow (when the input is greater than largest uint240).\n Counterpart to Solidity's `uint240` operator.\n Requirements:\n - input must fit into 240 bits"
},
"id": 82,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint240",
"nameLocation": "2142:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 58,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 57,
"mutability": "mutable",
"name": "value",
"nameLocation": "2160:5:0",
"nodeType": "VariableDeclaration",
"scope": 82,
"src": "2152:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 56,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2152:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2151:15:0"
},
"returnParameters": {
"id": 61,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 60,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 82,
"src": "2190:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint240",
"typeString": "uint240"
},
"typeName": {
"id": 59,
"name": "uint240",
"nodeType": "ElementaryTypeName",
"src": "2190:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint240",
"typeString": "uint240"
}
},
"visibility": "internal"
}
],
"src": "2189:9:0"
},
"scope": 1754,
"src": "2133:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 109,
"nodeType": "Block",
"src": "2708:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 96,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 90,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "2722:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 93,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2735:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint232_$",
"typeString": "type(uint232)"
},
"typeName": {
"id": 92,
"name": "uint232",
"nodeType": "ElementaryTypeName",
"src": "2735:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint232_$",
"typeString": "type(uint232)"
}
],
"id": 91,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "2730:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 94,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2730:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint232",
"typeString": "type(uint232)"
}
},
"id": 95,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2744:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "2730:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint232",
"typeString": "uint232"
}
},
"src": "2722:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 103,
"nodeType": "IfStatement",
"src": "2718:105:0",
"trueBody": {
"id": 102,
"nodeType": "Block",
"src": "2749:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323332",
"id": 98,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2801:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_232_by_1",
"typeString": "int_const 232"
},
"value": "232"
},
{
"id": 99,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "2806:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_232_by_1",
"typeString": "int_const 232"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 97,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "2770:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 100,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2770:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 101,
"nodeType": "RevertStatement",
"src": "2763:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 106,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "2847:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 105,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2839:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint232_$",
"typeString": "type(uint232)"
},
"typeName": {
"id": 104,
"name": "uint232",
"nodeType": "ElementaryTypeName",
"src": "2839:7:0",
"typeDescriptions": {}
}
},
"id": 107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2839:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint232",
"typeString": "uint232"
}
},
"functionReturnParameters": 89,
"id": 108,
"nodeType": "Return",
"src": "2832:21:0"
}
]
},
"documentation": {
"id": 83,
"nodeType": "StructuredDocumentation",
"src": "2357:280:0",
"text": " @dev Returns the downcasted uint232 from uint256, reverting on\n overflow (when the input is greater than largest uint232).\n Counterpart to Solidity's `uint232` operator.\n Requirements:\n - input must fit into 232 bits"
},
"id": 110,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint232",
"nameLocation": "2651:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 86,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 85,
"mutability": "mutable",
"name": "value",
"nameLocation": "2669:5:0",
"nodeType": "VariableDeclaration",
"scope": 110,
"src": "2661:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 84,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2661:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2660:15:0"
},
"returnParameters": {
"id": 89,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 88,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 110,
"src": "2699:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint232",
"typeString": "uint232"
},
"typeName": {
"id": 87,
"name": "uint232",
"nodeType": "ElementaryTypeName",
"src": "2699:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint232",
"typeString": "uint232"
}
},
"visibility": "internal"
}
],
"src": "2698:9:0"
},
"scope": 1754,
"src": "2642:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 137,
"nodeType": "Block",
"src": "3217:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 124,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 118,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 113,
"src": "3231:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 121,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3244:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint224_$",
"typeString": "type(uint224)"
},
"typeName": {
"id": 120,
"name": "uint224",
"nodeType": "ElementaryTypeName",
"src": "3244:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint224_$",
"typeString": "type(uint224)"
}
],
"id": 119,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "3239:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 122,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3239:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint224",
"typeString": "type(uint224)"
}
},
"id": 123,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "3253:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "3239:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint224",
"typeString": "uint224"
}
},
"src": "3231:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 131,
"nodeType": "IfStatement",
"src": "3227:105:0",
"trueBody": {
"id": 130,
"nodeType": "Block",
"src": "3258:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323234",
"id": 126,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3310:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_224_by_1",
"typeString": "int_const 224"
},
"value": "224"
},
{
"id": 127,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 113,
"src": "3315:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_224_by_1",
"typeString": "int_const 224"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 125,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "3279:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 128,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3279:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 129,
"nodeType": "RevertStatement",
"src": "3272:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 134,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 113,
"src": "3356:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 133,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3348:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint224_$",
"typeString": "type(uint224)"
},
"typeName": {
"id": 132,
"name": "uint224",
"nodeType": "ElementaryTypeName",
"src": "3348:7:0",
"typeDescriptions": {}
}
},
"id": 135,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3348:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint224",
"typeString": "uint224"
}
},
"functionReturnParameters": 117,
"id": 136,
"nodeType": "Return",
"src": "3341:21:0"
}
]
},
"documentation": {
"id": 111,
"nodeType": "StructuredDocumentation",
"src": "2866:280:0",
"text": " @dev Returns the downcasted uint224 from uint256, reverting on\n overflow (when the input is greater than largest uint224).\n Counterpart to Solidity's `uint224` operator.\n Requirements:\n - input must fit into 224 bits"
},
"id": 138,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint224",
"nameLocation": "3160:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 114,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 113,
"mutability": "mutable",
"name": "value",
"nameLocation": "3178:5:0",
"nodeType": "VariableDeclaration",
"scope": 138,
"src": "3170:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 112,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3170:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3169:15:0"
},
"returnParameters": {
"id": 117,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 116,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 138,
"src": "3208:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint224",
"typeString": "uint224"
},
"typeName": {
"id": 115,
"name": "uint224",
"nodeType": "ElementaryTypeName",
"src": "3208:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint224",
"typeString": "uint224"
}
},
"visibility": "internal"
}
],
"src": "3207:9:0"
},
"scope": 1754,
"src": "3151:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 165,
"nodeType": "Block",
"src": "3726:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 152,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 146,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 141,
"src": "3740:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 149,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3753:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint216_$",
"typeString": "type(uint216)"
},
"typeName": {
"id": 148,
"name": "uint216",
"nodeType": "ElementaryTypeName",
"src": "3753:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint216_$",
"typeString": "type(uint216)"
}
],
"id": 147,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "3748:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 150,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3748:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint216",
"typeString": "type(uint216)"
}
},
"id": 151,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "3762:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "3748:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint216",
"typeString": "uint216"
}
},
"src": "3740:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 159,
"nodeType": "IfStatement",
"src": "3736:105:0",
"trueBody": {
"id": 158,
"nodeType": "Block",
"src": "3767:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323136",
"id": 154,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3819:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_216_by_1",
"typeString": "int_const 216"
},
"value": "216"
},
{
"id": 155,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 141,
"src": "3824:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_216_by_1",
"typeString": "int_const 216"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 153,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "3788:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 156,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3788:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 157,
"nodeType": "RevertStatement",
"src": "3781:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 162,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 141,
"src": "3865:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 161,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3857:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint216_$",
"typeString": "type(uint216)"
},
"typeName": {
"id": 160,
"name": "uint216",
"nodeType": "ElementaryTypeName",
"src": "3857:7:0",
"typeDescriptions": {}
}
},
"id": 163,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3857:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint216",
"typeString": "uint216"
}
},
"functionReturnParameters": 145,
"id": 164,
"nodeType": "Return",
"src": "3850:21:0"
}
]
},
"documentation": {
"id": 139,
"nodeType": "StructuredDocumentation",
"src": "3375:280:0",
"text": " @dev Returns the downcasted uint216 from uint256, reverting on\n overflow (when the input is greater than largest uint216).\n Counterpart to Solidity's `uint216` operator.\n Requirements:\n - input must fit into 216 bits"
},
"id": 166,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint216",
"nameLocation": "3669:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 142,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 141,
"mutability": "mutable",
"name": "value",
"nameLocation": "3687:5:0",
"nodeType": "VariableDeclaration",
"scope": 166,
"src": "3679:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 140,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3679:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3678:15:0"
},
"returnParameters": {
"id": 145,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 144,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 166,
"src": "3717:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint216",
"typeString": "uint216"
},
"typeName": {
"id": 143,
"name": "uint216",
"nodeType": "ElementaryTypeName",
"src": "3717:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint216",
"typeString": "uint216"
}
},
"visibility": "internal"
}
],
"src": "3716:9:0"
},
"scope": 1754,
"src": "3660:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 193,
"nodeType": "Block",
"src": "4235:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 180,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 174,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 169,
"src": "4249:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 177,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4262:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint208_$",
"typeString": "type(uint208)"
},
"typeName": {
"id": 176,
"name": "uint208",
"nodeType": "ElementaryTypeName",
"src": "4262:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint208_$",
"typeString": "type(uint208)"
}
],
"id": 175,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "4257:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 178,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4257:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint208",
"typeString": "type(uint208)"
}
},
"id": 179,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "4271:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "4257:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint208",
"typeString": "uint208"
}
},
"src": "4249:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 187,
"nodeType": "IfStatement",
"src": "4245:105:0",
"trueBody": {
"id": 186,
"nodeType": "Block",
"src": "4276:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323038",
"id": 182,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4328:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_208_by_1",
"typeString": "int_const 208"
},
"value": "208"
},
{
"id": 183,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 169,
"src": "4333:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_208_by_1",
"typeString": "int_const 208"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 181,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "4297:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 184,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4297:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 185,
"nodeType": "RevertStatement",
"src": "4290:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 190,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 169,
"src": "4374:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 189,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4366:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint208_$",
"typeString": "type(uint208)"
},
"typeName": {
"id": 188,
"name": "uint208",
"nodeType": "ElementaryTypeName",
"src": "4366:7:0",
"typeDescriptions": {}
}
},
"id": 191,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4366:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint208",
"typeString": "uint208"
}
},
"functionReturnParameters": 173,
"id": 192,
"nodeType": "Return",
"src": "4359:21:0"
}
]
},
"documentation": {
"id": 167,
"nodeType": "StructuredDocumentation",
"src": "3884:280:0",
"text": " @dev Returns the downcasted uint208 from uint256, reverting on\n overflow (when the input is greater than largest uint208).\n Counterpart to Solidity's `uint208` operator.\n Requirements:\n - input must fit into 208 bits"
},
"id": 194,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint208",
"nameLocation": "4178:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 170,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 169,
"mutability": "mutable",
"name": "value",
"nameLocation": "4196:5:0",
"nodeType": "VariableDeclaration",
"scope": 194,
"src": "4188:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 168,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4188:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4187:15:0"
},
"returnParameters": {
"id": 173,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 172,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 194,
"src": "4226:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint208",
"typeString": "uint208"
},
"typeName": {
"id": 171,
"name": "uint208",
"nodeType": "ElementaryTypeName",
"src": "4226:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint208",
"typeString": "uint208"
}
},
"visibility": "internal"
}
],
"src": "4225:9:0"
},
"scope": 1754,
"src": "4169:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 221,
"nodeType": "Block",
"src": "4744:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 208,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 202,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 197,
"src": "4758:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 205,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4771:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint200_$",
"typeString": "type(uint200)"
},
"typeName": {
"id": 204,
"name": "uint200",
"nodeType": "ElementaryTypeName",
"src": "4771:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint200_$",
"typeString": "type(uint200)"
}
],
"id": 203,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "4766:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 206,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4766:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint200",
"typeString": "type(uint200)"
}
},
"id": 207,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "4780:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "4766:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint200",
"typeString": "uint200"
}
},
"src": "4758:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 215,
"nodeType": "IfStatement",
"src": "4754:105:0",
"trueBody": {
"id": 214,
"nodeType": "Block",
"src": "4785:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323030",
"id": 210,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4837:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_200_by_1",
"typeString": "int_const 200"
},
"value": "200"
},
{
"id": 211,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 197,
"src": "4842:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_200_by_1",
"typeString": "int_const 200"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 209,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "4806:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 212,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4806:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 213,
"nodeType": "RevertStatement",
"src": "4799:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 218,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 197,
"src": "4883:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 217,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4875:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint200_$",
"typeString": "type(uint200)"
},
"typeName": {
"id": 216,
"name": "uint200",
"nodeType": "ElementaryTypeName",
"src": "4875:7:0",
"typeDescriptions": {}
}
},
"id": 219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4875:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint200",
"typeString": "uint200"
}
},
"functionReturnParameters": 201,
"id": 220,
"nodeType": "Return",
"src": "4868:21:0"
}
]
},
"documentation": {
"id": 195,
"nodeType": "StructuredDocumentation",
"src": "4393:280:0",
"text": " @dev Returns the downcasted uint200 from uint256, reverting on\n overflow (when the input is greater than largest uint200).\n Counterpart to Solidity's `uint200` operator.\n Requirements:\n - input must fit into 200 bits"
},
"id": 222,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint200",
"nameLocation": "4687:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 198,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 197,
"mutability": "mutable",
"name": "value",
"nameLocation": "4705:5:0",
"nodeType": "VariableDeclaration",
"scope": 222,
"src": "4697:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 196,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4697:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4696:15:0"
},
"returnParameters": {
"id": 201,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 200,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 222,
"src": "4735:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint200",
"typeString": "uint200"
},
"typeName": {
"id": 199,
"name": "uint200",
"nodeType": "ElementaryTypeName",
"src": "4735:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint200",
"typeString": "uint200"
}
},
"visibility": "internal"
}
],
"src": "4734:9:0"
},
"scope": 1754,
"src": "4678:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 249,
"nodeType": "Block",
"src": "5253:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 230,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 225,
"src": "5267:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 233,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "5280:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint192_$",
"typeString": "type(uint192)"
},
"typeName": {
"id": 232,
"name": "uint192",
"nodeType": "ElementaryTypeName",
"src": "5280:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint192_$",
"typeString": "type(uint192)"
}
],
"id": 231,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "5275:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 234,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5275:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint192",
"typeString": "type(uint192)"
}
},
"id": 235,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "5289:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "5275:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"src": "5267:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 243,
"nodeType": "IfStatement",
"src": "5263:105:0",
"trueBody": {
"id": 242,
"nodeType": "Block",
"src": "5294:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313932",
"id": 238,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5346:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_192_by_1",
"typeString": "int_const 192"
},
"value": "192"
},
{
"id": 239,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 225,
"src": "5351:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_192_by_1",
"typeString": "int_const 192"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 237,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "5315:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 240,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5315:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 241,
"nodeType": "RevertStatement",
"src": "5308:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 246,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 225,
"src": "5392:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 245,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "5384:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint192_$",
"typeString": "type(uint192)"
},
"typeName": {
"id": 244,
"name": "uint192",
"nodeType": "ElementaryTypeName",
"src": "5384:7:0",
"typeDescriptions": {}
}
},
"id": 247,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5384:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"functionReturnParameters": 229,
"id": 248,
"nodeType": "Return",
"src": "5377:21:0"
}
]
},
"documentation": {
"id": 223,
"nodeType": "StructuredDocumentation",
"src": "4902:280:0",
"text": " @dev Returns the downcasted uint192 from uint256, reverting on\n overflow (when the input is greater than largest uint192).\n Counterpart to Solidity's `uint192` operator.\n Requirements:\n - input must fit into 192 bits"
},
"id": 250,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint192",
"nameLocation": "5196:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 226,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 225,
"mutability": "mutable",
"name": "value",
"nameLocation": "5214:5:0",
"nodeType": "VariableDeclaration",
"scope": 250,
"src": "5206:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 224,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5206:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5205:15:0"
},
"returnParameters": {
"id": 229,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 228,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 250,
"src": "5244:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint192",
"typeString": "uint192"
},
"typeName": {
"id": 227,
"name": "uint192",
"nodeType": "ElementaryTypeName",
"src": "5244:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"visibility": "internal"
}
],
"src": "5243:9:0"
},
"scope": 1754,
"src": "5187:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 277,
"nodeType": "Block",
"src": "5762:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 264,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 258,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "5776:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 261,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "5789:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint184_$",
"typeString": "type(uint184)"
},
"typeName": {
"id": 260,
"name": "uint184",
"nodeType": "ElementaryTypeName",
"src": "5789:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint184_$",
"typeString": "type(uint184)"
}
],
"id": 259,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "5784:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 262,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5784:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint184",
"typeString": "type(uint184)"
}
},
"id": 263,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "5798:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "5784:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint184",
"typeString": "uint184"
}
},
"src": "5776:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 271,
"nodeType": "IfStatement",
"src": "5772:105:0",
"trueBody": {
"id": 270,
"nodeType": "Block",
"src": "5803:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313834",
"id": 266,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5855:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_184_by_1",
"typeString": "int_const 184"
},
"value": "184"
},
{
"id": 267,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "5860:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_184_by_1",
"typeString": "int_const 184"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 265,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "5824:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5824:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 269,
"nodeType": "RevertStatement",
"src": "5817:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 274,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 253,
"src": "5901:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 273,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "5893:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint184_$",
"typeString": "type(uint184)"
},
"typeName": {
"id": 272,
"name": "uint184",
"nodeType": "ElementaryTypeName",
"src": "5893:7:0",
"typeDescriptions": {}
}
},
"id": 275,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5893:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint184",
"typeString": "uint184"
}
},
"functionReturnParameters": 257,
"id": 276,
"nodeType": "Return",
"src": "5886:21:0"
}
]
},
"documentation": {
"id": 251,
"nodeType": "StructuredDocumentation",
"src": "5411:280:0",
"text": " @dev Returns the downcasted uint184 from uint256, reverting on\n overflow (when the input is greater than largest uint184).\n Counterpart to Solidity's `uint184` operator.\n Requirements:\n - input must fit into 184 bits"
},
"id": 278,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint184",
"nameLocation": "5705:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 254,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 253,
"mutability": "mutable",
"name": "value",
"nameLocation": "5723:5:0",
"nodeType": "VariableDeclaration",
"scope": 278,
"src": "5715:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 252,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5715:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5714:15:0"
},
"returnParameters": {
"id": 257,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 256,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 278,
"src": "5753:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint184",
"typeString": "uint184"
},
"typeName": {
"id": 255,
"name": "uint184",
"nodeType": "ElementaryTypeName",
"src": "5753:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint184",
"typeString": "uint184"
}
},
"visibility": "internal"
}
],
"src": "5752:9:0"
},
"scope": 1754,
"src": "5696:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 305,
"nodeType": "Block",
"src": "6271:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 292,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 286,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 281,
"src": "6285:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 289,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "6298:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint176_$",
"typeString": "type(uint176)"
},
"typeName": {
"id": 288,
"name": "uint176",
"nodeType": "ElementaryTypeName",
"src": "6298:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint176_$",
"typeString": "type(uint176)"
}
],
"id": 287,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "6293:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 290,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6293:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint176",
"typeString": "type(uint176)"
}
},
"id": 291,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "6307:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "6293:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint176",
"typeString": "uint176"
}
},
"src": "6285:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 299,
"nodeType": "IfStatement",
"src": "6281:105:0",
"trueBody": {
"id": 298,
"nodeType": "Block",
"src": "6312:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313736",
"id": 294,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6364:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_176_by_1",
"typeString": "int_const 176"
},
"value": "176"
},
{
"id": 295,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 281,
"src": "6369:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_176_by_1",
"typeString": "int_const 176"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 293,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "6333:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 296,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6333:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 297,
"nodeType": "RevertStatement",
"src": "6326:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 302,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 281,
"src": "6410:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 301,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "6402:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint176_$",
"typeString": "type(uint176)"
},
"typeName": {
"id": 300,
"name": "uint176",
"nodeType": "ElementaryTypeName",
"src": "6402:7:0",
"typeDescriptions": {}
}
},
"id": 303,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6402:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint176",
"typeString": "uint176"
}
},
"functionReturnParameters": 285,
"id": 304,
"nodeType": "Return",
"src": "6395:21:0"
}
]
},
"documentation": {
"id": 279,
"nodeType": "StructuredDocumentation",
"src": "5920:280:0",
"text": " @dev Returns the downcasted uint176 from uint256, reverting on\n overflow (when the input is greater than largest uint176).\n Counterpart to Solidity's `uint176` operator.\n Requirements:\n - input must fit into 176 bits"
},
"id": 306,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint176",
"nameLocation": "6214:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 282,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 281,
"mutability": "mutable",
"name": "value",
"nameLocation": "6232:5:0",
"nodeType": "VariableDeclaration",
"scope": 306,
"src": "6224:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 280,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6224:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "6223:15:0"
},
"returnParameters": {
"id": 285,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 284,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 306,
"src": "6262:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint176",
"typeString": "uint176"
},
"typeName": {
"id": 283,
"name": "uint176",
"nodeType": "ElementaryTypeName",
"src": "6262:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint176",
"typeString": "uint176"
}
},
"visibility": "internal"
}
],
"src": "6261:9:0"
},
"scope": 1754,
"src": "6205:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 333,
"nodeType": "Block",
"src": "6780:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 320,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 314,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 309,
"src": "6794:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 317,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "6807:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint168_$",
"typeString": "type(uint168)"
},
"typeName": {
"id": 316,
"name": "uint168",
"nodeType": "ElementaryTypeName",
"src": "6807:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint168_$",
"typeString": "type(uint168)"
}
],
"id": 315,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "6802:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 318,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6802:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint168",
"typeString": "type(uint168)"
}
},
"id": 319,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "6816:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "6802:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint168",
"typeString": "uint168"
}
},
"src": "6794:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 327,
"nodeType": "IfStatement",
"src": "6790:105:0",
"trueBody": {
"id": 326,
"nodeType": "Block",
"src": "6821:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313638",
"id": 322,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6873:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_168_by_1",
"typeString": "int_const 168"
},
"value": "168"
},
{
"id": 323,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 309,
"src": "6878:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_168_by_1",
"typeString": "int_const 168"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 321,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "6842:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6842:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 325,
"nodeType": "RevertStatement",
"src": "6835:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 330,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 309,
"src": "6919:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 329,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "6911:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint168_$",
"typeString": "type(uint168)"
},
"typeName": {
"id": 328,
"name": "uint168",
"nodeType": "ElementaryTypeName",
"src": "6911:7:0",
"typeDescriptions": {}
}
},
"id": 331,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6911:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint168",
"typeString": "uint168"
}
},
"functionReturnParameters": 313,
"id": 332,
"nodeType": "Return",
"src": "6904:21:0"
}
]
},
"documentation": {
"id": 307,
"nodeType": "StructuredDocumentation",
"src": "6429:280:0",
"text": " @dev Returns the downcasted uint168 from uint256, reverting on\n overflow (when the input is greater than largest uint168).\n Counterpart to Solidity's `uint168` operator.\n Requirements:\n - input must fit into 168 bits"
},
"id": 334,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint168",
"nameLocation": "6723:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 310,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 309,
"mutability": "mutable",
"name": "value",
"nameLocation": "6741:5:0",
"nodeType": "VariableDeclaration",
"scope": 334,
"src": "6733:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 308,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6733:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "6732:15:0"
},
"returnParameters": {
"id": 313,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 312,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 334,
"src": "6771:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint168",
"typeString": "uint168"
},
"typeName": {
"id": 311,
"name": "uint168",
"nodeType": "ElementaryTypeName",
"src": "6771:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint168",
"typeString": "uint168"
}
},
"visibility": "internal"
}
],
"src": "6770:9:0"
},
"scope": 1754,
"src": "6714:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 361,
"nodeType": "Block",
"src": "7289:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 348,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 342,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 337,
"src": "7303:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 345,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "7316:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint160_$",
"typeString": "type(uint160)"
},
"typeName": {
"id": 344,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "7316:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint160_$",
"typeString": "type(uint160)"
}
],
"id": 343,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "7311:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 346,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7311:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint160",
"typeString": "type(uint160)"
}
},
"id": 347,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "7325:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "7311:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"src": "7303:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 355,
"nodeType": "IfStatement",
"src": "7299:105:0",
"trueBody": {
"id": 354,
"nodeType": "Block",
"src": "7330:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313630",
"id": 350,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7382:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_160_by_1",
"typeString": "int_const 160"
},
"value": "160"
},
{
"id": 351,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 337,
"src": "7387:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_160_by_1",
"typeString": "int_const 160"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 349,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "7351:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 352,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7351:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 353,
"nodeType": "RevertStatement",
"src": "7344:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 358,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 337,
"src": "7428:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 357,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "7420:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint160_$",
"typeString": "type(uint160)"
},
"typeName": {
"id": 356,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "7420:7:0",
"typeDescriptions": {}
}
},
"id": 359,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7420:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"functionReturnParameters": 341,
"id": 360,
"nodeType": "Return",
"src": "7413:21:0"
}
]
},
"documentation": {
"id": 335,
"nodeType": "StructuredDocumentation",
"src": "6938:280:0",
"text": " @dev Returns the downcasted uint160 from uint256, reverting on\n overflow (when the input is greater than largest uint160).\n Counterpart to Solidity's `uint160` operator.\n Requirements:\n - input must fit into 160 bits"
},
"id": 362,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint160",
"nameLocation": "7232:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 338,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 337,
"mutability": "mutable",
"name": "value",
"nameLocation": "7250:5:0",
"nodeType": "VariableDeclaration",
"scope": 362,
"src": "7242:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 336,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7242:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "7241:15:0"
},
"returnParameters": {
"id": 341,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 340,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 362,
"src": "7280:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 339,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "7280:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"src": "7279:9:0"
},
"scope": 1754,
"src": "7223:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 389,
"nodeType": "Block",
"src": "7798:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 376,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 370,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 365,
"src": "7812:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 373,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "7825:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint152_$",
"typeString": "type(uint152)"
},
"typeName": {
"id": 372,
"name": "uint152",
"nodeType": "ElementaryTypeName",
"src": "7825:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint152_$",
"typeString": "type(uint152)"
}
],
"id": 371,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "7820:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 374,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7820:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint152",
"typeString": "type(uint152)"
}
},
"id": 375,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "7834:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "7820:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint152",
"typeString": "uint152"
}
},
"src": "7812:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 383,
"nodeType": "IfStatement",
"src": "7808:105:0",
"trueBody": {
"id": 382,
"nodeType": "Block",
"src": "7839:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313532",
"id": 378,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7891:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_152_by_1",
"typeString": "int_const 152"
},
"value": "152"
},
{
"id": 379,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 365,
"src": "7896:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_152_by_1",
"typeString": "int_const 152"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 377,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "7860:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 380,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7860:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 381,
"nodeType": "RevertStatement",
"src": "7853:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 386,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 365,
"src": "7937:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 385,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "7929:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint152_$",
"typeString": "type(uint152)"
},
"typeName": {
"id": 384,
"name": "uint152",
"nodeType": "ElementaryTypeName",
"src": "7929:7:0",
"typeDescriptions": {}
}
},
"id": 387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7929:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint152",
"typeString": "uint152"
}
},
"functionReturnParameters": 369,
"id": 388,
"nodeType": "Return",
"src": "7922:21:0"
}
]
},
"documentation": {
"id": 363,
"nodeType": "StructuredDocumentation",
"src": "7447:280:0",
"text": " @dev Returns the downcasted uint152 from uint256, reverting on\n overflow (when the input is greater than largest uint152).\n Counterpart to Solidity's `uint152` operator.\n Requirements:\n - input must fit into 152 bits"
},
"id": 390,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint152",
"nameLocation": "7741:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 366,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 365,
"mutability": "mutable",
"name": "value",
"nameLocation": "7759:5:0",
"nodeType": "VariableDeclaration",
"scope": 390,
"src": "7751:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 364,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7751:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "7750:15:0"
},
"returnParameters": {
"id": 369,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 368,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 390,
"src": "7789:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint152",
"typeString": "uint152"
},
"typeName": {
"id": 367,
"name": "uint152",
"nodeType": "ElementaryTypeName",
"src": "7789:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint152",
"typeString": "uint152"
}
},
"visibility": "internal"
}
],
"src": "7788:9:0"
},
"scope": 1754,
"src": "7732:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 417,
"nodeType": "Block",
"src": "8307:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 404,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 398,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 393,
"src": "8321:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 401,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "8334:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint144_$",
"typeString": "type(uint144)"
},
"typeName": {
"id": 400,
"name": "uint144",
"nodeType": "ElementaryTypeName",
"src": "8334:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint144_$",
"typeString": "type(uint144)"
}
],
"id": 399,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "8329:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 402,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8329:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint144",
"typeString": "type(uint144)"
}
},
"id": 403,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "8343:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "8329:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint144",
"typeString": "uint144"
}
},
"src": "8321:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 411,
"nodeType": "IfStatement",
"src": "8317:105:0",
"trueBody": {
"id": 410,
"nodeType": "Block",
"src": "8348:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313434",
"id": 406,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8400:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_144_by_1",
"typeString": "int_const 144"
},
"value": "144"
},
{
"id": 407,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 393,
"src": "8405:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_144_by_1",
"typeString": "int_const 144"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 405,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "8369:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 408,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8369:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 409,
"nodeType": "RevertStatement",
"src": "8362:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 414,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 393,
"src": "8446:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 413,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "8438:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint144_$",
"typeString": "type(uint144)"
},
"typeName": {
"id": 412,
"name": "uint144",
"nodeType": "ElementaryTypeName",
"src": "8438:7:0",
"typeDescriptions": {}
}
},
"id": 415,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8438:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint144",
"typeString": "uint144"
}
},
"functionReturnParameters": 397,
"id": 416,
"nodeType": "Return",
"src": "8431:21:0"
}
]
},
"documentation": {
"id": 391,
"nodeType": "StructuredDocumentation",
"src": "7956:280:0",
"text": " @dev Returns the downcasted uint144 from uint256, reverting on\n overflow (when the input is greater than largest uint144).\n Counterpart to Solidity's `uint144` operator.\n Requirements:\n - input must fit into 144 bits"
},
"id": 418,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint144",
"nameLocation": "8250:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 394,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 393,
"mutability": "mutable",
"name": "value",
"nameLocation": "8268:5:0",
"nodeType": "VariableDeclaration",
"scope": 418,
"src": "8260:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 392,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8260:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "8259:15:0"
},
"returnParameters": {
"id": 397,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 396,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 418,
"src": "8298:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint144",
"typeString": "uint144"
},
"typeName": {
"id": 395,
"name": "uint144",
"nodeType": "ElementaryTypeName",
"src": "8298:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint144",
"typeString": "uint144"
}
},
"visibility": "internal"
}
],
"src": "8297:9:0"
},
"scope": 1754,
"src": "8241:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 445,
"nodeType": "Block",
"src": "8816:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 432,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 426,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 421,
"src": "8830:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 429,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "8843:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint136_$",
"typeString": "type(uint136)"
},
"typeName": {
"id": 428,
"name": "uint136",
"nodeType": "ElementaryTypeName",
"src": "8843:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint136_$",
"typeString": "type(uint136)"
}
],
"id": 427,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "8838:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 430,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8838:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint136",
"typeString": "type(uint136)"
}
},
"id": 431,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "8852:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "8838:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint136",
"typeString": "uint136"
}
},
"src": "8830:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 439,
"nodeType": "IfStatement",
"src": "8826:105:0",
"trueBody": {
"id": 438,
"nodeType": "Block",
"src": "8857:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313336",
"id": 434,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8909:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_136_by_1",
"typeString": "int_const 136"
},
"value": "136"
},
{
"id": 435,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 421,
"src": "8914:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_136_by_1",
"typeString": "int_const 136"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 433,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "8878:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 436,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8878:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 437,
"nodeType": "RevertStatement",
"src": "8871:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 442,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 421,
"src": "8955:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 441,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "8947:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint136_$",
"typeString": "type(uint136)"
},
"typeName": {
"id": 440,
"name": "uint136",
"nodeType": "ElementaryTypeName",
"src": "8947:7:0",
"typeDescriptions": {}
}
},
"id": 443,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8947:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint136",
"typeString": "uint136"
}
},
"functionReturnParameters": 425,
"id": 444,
"nodeType": "Return",
"src": "8940:21:0"
}
]
},
"documentation": {
"id": 419,
"nodeType": "StructuredDocumentation",
"src": "8465:280:0",
"text": " @dev Returns the downcasted uint136 from uint256, reverting on\n overflow (when the input is greater than largest uint136).\n Counterpart to Solidity's `uint136` operator.\n Requirements:\n - input must fit into 136 bits"
},
"id": 446,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint136",
"nameLocation": "8759:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 422,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 421,
"mutability": "mutable",
"name": "value",
"nameLocation": "8777:5:0",
"nodeType": "VariableDeclaration",
"scope": 446,
"src": "8769:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 420,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8769:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "8768:15:0"
},
"returnParameters": {
"id": 425,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 424,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 446,
"src": "8807:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint136",
"typeString": "uint136"
},
"typeName": {
"id": 423,
"name": "uint136",
"nodeType": "ElementaryTypeName",
"src": "8807:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint136",
"typeString": "uint136"
}
},
"visibility": "internal"
}
],
"src": "8806:9:0"
},
"scope": 1754,
"src": "8750:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 473,
"nodeType": "Block",
"src": "9325:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 460,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 454,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 449,
"src": "9339:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 457,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9352:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint128_$",
"typeString": "type(uint128)"
},
"typeName": {
"id": 456,
"name": "uint128",
"nodeType": "ElementaryTypeName",
"src": "9352:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint128_$",
"typeString": "type(uint128)"
}
],
"id": 455,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "9347:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 458,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9347:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint128",
"typeString": "type(uint128)"
}
},
"id": 459,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "9361:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "9347:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
}
},
"src": "9339:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 467,
"nodeType": "IfStatement",
"src": "9335:105:0",
"trueBody": {
"id": 466,
"nodeType": "Block",
"src": "9366:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313238",
"id": 462,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9418:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
{
"id": 463,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 449,
"src": "9423:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 461,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "9387:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 464,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9387:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 465,
"nodeType": "RevertStatement",
"src": "9380:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 470,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 449,
"src": "9464:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 469,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9456:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint128_$",
"typeString": "type(uint128)"
},
"typeName": {
"id": 468,
"name": "uint128",
"nodeType": "ElementaryTypeName",
"src": "9456:7:0",
"typeDescriptions": {}
}
},
"id": 471,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9456:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
}
},
"functionReturnParameters": 453,
"id": 472,
"nodeType": "Return",
"src": "9449:21:0"
}
]
},
"documentation": {
"id": 447,
"nodeType": "StructuredDocumentation",
"src": "8974:280:0",
"text": " @dev Returns the downcasted uint128 from uint256, reverting on\n overflow (when the input is greater than largest uint128).\n Counterpart to Solidity's `uint128` operator.\n Requirements:\n - input must fit into 128 bits"
},
"id": 474,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint128",
"nameLocation": "9268:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 450,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 449,
"mutability": "mutable",
"name": "value",
"nameLocation": "9286:5:0",
"nodeType": "VariableDeclaration",
"scope": 474,
"src": "9278:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 448,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9278:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "9277:15:0"
},
"returnParameters": {
"id": 453,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 452,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 474,
"src": "9316:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
},
"typeName": {
"id": 451,
"name": "uint128",
"nodeType": "ElementaryTypeName",
"src": "9316:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
}
},
"visibility": "internal"
}
],
"src": "9315:9:0"
},
"scope": 1754,
"src": "9259:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 501,
"nodeType": "Block",
"src": "9834:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 488,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 482,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 477,
"src": "9848:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 485,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9861:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint120_$",
"typeString": "type(uint120)"
},
"typeName": {
"id": 484,
"name": "uint120",
"nodeType": "ElementaryTypeName",
"src": "9861:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint120_$",
"typeString": "type(uint120)"
}
],
"id": 483,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "9856:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 486,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9856:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint120",
"typeString": "type(uint120)"
}
},
"id": 487,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "9870:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "9856:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint120",
"typeString": "uint120"
}
},
"src": "9848:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 495,
"nodeType": "IfStatement",
"src": "9844:105:0",
"trueBody": {
"id": 494,
"nodeType": "Block",
"src": "9875:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313230",
"id": 490,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9927:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_120_by_1",
"typeString": "int_const 120"
},
"value": "120"
},
{
"id": 491,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 477,
"src": "9932:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_120_by_1",
"typeString": "int_const 120"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 489,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "9896:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 492,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9896:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 493,
"nodeType": "RevertStatement",
"src": "9889:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 498,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 477,
"src": "9973:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 497,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9965:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint120_$",
"typeString": "type(uint120)"
},
"typeName": {
"id": 496,
"name": "uint120",
"nodeType": "ElementaryTypeName",
"src": "9965:7:0",
"typeDescriptions": {}
}
},
"id": 499,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9965:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint120",
"typeString": "uint120"
}
},
"functionReturnParameters": 481,
"id": 500,
"nodeType": "Return",
"src": "9958:21:0"
}
]
},
"documentation": {
"id": 475,
"nodeType": "StructuredDocumentation",
"src": "9483:280:0",
"text": " @dev Returns the downcasted uint120 from uint256, reverting on\n overflow (when the input is greater than largest uint120).\n Counterpart to Solidity's `uint120` operator.\n Requirements:\n - input must fit into 120 bits"
},
"id": 502,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint120",
"nameLocation": "9777:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 478,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 477,
"mutability": "mutable",
"name": "value",
"nameLocation": "9795:5:0",
"nodeType": "VariableDeclaration",
"scope": 502,
"src": "9787:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 476,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9787:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "9786:15:0"
},
"returnParameters": {
"id": 481,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 480,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 502,
"src": "9825:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint120",
"typeString": "uint120"
},
"typeName": {
"id": 479,
"name": "uint120",
"nodeType": "ElementaryTypeName",
"src": "9825:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint120",
"typeString": "uint120"
}
},
"visibility": "internal"
}
],
"src": "9824:9:0"
},
"scope": 1754,
"src": "9768:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 529,
"nodeType": "Block",
"src": "10343:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 516,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 510,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 505,
"src": "10357:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 513,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10370:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint112_$",
"typeString": "type(uint112)"
},
"typeName": {
"id": 512,
"name": "uint112",
"nodeType": "ElementaryTypeName",
"src": "10370:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint112_$",
"typeString": "type(uint112)"
}
],
"id": 511,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "10365:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 514,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "10365:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint112",
"typeString": "type(uint112)"
}
},
"id": 515,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "10379:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "10365:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint112",
"typeString": "uint112"
}
},
"src": "10357:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 523,
"nodeType": "IfStatement",
"src": "10353:105:0",
"trueBody": {
"id": 522,
"nodeType": "Block",
"src": "10384:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313132",
"id": 518,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10436:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_112_by_1",
"typeString": "int_const 112"
},
"value": "112"
},
{
"id": 519,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 505,
"src": "10441:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_112_by_1",
"typeString": "int_const 112"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 517,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "10405:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 520,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "10405:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 521,
"nodeType": "RevertStatement",
"src": "10398:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 526,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 505,
"src": "10482:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 525,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10474:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint112_$",
"typeString": "type(uint112)"
},
"typeName": {
"id": 524,
"name": "uint112",
"nodeType": "ElementaryTypeName",
"src": "10474:7:0",
"typeDescriptions": {}
}
},
"id": 527,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "10474:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint112",
"typeString": "uint112"
}
},
"functionReturnParameters": 509,
"id": 528,
"nodeType": "Return",
"src": "10467:21:0"
}
]
},
"documentation": {
"id": 503,
"nodeType": "StructuredDocumentation",
"src": "9992:280:0",
"text": " @dev Returns the downcasted uint112 from uint256, reverting on\n overflow (when the input is greater than largest uint112).\n Counterpart to Solidity's `uint112` operator.\n Requirements:\n - input must fit into 112 bits"
},
"id": 530,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint112",
"nameLocation": "10286:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 506,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 505,
"mutability": "mutable",
"name": "value",
"nameLocation": "10304:5:0",
"nodeType": "VariableDeclaration",
"scope": 530,
"src": "10296:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 504,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10296:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "10295:15:0"
},
"returnParameters": {
"id": 509,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 508,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 530,
"src": "10334:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint112",
"typeString": "uint112"
},
"typeName": {
"id": 507,
"name": "uint112",
"nodeType": "ElementaryTypeName",
"src": "10334:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint112",
"typeString": "uint112"
}
},
"visibility": "internal"
}
],
"src": "10333:9:0"
},
"scope": 1754,
"src": "10277:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 557,
"nodeType": "Block",
"src": "10852:152:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 544,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 538,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 533,
"src": "10866:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 541,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10879:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint104_$",
"typeString": "type(uint104)"
},
"typeName": {
"id": 540,
"name": "uint104",
"nodeType": "ElementaryTypeName",
"src": "10879:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint104_$",
"typeString": "type(uint104)"
}
],
"id": 539,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "10874:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 542,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "10874:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint104",
"typeString": "type(uint104)"
}
},
"id": 543,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "10888:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "10874:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint104",
"typeString": "uint104"
}
},
"src": "10866:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 551,
"nodeType": "IfStatement",
"src": "10862:105:0",
"trueBody": {
"id": 550,
"nodeType": "Block",
"src": "10893:74:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313034",
"id": 546,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10945:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_104_by_1",
"typeString": "int_const 104"
},
"value": "104"
},
{
"id": 547,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 533,
"src": "10950:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_104_by_1",
"typeString": "int_const 104"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 545,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "10914:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 548,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "10914:42:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 549,
"nodeType": "RevertStatement",
"src": "10907:49:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 554,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 533,
"src": "10991:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 553,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10983:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint104_$",
"typeString": "type(uint104)"
},
"typeName": {
"id": 552,
"name": "uint104",
"nodeType": "ElementaryTypeName",
"src": "10983:7:0",
"typeDescriptions": {}
}
},
"id": 555,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "10983:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint104",
"typeString": "uint104"
}
},
"functionReturnParameters": 537,
"id": 556,
"nodeType": "Return",
"src": "10976:21:0"
}
]
},
"documentation": {
"id": 531,
"nodeType": "StructuredDocumentation",
"src": "10501:280:0",
"text": " @dev Returns the downcasted uint104 from uint256, reverting on\n overflow (when the input is greater than largest uint104).\n Counterpart to Solidity's `uint104` operator.\n Requirements:\n - input must fit into 104 bits"
},
"id": 558,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint104",
"nameLocation": "10795:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 534,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 533,
"mutability": "mutable",
"name": "value",
"nameLocation": "10813:5:0",
"nodeType": "VariableDeclaration",
"scope": 558,
"src": "10805:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 532,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10805:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "10804:15:0"
},
"returnParameters": {
"id": 537,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 536,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 558,
"src": "10843:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint104",
"typeString": "uint104"
},
"typeName": {
"id": 535,
"name": "uint104",
"nodeType": "ElementaryTypeName",
"src": "10843:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint104",
"typeString": "uint104"
}
},
"visibility": "internal"
}
],
"src": "10842:9:0"
},
"scope": 1754,
"src": "10786:218:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 585,
"nodeType": "Block",
"src": "11355:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 572,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 566,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 561,
"src": "11369:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 569,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11382:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint96_$",
"typeString": "type(uint96)"
},
"typeName": {
"id": 568,
"name": "uint96",
"nodeType": "ElementaryTypeName",
"src": "11382:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint96_$",
"typeString": "type(uint96)"
}
],
"id": 567,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "11377:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 570,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11377:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint96",
"typeString": "type(uint96)"
}
},
"id": 571,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "11390:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "11377:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint96",
"typeString": "uint96"
}
},
"src": "11369:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 579,
"nodeType": "IfStatement",
"src": "11365:103:0",
"trueBody": {
"id": 578,
"nodeType": "Block",
"src": "11395:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3936",
"id": 574,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11447:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_96_by_1",
"typeString": "int_const 96"
},
"value": "96"
},
{
"id": 575,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 561,
"src": "11451:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_96_by_1",
"typeString": "int_const 96"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 573,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "11416:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 576,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11416:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 577,
"nodeType": "RevertStatement",
"src": "11409:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 582,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 561,
"src": "11491:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 581,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11484:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint96_$",
"typeString": "type(uint96)"
},
"typeName": {
"id": 580,
"name": "uint96",
"nodeType": "ElementaryTypeName",
"src": "11484:6:0",
"typeDescriptions": {}
}
},
"id": 583,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11484:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint96",
"typeString": "uint96"
}
},
"functionReturnParameters": 565,
"id": 584,
"nodeType": "Return",
"src": "11477:20:0"
}
]
},
"documentation": {
"id": 559,
"nodeType": "StructuredDocumentation",
"src": "11010:276:0",
"text": " @dev Returns the downcasted uint96 from uint256, reverting on\n overflow (when the input is greater than largest uint96).\n Counterpart to Solidity's `uint96` operator.\n Requirements:\n - input must fit into 96 bits"
},
"id": 586,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint96",
"nameLocation": "11300:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 562,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 561,
"mutability": "mutable",
"name": "value",
"nameLocation": "11317:5:0",
"nodeType": "VariableDeclaration",
"scope": 586,
"src": "11309:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 560,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11309:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "11308:15:0"
},
"returnParameters": {
"id": 565,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 564,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 586,
"src": "11347:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint96",
"typeString": "uint96"
},
"typeName": {
"id": 563,
"name": "uint96",
"nodeType": "ElementaryTypeName",
"src": "11347:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint96",
"typeString": "uint96"
}
},
"visibility": "internal"
}
],
"src": "11346:8:0"
},
"scope": 1754,
"src": "11291:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 613,
"nodeType": "Block",
"src": "11855:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 600,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 594,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 589,
"src": "11869:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 597,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11882:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint88_$",
"typeString": "type(uint88)"
},
"typeName": {
"id": 596,
"name": "uint88",
"nodeType": "ElementaryTypeName",
"src": "11882:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint88_$",
"typeString": "type(uint88)"
}
],
"id": 595,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "11877:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 598,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11877:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint88",
"typeString": "type(uint88)"
}
},
"id": 599,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "11890:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "11877:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint88",
"typeString": "uint88"
}
},
"src": "11869:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 607,
"nodeType": "IfStatement",
"src": "11865:103:0",
"trueBody": {
"id": 606,
"nodeType": "Block",
"src": "11895:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3838",
"id": 602,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11947:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_88_by_1",
"typeString": "int_const 88"
},
"value": "88"
},
{
"id": 603,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 589,
"src": "11951:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_88_by_1",
"typeString": "int_const 88"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 601,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "11916:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 604,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11916:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 605,
"nodeType": "RevertStatement",
"src": "11909:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 610,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 589,
"src": "11991:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 609,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11984:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint88_$",
"typeString": "type(uint88)"
},
"typeName": {
"id": 608,
"name": "uint88",
"nodeType": "ElementaryTypeName",
"src": "11984:6:0",
"typeDescriptions": {}
}
},
"id": 611,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11984:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint88",
"typeString": "uint88"
}
},
"functionReturnParameters": 593,
"id": 612,
"nodeType": "Return",
"src": "11977:20:0"
}
]
},
"documentation": {
"id": 587,
"nodeType": "StructuredDocumentation",
"src": "11510:276:0",
"text": " @dev Returns the downcasted uint88 from uint256, reverting on\n overflow (when the input is greater than largest uint88).\n Counterpart to Solidity's `uint88` operator.\n Requirements:\n - input must fit into 88 bits"
},
"id": 614,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint88",
"nameLocation": "11800:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 590,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 589,
"mutability": "mutable",
"name": "value",
"nameLocation": "11817:5:0",
"nodeType": "VariableDeclaration",
"scope": 614,
"src": "11809:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 588,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11809:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "11808:15:0"
},
"returnParameters": {
"id": 593,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 592,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 614,
"src": "11847:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint88",
"typeString": "uint88"
},
"typeName": {
"id": 591,
"name": "uint88",
"nodeType": "ElementaryTypeName",
"src": "11847:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint88",
"typeString": "uint88"
}
},
"visibility": "internal"
}
],
"src": "11846:8:0"
},
"scope": 1754,
"src": "11791:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 641,
"nodeType": "Block",
"src": "12355:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 628,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 622,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 617,
"src": "12369:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 625,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12382:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint80_$",
"typeString": "type(uint80)"
},
"typeName": {
"id": 624,
"name": "uint80",
"nodeType": "ElementaryTypeName",
"src": "12382:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint80_$",
"typeString": "type(uint80)"
}
],
"id": 623,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "12377:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 626,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12377:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint80",
"typeString": "type(uint80)"
}
},
"id": 627,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "12390:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "12377:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
}
},
"src": "12369:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 635,
"nodeType": "IfStatement",
"src": "12365:103:0",
"trueBody": {
"id": 634,
"nodeType": "Block",
"src": "12395:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3830",
"id": 630,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12447:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_80_by_1",
"typeString": "int_const 80"
},
"value": "80"
},
{
"id": 631,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 617,
"src": "12451:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_80_by_1",
"typeString": "int_const 80"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 629,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "12416:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 632,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12416:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 633,
"nodeType": "RevertStatement",
"src": "12409:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 638,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 617,
"src": "12491:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 637,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12484:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint80_$",
"typeString": "type(uint80)"
},
"typeName": {
"id": 636,
"name": "uint80",
"nodeType": "ElementaryTypeName",
"src": "12484:6:0",
"typeDescriptions": {}
}
},
"id": 639,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12484:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
}
},
"functionReturnParameters": 621,
"id": 640,
"nodeType": "Return",
"src": "12477:20:0"
}
]
},
"documentation": {
"id": 615,
"nodeType": "StructuredDocumentation",
"src": "12010:276:0",
"text": " @dev Returns the downcasted uint80 from uint256, reverting on\n overflow (when the input is greater than largest uint80).\n Counterpart to Solidity's `uint80` operator.\n Requirements:\n - input must fit into 80 bits"
},
"id": 642,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint80",
"nameLocation": "12300:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 618,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 617,
"mutability": "mutable",
"name": "value",
"nameLocation": "12317:5:0",
"nodeType": "VariableDeclaration",
"scope": 642,
"src": "12309:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 616,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "12309:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "12308:15:0"
},
"returnParameters": {
"id": 621,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 620,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 642,
"src": "12347:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
},
"typeName": {
"id": 619,
"name": "uint80",
"nodeType": "ElementaryTypeName",
"src": "12347:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
}
},
"visibility": "internal"
}
],
"src": "12346:8:0"
},
"scope": 1754,
"src": "12291:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 669,
"nodeType": "Block",
"src": "12855:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 656,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 650,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 645,
"src": "12869:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 653,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12882:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint72_$",
"typeString": "type(uint72)"
},
"typeName": {
"id": 652,
"name": "uint72",
"nodeType": "ElementaryTypeName",
"src": "12882:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint72_$",
"typeString": "type(uint72)"
}
],
"id": 651,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "12877:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 654,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12877:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint72",
"typeString": "type(uint72)"
}
},
"id": 655,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "12890:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "12877:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint72",
"typeString": "uint72"
}
},
"src": "12869:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 663,
"nodeType": "IfStatement",
"src": "12865:103:0",
"trueBody": {
"id": 662,
"nodeType": "Block",
"src": "12895:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3732",
"id": 658,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12947:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_72_by_1",
"typeString": "int_const 72"
},
"value": "72"
},
{
"id": 659,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 645,
"src": "12951:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_72_by_1",
"typeString": "int_const 72"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 657,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "12916:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 660,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12916:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 661,
"nodeType": "RevertStatement",
"src": "12909:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 666,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 645,
"src": "12991:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 665,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12984:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint72_$",
"typeString": "type(uint72)"
},
"typeName": {
"id": 664,
"name": "uint72",
"nodeType": "ElementaryTypeName",
"src": "12984:6:0",
"typeDescriptions": {}
}
},
"id": 667,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12984:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint72",
"typeString": "uint72"
}
},
"functionReturnParameters": 649,
"id": 668,
"nodeType": "Return",
"src": "12977:20:0"
}
]
},
"documentation": {
"id": 643,
"nodeType": "StructuredDocumentation",
"src": "12510:276:0",
"text": " @dev Returns the downcasted uint72 from uint256, reverting on\n overflow (when the input is greater than largest uint72).\n Counterpart to Solidity's `uint72` operator.\n Requirements:\n - input must fit into 72 bits"
},
"id": 670,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint72",
"nameLocation": "12800:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 646,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 645,
"mutability": "mutable",
"name": "value",
"nameLocation": "12817:5:0",
"nodeType": "VariableDeclaration",
"scope": 670,
"src": "12809:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 644,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "12809:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "12808:15:0"
},
"returnParameters": {
"id": 649,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 648,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 670,
"src": "12847:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint72",
"typeString": "uint72"
},
"typeName": {
"id": 647,
"name": "uint72",
"nodeType": "ElementaryTypeName",
"src": "12847:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint72",
"typeString": "uint72"
}
},
"visibility": "internal"
}
],
"src": "12846:8:0"
},
"scope": 1754,
"src": "12791:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 697,
"nodeType": "Block",
"src": "13355:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 684,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 678,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 673,
"src": "13369:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 681,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "13382:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint64_$",
"typeString": "type(uint64)"
},
"typeName": {
"id": 680,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "13382:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint64_$",
"typeString": "type(uint64)"
}
],
"id": 679,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "13377:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 682,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13377:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint64",
"typeString": "type(uint64)"
}
},
"id": 683,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "13390:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "13377:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"src": "13369:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 691,
"nodeType": "IfStatement",
"src": "13365:103:0",
"trueBody": {
"id": 690,
"nodeType": "Block",
"src": "13395:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3634",
"id": 686,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13447:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
{
"id": 687,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 673,
"src": "13451:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 685,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "13416:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 688,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13416:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 689,
"nodeType": "RevertStatement",
"src": "13409:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 694,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 673,
"src": "13491:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 693,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "13484:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint64_$",
"typeString": "type(uint64)"
},
"typeName": {
"id": 692,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "13484:6:0",
"typeDescriptions": {}
}
},
"id": 695,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13484:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"functionReturnParameters": 677,
"id": 696,
"nodeType": "Return",
"src": "13477:20:0"
}
]
},
"documentation": {
"id": 671,
"nodeType": "StructuredDocumentation",
"src": "13010:276:0",
"text": " @dev Returns the downcasted uint64 from uint256, reverting on\n overflow (when the input is greater than largest uint64).\n Counterpart to Solidity's `uint64` operator.\n Requirements:\n - input must fit into 64 bits"
},
"id": 698,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint64",
"nameLocation": "13300:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 674,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 673,
"mutability": "mutable",
"name": "value",
"nameLocation": "13317:5:0",
"nodeType": "VariableDeclaration",
"scope": 698,
"src": "13309:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 672,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "13309:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "13308:15:0"
},
"returnParameters": {
"id": 677,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 676,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 698,
"src": "13347:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 675,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "13347:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"src": "13346:8:0"
},
"scope": 1754,
"src": "13291:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 725,
"nodeType": "Block",
"src": "13855:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 712,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 706,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 701,
"src": "13869:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 709,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "13882:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint56_$",
"typeString": "type(uint56)"
},
"typeName": {
"id": 708,
"name": "uint56",
"nodeType": "ElementaryTypeName",
"src": "13882:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint56_$",
"typeString": "type(uint56)"
}
],
"id": 707,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "13877:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 710,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13877:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint56",
"typeString": "type(uint56)"
}
},
"id": 711,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "13890:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "13877:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint56",
"typeString": "uint56"
}
},
"src": "13869:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 719,
"nodeType": "IfStatement",
"src": "13865:103:0",
"trueBody": {
"id": 718,
"nodeType": "Block",
"src": "13895:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3536",
"id": 714,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13947:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_56_by_1",
"typeString": "int_const 56"
},
"value": "56"
},
{
"id": 715,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 701,
"src": "13951:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_56_by_1",
"typeString": "int_const 56"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 713,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "13916:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 716,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13916:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 717,
"nodeType": "RevertStatement",
"src": "13909:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 722,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 701,
"src": "13991:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 721,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "13984:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint56_$",
"typeString": "type(uint56)"
},
"typeName": {
"id": 720,
"name": "uint56",
"nodeType": "ElementaryTypeName",
"src": "13984:6:0",
"typeDescriptions": {}
}
},
"id": 723,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13984:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint56",
"typeString": "uint56"
}
},
"functionReturnParameters": 705,
"id": 724,
"nodeType": "Return",
"src": "13977:20:0"
}
]
},
"documentation": {
"id": 699,
"nodeType": "StructuredDocumentation",
"src": "13510:276:0",
"text": " @dev Returns the downcasted uint56 from uint256, reverting on\n overflow (when the input is greater than largest uint56).\n Counterpart to Solidity's `uint56` operator.\n Requirements:\n - input must fit into 56 bits"
},
"id": 726,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint56",
"nameLocation": "13800:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 702,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 701,
"mutability": "mutable",
"name": "value",
"nameLocation": "13817:5:0",
"nodeType": "VariableDeclaration",
"scope": 726,
"src": "13809:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 700,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "13809:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "13808:15:0"
},
"returnParameters": {
"id": 705,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 704,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 726,
"src": "13847:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint56",
"typeString": "uint56"
},
"typeName": {
"id": 703,
"name": "uint56",
"nodeType": "ElementaryTypeName",
"src": "13847:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint56",
"typeString": "uint56"
}
},
"visibility": "internal"
}
],
"src": "13846:8:0"
},
"scope": 1754,
"src": "13791:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 753,
"nodeType": "Block",
"src": "14355:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 734,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 729,
"src": "14369:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 737,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "14382:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint48_$",
"typeString": "type(uint48)"
},
"typeName": {
"id": 736,
"name": "uint48",
"nodeType": "ElementaryTypeName",
"src": "14382:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint48_$",
"typeString": "type(uint48)"
}
],
"id": 735,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "14377:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 738,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "14377:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint48",
"typeString": "type(uint48)"
}
},
"id": 739,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "14390:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "14377:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint48",
"typeString": "uint48"
}
},
"src": "14369:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 747,
"nodeType": "IfStatement",
"src": "14365:103:0",
"trueBody": {
"id": 746,
"nodeType": "Block",
"src": "14395:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3438",
"id": 742,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14447:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_48_by_1",
"typeString": "int_const 48"
},
"value": "48"
},
{
"id": 743,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 729,
"src": "14451:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_48_by_1",
"typeString": "int_const 48"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 741,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "14416:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 744,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "14416:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 745,
"nodeType": "RevertStatement",
"src": "14409:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 750,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 729,
"src": "14491:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 749,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "14484:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint48_$",
"typeString": "type(uint48)"
},
"typeName": {
"id": 748,
"name": "uint48",
"nodeType": "ElementaryTypeName",
"src": "14484:6:0",
"typeDescriptions": {}
}
},
"id": 751,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "14484:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint48",
"typeString": "uint48"
}
},
"functionReturnParameters": 733,
"id": 752,
"nodeType": "Return",
"src": "14477:20:0"
}
]
},
"documentation": {
"id": 727,
"nodeType": "StructuredDocumentation",
"src": "14010:276:0",
"text": " @dev Returns the downcasted uint48 from uint256, reverting on\n overflow (when the input is greater than largest uint48).\n Counterpart to Solidity's `uint48` operator.\n Requirements:\n - input must fit into 48 bits"
},
"id": 754,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint48",
"nameLocation": "14300:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 730,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 729,
"mutability": "mutable",
"name": "value",
"nameLocation": "14317:5:0",
"nodeType": "VariableDeclaration",
"scope": 754,
"src": "14309:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 728,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "14309:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "14308:15:0"
},
"returnParameters": {
"id": 733,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 732,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 754,
"src": "14347:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint48",
"typeString": "uint48"
},
"typeName": {
"id": 731,
"name": "uint48",
"nodeType": "ElementaryTypeName",
"src": "14347:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint48",
"typeString": "uint48"
}
},
"visibility": "internal"
}
],
"src": "14346:8:0"
},
"scope": 1754,
"src": "14291:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 781,
"nodeType": "Block",
"src": "14855:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 768,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 762,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 757,
"src": "14869:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 765,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "14882:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint40_$",
"typeString": "type(uint40)"
},
"typeName": {
"id": 764,
"name": "uint40",
"nodeType": "ElementaryTypeName",
"src": "14882:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint40_$",
"typeString": "type(uint40)"
}
],
"id": 763,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "14877:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 766,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "14877:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint40",
"typeString": "type(uint40)"
}
},
"id": 767,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "14890:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "14877:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint40",
"typeString": "uint40"
}
},
"src": "14869:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 775,
"nodeType": "IfStatement",
"src": "14865:103:0",
"trueBody": {
"id": 774,
"nodeType": "Block",
"src": "14895:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3430",
"id": 770,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14947:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_40_by_1",
"typeString": "int_const 40"
},
"value": "40"
},
{
"id": 771,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 757,
"src": "14951:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_40_by_1",
"typeString": "int_const 40"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 769,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "14916:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 772,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "14916:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 773,
"nodeType": "RevertStatement",
"src": "14909:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 778,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 757,
"src": "14991:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 777,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "14984:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint40_$",
"typeString": "type(uint40)"
},
"typeName": {
"id": 776,
"name": "uint40",
"nodeType": "ElementaryTypeName",
"src": "14984:6:0",
"typeDescriptions": {}
}
},
"id": 779,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "14984:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint40",
"typeString": "uint40"
}
},
"functionReturnParameters": 761,
"id": 780,
"nodeType": "Return",
"src": "14977:20:0"
}
]
},
"documentation": {
"id": 755,
"nodeType": "StructuredDocumentation",
"src": "14510:276:0",
"text": " @dev Returns the downcasted uint40 from uint256, reverting on\n overflow (when the input is greater than largest uint40).\n Counterpart to Solidity's `uint40` operator.\n Requirements:\n - input must fit into 40 bits"
},
"id": 782,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint40",
"nameLocation": "14800:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 758,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 757,
"mutability": "mutable",
"name": "value",
"nameLocation": "14817:5:0",
"nodeType": "VariableDeclaration",
"scope": 782,
"src": "14809:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 756,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "14809:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "14808:15:0"
},
"returnParameters": {
"id": 761,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 760,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 782,
"src": "14847:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint40",
"typeString": "uint40"
},
"typeName": {
"id": 759,
"name": "uint40",
"nodeType": "ElementaryTypeName",
"src": "14847:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint40",
"typeString": "uint40"
}
},
"visibility": "internal"
}
],
"src": "14846:8:0"
},
"scope": 1754,
"src": "14791:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 809,
"nodeType": "Block",
"src": "15355:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 796,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 790,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 785,
"src": "15369:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 793,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "15382:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint32_$",
"typeString": "type(uint32)"
},
"typeName": {
"id": 792,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "15382:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint32_$",
"typeString": "type(uint32)"
}
],
"id": 791,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "15377:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 794,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "15377:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint32",
"typeString": "type(uint32)"
}
},
"id": 795,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "15390:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "15377:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "15369:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 803,
"nodeType": "IfStatement",
"src": "15365:103:0",
"trueBody": {
"id": 802,
"nodeType": "Block",
"src": "15395:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3332",
"id": 798,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15447:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
{
"id": 799,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 785,
"src": "15451:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 797,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "15416:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 800,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "15416:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 801,
"nodeType": "RevertStatement",
"src": "15409:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 806,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 785,
"src": "15491:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 805,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "15484:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint32_$",
"typeString": "type(uint32)"
},
"typeName": {
"id": 804,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "15484:6:0",
"typeDescriptions": {}
}
},
"id": 807,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "15484:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"functionReturnParameters": 789,
"id": 808,
"nodeType": "Return",
"src": "15477:20:0"
}
]
},
"documentation": {
"id": 783,
"nodeType": "StructuredDocumentation",
"src": "15010:276:0",
"text": " @dev Returns the downcasted uint32 from uint256, reverting on\n overflow (when the input is greater than largest uint32).\n Counterpart to Solidity's `uint32` operator.\n Requirements:\n - input must fit into 32 bits"
},
"id": 810,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint32",
"nameLocation": "15300:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 786,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 785,
"mutability": "mutable",
"name": "value",
"nameLocation": "15317:5:0",
"nodeType": "VariableDeclaration",
"scope": 810,
"src": "15309:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 784,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "15309:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "15308:15:0"
},
"returnParameters": {
"id": 789,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 788,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 810,
"src": "15347:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 787,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "15347:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"visibility": "internal"
}
],
"src": "15346:8:0"
},
"scope": 1754,
"src": "15291:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 837,
"nodeType": "Block",
"src": "15855:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 824,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 818,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 813,
"src": "15869:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 821,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "15882:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint24_$",
"typeString": "type(uint24)"
},
"typeName": {
"id": 820,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "15882:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint24_$",
"typeString": "type(uint24)"
}
],
"id": 819,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "15877:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 822,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "15877:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint24",
"typeString": "type(uint24)"
}
},
"id": 823,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "15890:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "15877:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"src": "15869:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 831,
"nodeType": "IfStatement",
"src": "15865:103:0",
"trueBody": {
"id": 830,
"nodeType": "Block",
"src": "15895:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3234",
"id": 826,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15947:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_24_by_1",
"typeString": "int_const 24"
},
"value": "24"
},
{
"id": 827,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 813,
"src": "15951:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_24_by_1",
"typeString": "int_const 24"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 825,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "15916:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 828,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "15916:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 829,
"nodeType": "RevertStatement",
"src": "15909:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 834,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 813,
"src": "15991:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 833,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "15984:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint24_$",
"typeString": "type(uint24)"
},
"typeName": {
"id": 832,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "15984:6:0",
"typeDescriptions": {}
}
},
"id": 835,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "15984:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"functionReturnParameters": 817,
"id": 836,
"nodeType": "Return",
"src": "15977:20:0"
}
]
},
"documentation": {
"id": 811,
"nodeType": "StructuredDocumentation",
"src": "15510:276:0",
"text": " @dev Returns the downcasted uint24 from uint256, reverting on\n overflow (when the input is greater than largest uint24).\n Counterpart to Solidity's `uint24` operator.\n Requirements:\n - input must fit into 24 bits"
},
"id": 838,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint24",
"nameLocation": "15800:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 814,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 813,
"mutability": "mutable",
"name": "value",
"nameLocation": "15817:5:0",
"nodeType": "VariableDeclaration",
"scope": 838,
"src": "15809:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 812,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "15809:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "15808:15:0"
},
"returnParameters": {
"id": 817,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 816,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 838,
"src": "15847:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 815,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "15847:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
}
],
"src": "15846:8:0"
},
"scope": 1754,
"src": "15791:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 865,
"nodeType": "Block",
"src": "16355:149:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 852,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 846,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 841,
"src": "16369:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 849,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "16382:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint16_$",
"typeString": "type(uint16)"
},
"typeName": {
"id": 848,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "16382:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint16_$",
"typeString": "type(uint16)"
}
],
"id": 847,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "16377:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 850,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "16377:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint16",
"typeString": "type(uint16)"
}
},
"id": 851,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "16390:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "16377:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "16369:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 859,
"nodeType": "IfStatement",
"src": "16365:103:0",
"trueBody": {
"id": 858,
"nodeType": "Block",
"src": "16395:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3136",
"id": 854,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16447:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
{
"id": 855,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 841,
"src": "16451:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 853,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "16416:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 856,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "16416:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 857,
"nodeType": "RevertStatement",
"src": "16409:48:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 862,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 841,
"src": "16491:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 861,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "16484:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint16_$",
"typeString": "type(uint16)"
},
"typeName": {
"id": 860,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "16484:6:0",
"typeDescriptions": {}
}
},
"id": 863,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "16484:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"functionReturnParameters": 845,
"id": 864,
"nodeType": "Return",
"src": "16477:20:0"
}
]
},
"documentation": {
"id": 839,
"nodeType": "StructuredDocumentation",
"src": "16010:276:0",
"text": " @dev Returns the downcasted uint16 from uint256, reverting on\n overflow (when the input is greater than largest uint16).\n Counterpart to Solidity's `uint16` operator.\n Requirements:\n - input must fit into 16 bits"
},
"id": 866,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint16",
"nameLocation": "16300:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 842,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 841,
"mutability": "mutable",
"name": "value",
"nameLocation": "16317:5:0",
"nodeType": "VariableDeclaration",
"scope": 866,
"src": "16309:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 840,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "16309:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "16308:15:0"
},
"returnParameters": {
"id": 845,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 844,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 866,
"src": "16347:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 843,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "16347:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"visibility": "internal"
}
],
"src": "16346:8:0"
},
"scope": 1754,
"src": "16291:213:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 893,
"nodeType": "Block",
"src": "16849:146:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 880,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 874,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 869,
"src": "16863:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 877,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "16876:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
},
"typeName": {
"id": 876,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "16876:5:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
}
],
"id": 875,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "16871:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 878,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "16871:11:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint8",
"typeString": "type(uint8)"
}
},
"id": 879,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "16883:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "16871:15:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "16863:23:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 887,
"nodeType": "IfStatement",
"src": "16859:101:0",
"trueBody": {
"id": 886,
"nodeType": "Block",
"src": "16888:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "38",
"id": 882,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16940:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
{
"id": 883,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 869,
"src": "16943:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 881,
"name": "SafeCastOverflowedUintDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "16909:30:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint8,uint256) pure returns (error)"
}
},
"id": 884,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "16909:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 885,
"nodeType": "RevertStatement",
"src": "16902:47:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 890,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 869,
"src": "16982:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 889,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "16976:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
},
"typeName": {
"id": 888,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "16976:5:0",
"typeDescriptions": {}
}
},
"id": 891,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "16976:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"functionReturnParameters": 873,
"id": 892,
"nodeType": "Return",
"src": "16969:19:0"
}
]
},
"documentation": {
"id": 867,
"nodeType": "StructuredDocumentation",
"src": "16510:272:0",
"text": " @dev Returns the downcasted uint8 from uint256, reverting on\n overflow (when the input is greater than largest uint8).\n Counterpart to Solidity's `uint8` operator.\n Requirements:\n - input must fit into 8 bits"
},
"id": 894,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint8",
"nameLocation": "16796:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 870,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 869,
"mutability": "mutable",
"name": "value",
"nameLocation": "16812:5:0",
"nodeType": "VariableDeclaration",
"scope": 894,
"src": "16804:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 868,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "16804:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "16803:15:0"
},
"returnParameters": {
"id": 873,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 872,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 894,
"src": "16842:5:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 871,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "16842:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"src": "16841:7:0"
},
"scope": 1754,
"src": "16787:208:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 916,
"nodeType": "Block",
"src": "17231:128:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 904,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 902,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 897,
"src": "17245:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"hexValue": "30",
"id": 903,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "17253:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "17245:9:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 910,
"nodeType": "IfStatement",
"src": "17241:81:0",
"trueBody": {
"id": 909,
"nodeType": "Block",
"src": "17256:66:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"id": 906,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 897,
"src": "17305:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 905,
"name": "SafeCastOverflowedIntToUint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14,
"src": "17277:27:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_int256_$returns$_t_error_$",
"typeString": "function (int256) pure returns (error)"
}
},
"id": 907,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "17277:34:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 908,
"nodeType": "RevertStatement",
"src": "17270:41:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 913,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 897,
"src": "17346:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 912,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "17338:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 911,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "17338:7:0",
"typeDescriptions": {}
}
},
"id": 914,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "17338:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 901,
"id": 915,
"nodeType": "Return",
"src": "17331:21:0"
}
]
},
"documentation": {
"id": 895,
"nodeType": "StructuredDocumentation",
"src": "17001:160:0",
"text": " @dev Converts a signed int256 into an unsigned uint256.\n Requirements:\n - input must be greater than or equal to 0."
},
"id": 917,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint256",
"nameLocation": "17175:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 898,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 897,
"mutability": "mutable",
"name": "value",
"nameLocation": "17192:5:0",
"nodeType": "VariableDeclaration",
"scope": 917,
"src": "17185:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 896,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "17185:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "17184:14:0"
},
"returnParameters": {
"id": 901,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 900,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 917,
"src": "17222:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 899,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "17222:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "17221:9:0"
},
"scope": 1754,
"src": "17166:193:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 942,
"nodeType": "Block",
"src": "17756:150:0",
"statements": [
{
"expression": {
"id": 930,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 925,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 923,
"src": "17766:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int248",
"typeString": "int248"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 928,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 920,
"src": "17786:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 927,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "17779:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int248_$",
"typeString": "type(int248)"
},
"typeName": {
"id": 926,
"name": "int248",
"nodeType": "ElementaryTypeName",
"src": "17779:6:0",
"typeDescriptions": {}
}
},
"id": 929,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "17779:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int248",
"typeString": "int248"
}
},
"src": "17766:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int248",
"typeString": "int248"
}
},
"id": 931,
"nodeType": "ExpressionStatement",
"src": "17766:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 934,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 932,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 923,
"src": "17806:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int248",
"typeString": "int248"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 933,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 920,
"src": "17820:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "17806:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 941,
"nodeType": "IfStatement",
"src": "17802:98:0",
"trueBody": {
"id": 940,
"nodeType": "Block",
"src": "17827:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323438",
"id": 936,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "17878:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_248_by_1",
"typeString": "int_const 248"
},
"value": "248"
},
{
"id": 937,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 920,
"src": "17883:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_248_by_1",
"typeString": "int_const 248"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 935,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "17848:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 938,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "17848:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 939,
"nodeType": "RevertStatement",
"src": "17841:48:0"
}
]
}
}
]
},
"documentation": {
"id": 918,
"nodeType": "StructuredDocumentation",
"src": "17365:312:0",
"text": " @dev Returns the downcasted int248 from int256, reverting on\n overflow (when the input is less than smallest int248 or\n greater than largest int248).\n Counterpart to Solidity's `int248` operator.\n Requirements:\n - input must fit into 248 bits"
},
"id": 943,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt248",
"nameLocation": "17691:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 921,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 920,
"mutability": "mutable",
"name": "value",
"nameLocation": "17707:5:0",
"nodeType": "VariableDeclaration",
"scope": 943,
"src": "17700:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 919,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "17700:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "17699:14:0"
},
"returnParameters": {
"id": 924,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 923,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "17744:10:0",
"nodeType": "VariableDeclaration",
"scope": 943,
"src": "17737:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int248",
"typeString": "int248"
},
"typeName": {
"id": 922,
"name": "int248",
"nodeType": "ElementaryTypeName",
"src": "17737:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int248",
"typeString": "int248"
}
},
"visibility": "internal"
}
],
"src": "17736:19:0"
},
"scope": 1754,
"src": "17682:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 968,
"nodeType": "Block",
"src": "18303:150:0",
"statements": [
{
"expression": {
"id": 956,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 951,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 949,
"src": "18313:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int240",
"typeString": "int240"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 954,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 946,
"src": "18333:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 953,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "18326:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int240_$",
"typeString": "type(int240)"
},
"typeName": {
"id": 952,
"name": "int240",
"nodeType": "ElementaryTypeName",
"src": "18326:6:0",
"typeDescriptions": {}
}
},
"id": 955,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "18326:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int240",
"typeString": "int240"
}
},
"src": "18313:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int240",
"typeString": "int240"
}
},
"id": 957,
"nodeType": "ExpressionStatement",
"src": "18313:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 960,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 958,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 949,
"src": "18353:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int240",
"typeString": "int240"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 959,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 946,
"src": "18367:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "18353:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 967,
"nodeType": "IfStatement",
"src": "18349:98:0",
"trueBody": {
"id": 966,
"nodeType": "Block",
"src": "18374:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323430",
"id": 962,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18425:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_240_by_1",
"typeString": "int_const 240"
},
"value": "240"
},
{
"id": 963,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 946,
"src": "18430:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_240_by_1",
"typeString": "int_const 240"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 961,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "18395:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 964,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "18395:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 965,
"nodeType": "RevertStatement",
"src": "18388:48:0"
}
]
}
}
]
},
"documentation": {
"id": 944,
"nodeType": "StructuredDocumentation",
"src": "17912:312:0",
"text": " @dev Returns the downcasted int240 from int256, reverting on\n overflow (when the input is less than smallest int240 or\n greater than largest int240).\n Counterpart to Solidity's `int240` operator.\n Requirements:\n - input must fit into 240 bits"
},
"id": 969,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt240",
"nameLocation": "18238:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 947,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 946,
"mutability": "mutable",
"name": "value",
"nameLocation": "18254:5:0",
"nodeType": "VariableDeclaration",
"scope": 969,
"src": "18247:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 945,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "18247:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "18246:14:0"
},
"returnParameters": {
"id": 950,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 949,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "18291:10:0",
"nodeType": "VariableDeclaration",
"scope": 969,
"src": "18284:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int240",
"typeString": "int240"
},
"typeName": {
"id": 948,
"name": "int240",
"nodeType": "ElementaryTypeName",
"src": "18284:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int240",
"typeString": "int240"
}
},
"visibility": "internal"
}
],
"src": "18283:19:0"
},
"scope": 1754,
"src": "18229:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 994,
"nodeType": "Block",
"src": "18850:150:0",
"statements": [
{
"expression": {
"id": 982,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 977,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 975,
"src": "18860:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int232",
"typeString": "int232"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 980,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 972,
"src": "18880:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 979,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "18873:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int232_$",
"typeString": "type(int232)"
},
"typeName": {
"id": 978,
"name": "int232",
"nodeType": "ElementaryTypeName",
"src": "18873:6:0",
"typeDescriptions": {}
}
},
"id": 981,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "18873:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int232",
"typeString": "int232"
}
},
"src": "18860:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int232",
"typeString": "int232"
}
},
"id": 983,
"nodeType": "ExpressionStatement",
"src": "18860:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 986,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 984,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 975,
"src": "18900:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int232",
"typeString": "int232"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 985,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 972,
"src": "18914:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "18900:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 993,
"nodeType": "IfStatement",
"src": "18896:98:0",
"trueBody": {
"id": 992,
"nodeType": "Block",
"src": "18921:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323332",
"id": 988,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18972:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_232_by_1",
"typeString": "int_const 232"
},
"value": "232"
},
{
"id": 989,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 972,
"src": "18977:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_232_by_1",
"typeString": "int_const 232"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 987,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "18942:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 990,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "18942:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 991,
"nodeType": "RevertStatement",
"src": "18935:48:0"
}
]
}
}
]
},
"documentation": {
"id": 970,
"nodeType": "StructuredDocumentation",
"src": "18459:312:0",
"text": " @dev Returns the downcasted int232 from int256, reverting on\n overflow (when the input is less than smallest int232 or\n greater than largest int232).\n Counterpart to Solidity's `int232` operator.\n Requirements:\n - input must fit into 232 bits"
},
"id": 995,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt232",
"nameLocation": "18785:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 973,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 972,
"mutability": "mutable",
"name": "value",
"nameLocation": "18801:5:0",
"nodeType": "VariableDeclaration",
"scope": 995,
"src": "18794:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 971,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "18794:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "18793:14:0"
},
"returnParameters": {
"id": 976,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 975,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "18838:10:0",
"nodeType": "VariableDeclaration",
"scope": 995,
"src": "18831:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int232",
"typeString": "int232"
},
"typeName": {
"id": 974,
"name": "int232",
"nodeType": "ElementaryTypeName",
"src": "18831:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int232",
"typeString": "int232"
}
},
"visibility": "internal"
}
],
"src": "18830:19:0"
},
"scope": 1754,
"src": "18776:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1020,
"nodeType": "Block",
"src": "19397:150:0",
"statements": [
{
"expression": {
"id": 1008,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1003,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "19407:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int224",
"typeString": "int224"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1006,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 998,
"src": "19427:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1005,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "19420:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int224_$",
"typeString": "type(int224)"
},
"typeName": {
"id": 1004,
"name": "int224",
"nodeType": "ElementaryTypeName",
"src": "19420:6:0",
"typeDescriptions": {}
}
},
"id": 1007,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "19420:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int224",
"typeString": "int224"
}
},
"src": "19407:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int224",
"typeString": "int224"
}
},
"id": 1009,
"nodeType": "ExpressionStatement",
"src": "19407:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1012,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1010,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "19447:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int224",
"typeString": "int224"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1011,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 998,
"src": "19461:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "19447:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1019,
"nodeType": "IfStatement",
"src": "19443:98:0",
"trueBody": {
"id": 1018,
"nodeType": "Block",
"src": "19468:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323234",
"id": 1014,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "19519:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_224_by_1",
"typeString": "int_const 224"
},
"value": "224"
},
{
"id": 1015,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 998,
"src": "19524:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_224_by_1",
"typeString": "int_const 224"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1013,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "19489:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1016,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "19489:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1017,
"nodeType": "RevertStatement",
"src": "19482:48:0"
}
]
}
}
]
},
"documentation": {
"id": 996,
"nodeType": "StructuredDocumentation",
"src": "19006:312:0",
"text": " @dev Returns the downcasted int224 from int256, reverting on\n overflow (when the input is less than smallest int224 or\n greater than largest int224).\n Counterpart to Solidity's `int224` operator.\n Requirements:\n - input must fit into 224 bits"
},
"id": 1021,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt224",
"nameLocation": "19332:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 999,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 998,
"mutability": "mutable",
"name": "value",
"nameLocation": "19348:5:0",
"nodeType": "VariableDeclaration",
"scope": 1021,
"src": "19341:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 997,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "19341:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "19340:14:0"
},
"returnParameters": {
"id": 1002,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1001,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "19385:10:0",
"nodeType": "VariableDeclaration",
"scope": 1021,
"src": "19378:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int224",
"typeString": "int224"
},
"typeName": {
"id": 1000,
"name": "int224",
"nodeType": "ElementaryTypeName",
"src": "19378:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int224",
"typeString": "int224"
}
},
"visibility": "internal"
}
],
"src": "19377:19:0"
},
"scope": 1754,
"src": "19323:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1046,
"nodeType": "Block",
"src": "19944:150:0",
"statements": [
{
"expression": {
"id": 1034,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1029,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1027,
"src": "19954:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int216",
"typeString": "int216"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1032,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1024,
"src": "19974:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1031,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "19967:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int216_$",
"typeString": "type(int216)"
},
"typeName": {
"id": 1030,
"name": "int216",
"nodeType": "ElementaryTypeName",
"src": "19967:6:0",
"typeDescriptions": {}
}
},
"id": 1033,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "19967:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int216",
"typeString": "int216"
}
},
"src": "19954:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int216",
"typeString": "int216"
}
},
"id": 1035,
"nodeType": "ExpressionStatement",
"src": "19954:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1038,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1036,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1027,
"src": "19994:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int216",
"typeString": "int216"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1037,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1024,
"src": "20008:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "19994:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1045,
"nodeType": "IfStatement",
"src": "19990:98:0",
"trueBody": {
"id": 1044,
"nodeType": "Block",
"src": "20015:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323136",
"id": 1040,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20066:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_216_by_1",
"typeString": "int_const 216"
},
"value": "216"
},
{
"id": 1041,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1024,
"src": "20071:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_216_by_1",
"typeString": "int_const 216"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1039,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "20036:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1042,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "20036:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1043,
"nodeType": "RevertStatement",
"src": "20029:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1022,
"nodeType": "StructuredDocumentation",
"src": "19553:312:0",
"text": " @dev Returns the downcasted int216 from int256, reverting on\n overflow (when the input is less than smallest int216 or\n greater than largest int216).\n Counterpart to Solidity's `int216` operator.\n Requirements:\n - input must fit into 216 bits"
},
"id": 1047,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt216",
"nameLocation": "19879:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1025,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1024,
"mutability": "mutable",
"name": "value",
"nameLocation": "19895:5:0",
"nodeType": "VariableDeclaration",
"scope": 1047,
"src": "19888:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1023,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "19888:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "19887:14:0"
},
"returnParameters": {
"id": 1028,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1027,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "19932:10:0",
"nodeType": "VariableDeclaration",
"scope": 1047,
"src": "19925:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int216",
"typeString": "int216"
},
"typeName": {
"id": 1026,
"name": "int216",
"nodeType": "ElementaryTypeName",
"src": "19925:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int216",
"typeString": "int216"
}
},
"visibility": "internal"
}
],
"src": "19924:19:0"
},
"scope": 1754,
"src": "19870:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1072,
"nodeType": "Block",
"src": "20491:150:0",
"statements": [
{
"expression": {
"id": 1060,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1055,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1053,
"src": "20501:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int208",
"typeString": "int208"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1058,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1050,
"src": "20521:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1057,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "20514:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int208_$",
"typeString": "type(int208)"
},
"typeName": {
"id": 1056,
"name": "int208",
"nodeType": "ElementaryTypeName",
"src": "20514:6:0",
"typeDescriptions": {}
}
},
"id": 1059,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "20514:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int208",
"typeString": "int208"
}
},
"src": "20501:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int208",
"typeString": "int208"
}
},
"id": 1061,
"nodeType": "ExpressionStatement",
"src": "20501:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1064,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1062,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1053,
"src": "20541:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int208",
"typeString": "int208"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1063,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1050,
"src": "20555:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "20541:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1071,
"nodeType": "IfStatement",
"src": "20537:98:0",
"trueBody": {
"id": 1070,
"nodeType": "Block",
"src": "20562:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323038",
"id": 1066,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20613:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_208_by_1",
"typeString": "int_const 208"
},
"value": "208"
},
{
"id": 1067,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1050,
"src": "20618:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_208_by_1",
"typeString": "int_const 208"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1065,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "20583:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1068,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "20583:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1069,
"nodeType": "RevertStatement",
"src": "20576:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1048,
"nodeType": "StructuredDocumentation",
"src": "20100:312:0",
"text": " @dev Returns the downcasted int208 from int256, reverting on\n overflow (when the input is less than smallest int208 or\n greater than largest int208).\n Counterpart to Solidity's `int208` operator.\n Requirements:\n - input must fit into 208 bits"
},
"id": 1073,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt208",
"nameLocation": "20426:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1051,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1050,
"mutability": "mutable",
"name": "value",
"nameLocation": "20442:5:0",
"nodeType": "VariableDeclaration",
"scope": 1073,
"src": "20435:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1049,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "20435:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "20434:14:0"
},
"returnParameters": {
"id": 1054,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1053,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "20479:10:0",
"nodeType": "VariableDeclaration",
"scope": 1073,
"src": "20472:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int208",
"typeString": "int208"
},
"typeName": {
"id": 1052,
"name": "int208",
"nodeType": "ElementaryTypeName",
"src": "20472:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int208",
"typeString": "int208"
}
},
"visibility": "internal"
}
],
"src": "20471:19:0"
},
"scope": 1754,
"src": "20417:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1098,
"nodeType": "Block",
"src": "21038:150:0",
"statements": [
{
"expression": {
"id": 1086,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1081,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1079,
"src": "21048:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int200",
"typeString": "int200"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1084,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1076,
"src": "21068:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1083,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "21061:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int200_$",
"typeString": "type(int200)"
},
"typeName": {
"id": 1082,
"name": "int200",
"nodeType": "ElementaryTypeName",
"src": "21061:6:0",
"typeDescriptions": {}
}
},
"id": 1085,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "21061:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int200",
"typeString": "int200"
}
},
"src": "21048:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int200",
"typeString": "int200"
}
},
"id": 1087,
"nodeType": "ExpressionStatement",
"src": "21048:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1090,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1088,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1079,
"src": "21088:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int200",
"typeString": "int200"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1089,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1076,
"src": "21102:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "21088:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1097,
"nodeType": "IfStatement",
"src": "21084:98:0",
"trueBody": {
"id": 1096,
"nodeType": "Block",
"src": "21109:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "323030",
"id": 1092,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21160:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_200_by_1",
"typeString": "int_const 200"
},
"value": "200"
},
{
"id": 1093,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1076,
"src": "21165:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_200_by_1",
"typeString": "int_const 200"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1091,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "21130:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "21130:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1095,
"nodeType": "RevertStatement",
"src": "21123:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1074,
"nodeType": "StructuredDocumentation",
"src": "20647:312:0",
"text": " @dev Returns the downcasted int200 from int256, reverting on\n overflow (when the input is less than smallest int200 or\n greater than largest int200).\n Counterpart to Solidity's `int200` operator.\n Requirements:\n - input must fit into 200 bits"
},
"id": 1099,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt200",
"nameLocation": "20973:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1077,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1076,
"mutability": "mutable",
"name": "value",
"nameLocation": "20989:5:0",
"nodeType": "VariableDeclaration",
"scope": 1099,
"src": "20982:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1075,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "20982:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "20981:14:0"
},
"returnParameters": {
"id": 1080,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1079,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "21026:10:0",
"nodeType": "VariableDeclaration",
"scope": 1099,
"src": "21019:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int200",
"typeString": "int200"
},
"typeName": {
"id": 1078,
"name": "int200",
"nodeType": "ElementaryTypeName",
"src": "21019:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int200",
"typeString": "int200"
}
},
"visibility": "internal"
}
],
"src": "21018:19:0"
},
"scope": 1754,
"src": "20964:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1124,
"nodeType": "Block",
"src": "21585:150:0",
"statements": [
{
"expression": {
"id": 1112,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1107,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1105,
"src": "21595:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int192",
"typeString": "int192"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1110,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1102,
"src": "21615:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1109,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "21608:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int192_$",
"typeString": "type(int192)"
},
"typeName": {
"id": 1108,
"name": "int192",
"nodeType": "ElementaryTypeName",
"src": "21608:6:0",
"typeDescriptions": {}
}
},
"id": 1111,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "21608:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int192",
"typeString": "int192"
}
},
"src": "21595:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int192",
"typeString": "int192"
}
},
"id": 1113,
"nodeType": "ExpressionStatement",
"src": "21595:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1116,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1114,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1105,
"src": "21635:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int192",
"typeString": "int192"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1115,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1102,
"src": "21649:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "21635:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1123,
"nodeType": "IfStatement",
"src": "21631:98:0",
"trueBody": {
"id": 1122,
"nodeType": "Block",
"src": "21656:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313932",
"id": 1118,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21707:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_192_by_1",
"typeString": "int_const 192"
},
"value": "192"
},
{
"id": 1119,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1102,
"src": "21712:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_192_by_1",
"typeString": "int_const 192"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1117,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "21677:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1120,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "21677:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1121,
"nodeType": "RevertStatement",
"src": "21670:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1100,
"nodeType": "StructuredDocumentation",
"src": "21194:312:0",
"text": " @dev Returns the downcasted int192 from int256, reverting on\n overflow (when the input is less than smallest int192 or\n greater than largest int192).\n Counterpart to Solidity's `int192` operator.\n Requirements:\n - input must fit into 192 bits"
},
"id": 1125,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt192",
"nameLocation": "21520:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1103,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1102,
"mutability": "mutable",
"name": "value",
"nameLocation": "21536:5:0",
"nodeType": "VariableDeclaration",
"scope": 1125,
"src": "21529:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1101,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "21529:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "21528:14:0"
},
"returnParameters": {
"id": 1106,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1105,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "21573:10:0",
"nodeType": "VariableDeclaration",
"scope": 1125,
"src": "21566:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int192",
"typeString": "int192"
},
"typeName": {
"id": 1104,
"name": "int192",
"nodeType": "ElementaryTypeName",
"src": "21566:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int192",
"typeString": "int192"
}
},
"visibility": "internal"
}
],
"src": "21565:19:0"
},
"scope": 1754,
"src": "21511:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1150,
"nodeType": "Block",
"src": "22132:150:0",
"statements": [
{
"expression": {
"id": 1138,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1133,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1131,
"src": "22142:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int184",
"typeString": "int184"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1136,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1128,
"src": "22162:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1135,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "22155:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int184_$",
"typeString": "type(int184)"
},
"typeName": {
"id": 1134,
"name": "int184",
"nodeType": "ElementaryTypeName",
"src": "22155:6:0",
"typeDescriptions": {}
}
},
"id": 1137,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "22155:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int184",
"typeString": "int184"
}
},
"src": "22142:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int184",
"typeString": "int184"
}
},
"id": 1139,
"nodeType": "ExpressionStatement",
"src": "22142:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1142,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1140,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1131,
"src": "22182:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int184",
"typeString": "int184"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1141,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1128,
"src": "22196:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "22182:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1149,
"nodeType": "IfStatement",
"src": "22178:98:0",
"trueBody": {
"id": 1148,
"nodeType": "Block",
"src": "22203:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313834",
"id": 1144,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "22254:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_184_by_1",
"typeString": "int_const 184"
},
"value": "184"
},
{
"id": 1145,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1128,
"src": "22259:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_184_by_1",
"typeString": "int_const 184"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1143,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "22224:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1146,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "22224:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1147,
"nodeType": "RevertStatement",
"src": "22217:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1126,
"nodeType": "StructuredDocumentation",
"src": "21741:312:0",
"text": " @dev Returns the downcasted int184 from int256, reverting on\n overflow (when the input is less than smallest int184 or\n greater than largest int184).\n Counterpart to Solidity's `int184` operator.\n Requirements:\n - input must fit into 184 bits"
},
"id": 1151,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt184",
"nameLocation": "22067:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1129,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1128,
"mutability": "mutable",
"name": "value",
"nameLocation": "22083:5:0",
"nodeType": "VariableDeclaration",
"scope": 1151,
"src": "22076:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1127,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "22076:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "22075:14:0"
},
"returnParameters": {
"id": 1132,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1131,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "22120:10:0",
"nodeType": "VariableDeclaration",
"scope": 1151,
"src": "22113:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int184",
"typeString": "int184"
},
"typeName": {
"id": 1130,
"name": "int184",
"nodeType": "ElementaryTypeName",
"src": "22113:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int184",
"typeString": "int184"
}
},
"visibility": "internal"
}
],
"src": "22112:19:0"
},
"scope": 1754,
"src": "22058:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1176,
"nodeType": "Block",
"src": "22679:150:0",
"statements": [
{
"expression": {
"id": 1164,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1159,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1157,
"src": "22689:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int176",
"typeString": "int176"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1162,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1154,
"src": "22709:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1161,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "22702:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int176_$",
"typeString": "type(int176)"
},
"typeName": {
"id": 1160,
"name": "int176",
"nodeType": "ElementaryTypeName",
"src": "22702:6:0",
"typeDescriptions": {}
}
},
"id": 1163,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "22702:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int176",
"typeString": "int176"
}
},
"src": "22689:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int176",
"typeString": "int176"
}
},
"id": 1165,
"nodeType": "ExpressionStatement",
"src": "22689:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1168,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1166,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1157,
"src": "22729:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int176",
"typeString": "int176"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1167,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1154,
"src": "22743:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "22729:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1175,
"nodeType": "IfStatement",
"src": "22725:98:0",
"trueBody": {
"id": 1174,
"nodeType": "Block",
"src": "22750:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313736",
"id": 1170,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "22801:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_176_by_1",
"typeString": "int_const 176"
},
"value": "176"
},
{
"id": 1171,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1154,
"src": "22806:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_176_by_1",
"typeString": "int_const 176"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1169,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "22771:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1172,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "22771:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1173,
"nodeType": "RevertStatement",
"src": "22764:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1152,
"nodeType": "StructuredDocumentation",
"src": "22288:312:0",
"text": " @dev Returns the downcasted int176 from int256, reverting on\n overflow (when the input is less than smallest int176 or\n greater than largest int176).\n Counterpart to Solidity's `int176` operator.\n Requirements:\n - input must fit into 176 bits"
},
"id": 1177,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt176",
"nameLocation": "22614:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1155,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1154,
"mutability": "mutable",
"name": "value",
"nameLocation": "22630:5:0",
"nodeType": "VariableDeclaration",
"scope": 1177,
"src": "22623:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1153,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "22623:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "22622:14:0"
},
"returnParameters": {
"id": 1158,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1157,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "22667:10:0",
"nodeType": "VariableDeclaration",
"scope": 1177,
"src": "22660:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int176",
"typeString": "int176"
},
"typeName": {
"id": 1156,
"name": "int176",
"nodeType": "ElementaryTypeName",
"src": "22660:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int176",
"typeString": "int176"
}
},
"visibility": "internal"
}
],
"src": "22659:19:0"
},
"scope": 1754,
"src": "22605:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1202,
"nodeType": "Block",
"src": "23226:150:0",
"statements": [
{
"expression": {
"id": 1190,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1185,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1183,
"src": "23236:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int168",
"typeString": "int168"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1188,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1180,
"src": "23256:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1187,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "23249:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int168_$",
"typeString": "type(int168)"
},
"typeName": {
"id": 1186,
"name": "int168",
"nodeType": "ElementaryTypeName",
"src": "23249:6:0",
"typeDescriptions": {}
}
},
"id": 1189,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "23249:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int168",
"typeString": "int168"
}
},
"src": "23236:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int168",
"typeString": "int168"
}
},
"id": 1191,
"nodeType": "ExpressionStatement",
"src": "23236:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1194,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1192,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1183,
"src": "23276:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int168",
"typeString": "int168"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1193,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1180,
"src": "23290:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "23276:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1201,
"nodeType": "IfStatement",
"src": "23272:98:0",
"trueBody": {
"id": 1200,
"nodeType": "Block",
"src": "23297:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313638",
"id": 1196,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23348:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_168_by_1",
"typeString": "int_const 168"
},
"value": "168"
},
{
"id": 1197,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1180,
"src": "23353:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_168_by_1",
"typeString": "int_const 168"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1195,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "23318:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1198,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "23318:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1199,
"nodeType": "RevertStatement",
"src": "23311:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1178,
"nodeType": "StructuredDocumentation",
"src": "22835:312:0",
"text": " @dev Returns the downcasted int168 from int256, reverting on\n overflow (when the input is less than smallest int168 or\n greater than largest int168).\n Counterpart to Solidity's `int168` operator.\n Requirements:\n - input must fit into 168 bits"
},
"id": 1203,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt168",
"nameLocation": "23161:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1181,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1180,
"mutability": "mutable",
"name": "value",
"nameLocation": "23177:5:0",
"nodeType": "VariableDeclaration",
"scope": 1203,
"src": "23170:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1179,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "23170:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "23169:14:0"
},
"returnParameters": {
"id": 1184,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1183,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "23214:10:0",
"nodeType": "VariableDeclaration",
"scope": 1203,
"src": "23207:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int168",
"typeString": "int168"
},
"typeName": {
"id": 1182,
"name": "int168",
"nodeType": "ElementaryTypeName",
"src": "23207:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int168",
"typeString": "int168"
}
},
"visibility": "internal"
}
],
"src": "23206:19:0"
},
"scope": 1754,
"src": "23152:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1228,
"nodeType": "Block",
"src": "23773:150:0",
"statements": [
{
"expression": {
"id": 1216,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1211,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1209,
"src": "23783:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int160",
"typeString": "int160"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1214,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1206,
"src": "23803:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1213,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "23796:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int160_$",
"typeString": "type(int160)"
},
"typeName": {
"id": 1212,
"name": "int160",
"nodeType": "ElementaryTypeName",
"src": "23796:6:0",
"typeDescriptions": {}
}
},
"id": 1215,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "23796:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int160",
"typeString": "int160"
}
},
"src": "23783:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int160",
"typeString": "int160"
}
},
"id": 1217,
"nodeType": "ExpressionStatement",
"src": "23783:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1220,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1218,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1209,
"src": "23823:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int160",
"typeString": "int160"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1219,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1206,
"src": "23837:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "23823:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1227,
"nodeType": "IfStatement",
"src": "23819:98:0",
"trueBody": {
"id": 1226,
"nodeType": "Block",
"src": "23844:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313630",
"id": 1222,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23895:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_160_by_1",
"typeString": "int_const 160"
},
"value": "160"
},
{
"id": 1223,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1206,
"src": "23900:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_160_by_1",
"typeString": "int_const 160"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1221,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "23865:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "23865:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1225,
"nodeType": "RevertStatement",
"src": "23858:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1204,
"nodeType": "StructuredDocumentation",
"src": "23382:312:0",
"text": " @dev Returns the downcasted int160 from int256, reverting on\n overflow (when the input is less than smallest int160 or\n greater than largest int160).\n Counterpart to Solidity's `int160` operator.\n Requirements:\n - input must fit into 160 bits"
},
"id": 1229,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt160",
"nameLocation": "23708:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1207,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1206,
"mutability": "mutable",
"name": "value",
"nameLocation": "23724:5:0",
"nodeType": "VariableDeclaration",
"scope": 1229,
"src": "23717:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1205,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "23717:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "23716:14:0"
},
"returnParameters": {
"id": 1210,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1209,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "23761:10:0",
"nodeType": "VariableDeclaration",
"scope": 1229,
"src": "23754:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int160",
"typeString": "int160"
},
"typeName": {
"id": 1208,
"name": "int160",
"nodeType": "ElementaryTypeName",
"src": "23754:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int160",
"typeString": "int160"
}
},
"visibility": "internal"
}
],
"src": "23753:19:0"
},
"scope": 1754,
"src": "23699:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1254,
"nodeType": "Block",
"src": "24320:150:0",
"statements": [
{
"expression": {
"id": 1242,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1237,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1235,
"src": "24330:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int152",
"typeString": "int152"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1240,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1232,
"src": "24350:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1239,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "24343:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int152_$",
"typeString": "type(int152)"
},
"typeName": {
"id": 1238,
"name": "int152",
"nodeType": "ElementaryTypeName",
"src": "24343:6:0",
"typeDescriptions": {}
}
},
"id": 1241,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "24343:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int152",
"typeString": "int152"
}
},
"src": "24330:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int152",
"typeString": "int152"
}
},
"id": 1243,
"nodeType": "ExpressionStatement",
"src": "24330:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1246,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1244,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1235,
"src": "24370:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int152",
"typeString": "int152"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1245,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1232,
"src": "24384:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "24370:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1253,
"nodeType": "IfStatement",
"src": "24366:98:0",
"trueBody": {
"id": 1252,
"nodeType": "Block",
"src": "24391:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313532",
"id": 1248,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24442:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_152_by_1",
"typeString": "int_const 152"
},
"value": "152"
},
{
"id": 1249,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1232,
"src": "24447:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_152_by_1",
"typeString": "int_const 152"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1247,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "24412:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1250,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "24412:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1251,
"nodeType": "RevertStatement",
"src": "24405:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1230,
"nodeType": "StructuredDocumentation",
"src": "23929:312:0",
"text": " @dev Returns the downcasted int152 from int256, reverting on\n overflow (when the input is less than smallest int152 or\n greater than largest int152).\n Counterpart to Solidity's `int152` operator.\n Requirements:\n - input must fit into 152 bits"
},
"id": 1255,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt152",
"nameLocation": "24255:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1233,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1232,
"mutability": "mutable",
"name": "value",
"nameLocation": "24271:5:0",
"nodeType": "VariableDeclaration",
"scope": 1255,
"src": "24264:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1231,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "24264:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "24263:14:0"
},
"returnParameters": {
"id": 1236,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1235,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "24308:10:0",
"nodeType": "VariableDeclaration",
"scope": 1255,
"src": "24301:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int152",
"typeString": "int152"
},
"typeName": {
"id": 1234,
"name": "int152",
"nodeType": "ElementaryTypeName",
"src": "24301:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int152",
"typeString": "int152"
}
},
"visibility": "internal"
}
],
"src": "24300:19:0"
},
"scope": 1754,
"src": "24246:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1280,
"nodeType": "Block",
"src": "24867:150:0",
"statements": [
{
"expression": {
"id": 1268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1263,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1261,
"src": "24877:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int144",
"typeString": "int144"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1266,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1258,
"src": "24897:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1265,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "24890:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int144_$",
"typeString": "type(int144)"
},
"typeName": {
"id": 1264,
"name": "int144",
"nodeType": "ElementaryTypeName",
"src": "24890:6:0",
"typeDescriptions": {}
}
},
"id": 1267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "24890:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int144",
"typeString": "int144"
}
},
"src": "24877:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int144",
"typeString": "int144"
}
},
"id": 1269,
"nodeType": "ExpressionStatement",
"src": "24877:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1272,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1270,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1261,
"src": "24917:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int144",
"typeString": "int144"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1271,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1258,
"src": "24931:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "24917:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1279,
"nodeType": "IfStatement",
"src": "24913:98:0",
"trueBody": {
"id": 1278,
"nodeType": "Block",
"src": "24938:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313434",
"id": 1274,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24989:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_144_by_1",
"typeString": "int_const 144"
},
"value": "144"
},
{
"id": 1275,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1258,
"src": "24994:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_144_by_1",
"typeString": "int_const 144"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1273,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "24959:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1276,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "24959:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1277,
"nodeType": "RevertStatement",
"src": "24952:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1256,
"nodeType": "StructuredDocumentation",
"src": "24476:312:0",
"text": " @dev Returns the downcasted int144 from int256, reverting on\n overflow (when the input is less than smallest int144 or\n greater than largest int144).\n Counterpart to Solidity's `int144` operator.\n Requirements:\n - input must fit into 144 bits"
},
"id": 1281,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt144",
"nameLocation": "24802:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1259,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1258,
"mutability": "mutable",
"name": "value",
"nameLocation": "24818:5:0",
"nodeType": "VariableDeclaration",
"scope": 1281,
"src": "24811:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1257,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "24811:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "24810:14:0"
},
"returnParameters": {
"id": 1262,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1261,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "24855:10:0",
"nodeType": "VariableDeclaration",
"scope": 1281,
"src": "24848:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int144",
"typeString": "int144"
},
"typeName": {
"id": 1260,
"name": "int144",
"nodeType": "ElementaryTypeName",
"src": "24848:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int144",
"typeString": "int144"
}
},
"visibility": "internal"
}
],
"src": "24847:19:0"
},
"scope": 1754,
"src": "24793:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1306,
"nodeType": "Block",
"src": "25414:150:0",
"statements": [
{
"expression": {
"id": 1294,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1289,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1287,
"src": "25424:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int136",
"typeString": "int136"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1292,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1284,
"src": "25444:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1291,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "25437:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int136_$",
"typeString": "type(int136)"
},
"typeName": {
"id": 1290,
"name": "int136",
"nodeType": "ElementaryTypeName",
"src": "25437:6:0",
"typeDescriptions": {}
}
},
"id": 1293,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "25437:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int136",
"typeString": "int136"
}
},
"src": "25424:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int136",
"typeString": "int136"
}
},
"id": 1295,
"nodeType": "ExpressionStatement",
"src": "25424:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1298,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1296,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1287,
"src": "25464:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int136",
"typeString": "int136"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1297,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1284,
"src": "25478:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "25464:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1305,
"nodeType": "IfStatement",
"src": "25460:98:0",
"trueBody": {
"id": 1304,
"nodeType": "Block",
"src": "25485:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313336",
"id": 1300,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "25536:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_136_by_1",
"typeString": "int_const 136"
},
"value": "136"
},
{
"id": 1301,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1284,
"src": "25541:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_136_by_1",
"typeString": "int_const 136"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1299,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "25506:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1302,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "25506:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1303,
"nodeType": "RevertStatement",
"src": "25499:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1282,
"nodeType": "StructuredDocumentation",
"src": "25023:312:0",
"text": " @dev Returns the downcasted int136 from int256, reverting on\n overflow (when the input is less than smallest int136 or\n greater than largest int136).\n Counterpart to Solidity's `int136` operator.\n Requirements:\n - input must fit into 136 bits"
},
"id": 1307,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt136",
"nameLocation": "25349:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1285,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1284,
"mutability": "mutable",
"name": "value",
"nameLocation": "25365:5:0",
"nodeType": "VariableDeclaration",
"scope": 1307,
"src": "25358:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1283,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "25358:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "25357:14:0"
},
"returnParameters": {
"id": 1288,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1287,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "25402:10:0",
"nodeType": "VariableDeclaration",
"scope": 1307,
"src": "25395:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int136",
"typeString": "int136"
},
"typeName": {
"id": 1286,
"name": "int136",
"nodeType": "ElementaryTypeName",
"src": "25395:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int136",
"typeString": "int136"
}
},
"visibility": "internal"
}
],
"src": "25394:19:0"
},
"scope": 1754,
"src": "25340:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1332,
"nodeType": "Block",
"src": "25961:150:0",
"statements": [
{
"expression": {
"id": 1320,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1315,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1313,
"src": "25971:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int128",
"typeString": "int128"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1318,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1310,
"src": "25991:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1317,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "25984:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int128_$",
"typeString": "type(int128)"
},
"typeName": {
"id": 1316,
"name": "int128",
"nodeType": "ElementaryTypeName",
"src": "25984:6:0",
"typeDescriptions": {}
}
},
"id": 1319,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "25984:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int128",
"typeString": "int128"
}
},
"src": "25971:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int128",
"typeString": "int128"
}
},
"id": 1321,
"nodeType": "ExpressionStatement",
"src": "25971:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1322,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1313,
"src": "26011:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int128",
"typeString": "int128"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1323,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1310,
"src": "26025:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "26011:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1331,
"nodeType": "IfStatement",
"src": "26007:98:0",
"trueBody": {
"id": 1330,
"nodeType": "Block",
"src": "26032:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313238",
"id": 1326,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "26083:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
{
"id": 1327,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1310,
"src": "26088:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1325,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "26053:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1328,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "26053:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1329,
"nodeType": "RevertStatement",
"src": "26046:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1308,
"nodeType": "StructuredDocumentation",
"src": "25570:312:0",
"text": " @dev Returns the downcasted int128 from int256, reverting on\n overflow (when the input is less than smallest int128 or\n greater than largest int128).\n Counterpart to Solidity's `int128` operator.\n Requirements:\n - input must fit into 128 bits"
},
"id": 1333,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt128",
"nameLocation": "25896:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1311,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1310,
"mutability": "mutable",
"name": "value",
"nameLocation": "25912:5:0",
"nodeType": "VariableDeclaration",
"scope": 1333,
"src": "25905:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1309,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "25905:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "25904:14:0"
},
"returnParameters": {
"id": 1314,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1313,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "25949:10:0",
"nodeType": "VariableDeclaration",
"scope": 1333,
"src": "25942:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int128",
"typeString": "int128"
},
"typeName": {
"id": 1312,
"name": "int128",
"nodeType": "ElementaryTypeName",
"src": "25942:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int128",
"typeString": "int128"
}
},
"visibility": "internal"
}
],
"src": "25941:19:0"
},
"scope": 1754,
"src": "25887:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1358,
"nodeType": "Block",
"src": "26508:150:0",
"statements": [
{
"expression": {
"id": 1346,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1341,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1339,
"src": "26518:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int120",
"typeString": "int120"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1344,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1336,
"src": "26538:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1343,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "26531:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int120_$",
"typeString": "type(int120)"
},
"typeName": {
"id": 1342,
"name": "int120",
"nodeType": "ElementaryTypeName",
"src": "26531:6:0",
"typeDescriptions": {}
}
},
"id": 1345,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "26531:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int120",
"typeString": "int120"
}
},
"src": "26518:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int120",
"typeString": "int120"
}
},
"id": 1347,
"nodeType": "ExpressionStatement",
"src": "26518:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1350,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1348,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1339,
"src": "26558:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int120",
"typeString": "int120"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1349,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1336,
"src": "26572:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "26558:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1357,
"nodeType": "IfStatement",
"src": "26554:98:0",
"trueBody": {
"id": 1356,
"nodeType": "Block",
"src": "26579:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313230",
"id": 1352,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "26630:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_120_by_1",
"typeString": "int_const 120"
},
"value": "120"
},
{
"id": 1353,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1336,
"src": "26635:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_120_by_1",
"typeString": "int_const 120"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1351,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "26600:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1354,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "26600:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1355,
"nodeType": "RevertStatement",
"src": "26593:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1334,
"nodeType": "StructuredDocumentation",
"src": "26117:312:0",
"text": " @dev Returns the downcasted int120 from int256, reverting on\n overflow (when the input is less than smallest int120 or\n greater than largest int120).\n Counterpart to Solidity's `int120` operator.\n Requirements:\n - input must fit into 120 bits"
},
"id": 1359,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt120",
"nameLocation": "26443:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1337,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1336,
"mutability": "mutable",
"name": "value",
"nameLocation": "26459:5:0",
"nodeType": "VariableDeclaration",
"scope": 1359,
"src": "26452:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1335,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "26452:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "26451:14:0"
},
"returnParameters": {
"id": 1340,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1339,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "26496:10:0",
"nodeType": "VariableDeclaration",
"scope": 1359,
"src": "26489:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int120",
"typeString": "int120"
},
"typeName": {
"id": 1338,
"name": "int120",
"nodeType": "ElementaryTypeName",
"src": "26489:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int120",
"typeString": "int120"
}
},
"visibility": "internal"
}
],
"src": "26488:19:0"
},
"scope": 1754,
"src": "26434:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1384,
"nodeType": "Block",
"src": "27055:150:0",
"statements": [
{
"expression": {
"id": 1372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1367,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1365,
"src": "27065:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int112",
"typeString": "int112"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1370,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1362,
"src": "27085:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1369,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "27078:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int112_$",
"typeString": "type(int112)"
},
"typeName": {
"id": 1368,
"name": "int112",
"nodeType": "ElementaryTypeName",
"src": "27078:6:0",
"typeDescriptions": {}
}
},
"id": 1371,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "27078:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int112",
"typeString": "int112"
}
},
"src": "27065:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int112",
"typeString": "int112"
}
},
"id": 1373,
"nodeType": "ExpressionStatement",
"src": "27065:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1376,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1374,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1365,
"src": "27105:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int112",
"typeString": "int112"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1375,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1362,
"src": "27119:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "27105:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1383,
"nodeType": "IfStatement",
"src": "27101:98:0",
"trueBody": {
"id": 1382,
"nodeType": "Block",
"src": "27126:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313132",
"id": 1378,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "27177:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_112_by_1",
"typeString": "int_const 112"
},
"value": "112"
},
{
"id": 1379,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1362,
"src": "27182:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_112_by_1",
"typeString": "int_const 112"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1377,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "27147:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1380,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "27147:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1381,
"nodeType": "RevertStatement",
"src": "27140:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1360,
"nodeType": "StructuredDocumentation",
"src": "26664:312:0",
"text": " @dev Returns the downcasted int112 from int256, reverting on\n overflow (when the input is less than smallest int112 or\n greater than largest int112).\n Counterpart to Solidity's `int112` operator.\n Requirements:\n - input must fit into 112 bits"
},
"id": 1385,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt112",
"nameLocation": "26990:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1363,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1362,
"mutability": "mutable",
"name": "value",
"nameLocation": "27006:5:0",
"nodeType": "VariableDeclaration",
"scope": 1385,
"src": "26999:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1361,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "26999:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "26998:14:0"
},
"returnParameters": {
"id": 1366,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1365,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "27043:10:0",
"nodeType": "VariableDeclaration",
"scope": 1385,
"src": "27036:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int112",
"typeString": "int112"
},
"typeName": {
"id": 1364,
"name": "int112",
"nodeType": "ElementaryTypeName",
"src": "27036:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int112",
"typeString": "int112"
}
},
"visibility": "internal"
}
],
"src": "27035:19:0"
},
"scope": 1754,
"src": "26981:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1410,
"nodeType": "Block",
"src": "27602:150:0",
"statements": [
{
"expression": {
"id": 1398,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1393,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1391,
"src": "27612:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int104",
"typeString": "int104"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1396,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1388,
"src": "27632:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1395,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "27625:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int104_$",
"typeString": "type(int104)"
},
"typeName": {
"id": 1394,
"name": "int104",
"nodeType": "ElementaryTypeName",
"src": "27625:6:0",
"typeDescriptions": {}
}
},
"id": 1397,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "27625:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int104",
"typeString": "int104"
}
},
"src": "27612:26:0",
"typeDescriptions": {
"typeIdentifier": "t_int104",
"typeString": "int104"
}
},
"id": 1399,
"nodeType": "ExpressionStatement",
"src": "27612:26:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1402,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1400,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1391,
"src": "27652:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int104",
"typeString": "int104"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1401,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1388,
"src": "27666:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "27652:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1409,
"nodeType": "IfStatement",
"src": "27648:98:0",
"trueBody": {
"id": 1408,
"nodeType": "Block",
"src": "27673:73:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "313034",
"id": 1404,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "27724:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_104_by_1",
"typeString": "int_const 104"
},
"value": "104"
},
{
"id": 1405,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1388,
"src": "27729:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_104_by_1",
"typeString": "int_const 104"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1403,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "27694:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1406,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "27694:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1407,
"nodeType": "RevertStatement",
"src": "27687:48:0"
}
]
}
}
]
},
"documentation": {
"id": 1386,
"nodeType": "StructuredDocumentation",
"src": "27211:312:0",
"text": " @dev Returns the downcasted int104 from int256, reverting on\n overflow (when the input is less than smallest int104 or\n greater than largest int104).\n Counterpart to Solidity's `int104` operator.\n Requirements:\n - input must fit into 104 bits"
},
"id": 1411,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt104",
"nameLocation": "27537:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1389,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1388,
"mutability": "mutable",
"name": "value",
"nameLocation": "27553:5:0",
"nodeType": "VariableDeclaration",
"scope": 1411,
"src": "27546:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1387,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "27546:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "27545:14:0"
},
"returnParameters": {
"id": 1392,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1391,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "27590:10:0",
"nodeType": "VariableDeclaration",
"scope": 1411,
"src": "27583:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int104",
"typeString": "int104"
},
"typeName": {
"id": 1390,
"name": "int104",
"nodeType": "ElementaryTypeName",
"src": "27583:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int104",
"typeString": "int104"
}
},
"visibility": "internal"
}
],
"src": "27582:19:0"
},
"scope": 1754,
"src": "27528:224:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1436,
"nodeType": "Block",
"src": "28142:148:0",
"statements": [
{
"expression": {
"id": 1424,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1419,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1417,
"src": "28152:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int96",
"typeString": "int96"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1422,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1414,
"src": "28171:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1421,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "28165:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int96_$",
"typeString": "type(int96)"
},
"typeName": {
"id": 1420,
"name": "int96",
"nodeType": "ElementaryTypeName",
"src": "28165:5:0",
"typeDescriptions": {}
}
},
"id": 1423,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "28165:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int96",
"typeString": "int96"
}
},
"src": "28152:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int96",
"typeString": "int96"
}
},
"id": 1425,
"nodeType": "ExpressionStatement",
"src": "28152:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1428,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1426,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1417,
"src": "28191:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int96",
"typeString": "int96"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1427,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1414,
"src": "28205:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "28191:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1435,
"nodeType": "IfStatement",
"src": "28187:97:0",
"trueBody": {
"id": 1434,
"nodeType": "Block",
"src": "28212:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3936",
"id": 1430,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "28263:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_96_by_1",
"typeString": "int_const 96"
},
"value": "96"
},
{
"id": 1431,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1414,
"src": "28267:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_96_by_1",
"typeString": "int_const 96"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1429,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "28233:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1432,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "28233:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1433,
"nodeType": "RevertStatement",
"src": "28226:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1412,
"nodeType": "StructuredDocumentation",
"src": "27758:307:0",
"text": " @dev Returns the downcasted int96 from int256, reverting on\n overflow (when the input is less than smallest int96 or\n greater than largest int96).\n Counterpart to Solidity's `int96` operator.\n Requirements:\n - input must fit into 96 bits"
},
"id": 1437,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt96",
"nameLocation": "28079:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1415,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1414,
"mutability": "mutable",
"name": "value",
"nameLocation": "28094:5:0",
"nodeType": "VariableDeclaration",
"scope": 1437,
"src": "28087:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1413,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "28087:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "28086:14:0"
},
"returnParameters": {
"id": 1418,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1417,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "28130:10:0",
"nodeType": "VariableDeclaration",
"scope": 1437,
"src": "28124:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int96",
"typeString": "int96"
},
"typeName": {
"id": 1416,
"name": "int96",
"nodeType": "ElementaryTypeName",
"src": "28124:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int96",
"typeString": "int96"
}
},
"visibility": "internal"
}
],
"src": "28123:18:0"
},
"scope": 1754,
"src": "28070:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1462,
"nodeType": "Block",
"src": "28680:148:0",
"statements": [
{
"expression": {
"id": 1450,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1445,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1443,
"src": "28690:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int88",
"typeString": "int88"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1448,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1440,
"src": "28709:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1447,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "28703:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int88_$",
"typeString": "type(int88)"
},
"typeName": {
"id": 1446,
"name": "int88",
"nodeType": "ElementaryTypeName",
"src": "28703:5:0",
"typeDescriptions": {}
}
},
"id": 1449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "28703:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int88",
"typeString": "int88"
}
},
"src": "28690:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int88",
"typeString": "int88"
}
},
"id": 1451,
"nodeType": "ExpressionStatement",
"src": "28690:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1454,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1452,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1443,
"src": "28729:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int88",
"typeString": "int88"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1453,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1440,
"src": "28743:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "28729:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1461,
"nodeType": "IfStatement",
"src": "28725:97:0",
"trueBody": {
"id": 1460,
"nodeType": "Block",
"src": "28750:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3838",
"id": 1456,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "28801:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_88_by_1",
"typeString": "int_const 88"
},
"value": "88"
},
{
"id": 1457,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1440,
"src": "28805:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_88_by_1",
"typeString": "int_const 88"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1455,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "28771:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1458,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "28771:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1459,
"nodeType": "RevertStatement",
"src": "28764:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1438,
"nodeType": "StructuredDocumentation",
"src": "28296:307:0",
"text": " @dev Returns the downcasted int88 from int256, reverting on\n overflow (when the input is less than smallest int88 or\n greater than largest int88).\n Counterpart to Solidity's `int88` operator.\n Requirements:\n - input must fit into 88 bits"
},
"id": 1463,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt88",
"nameLocation": "28617:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1441,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1440,
"mutability": "mutable",
"name": "value",
"nameLocation": "28632:5:0",
"nodeType": "VariableDeclaration",
"scope": 1463,
"src": "28625:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1439,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "28625:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "28624:14:0"
},
"returnParameters": {
"id": 1444,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1443,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "28668:10:0",
"nodeType": "VariableDeclaration",
"scope": 1463,
"src": "28662:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int88",
"typeString": "int88"
},
"typeName": {
"id": 1442,
"name": "int88",
"nodeType": "ElementaryTypeName",
"src": "28662:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int88",
"typeString": "int88"
}
},
"visibility": "internal"
}
],
"src": "28661:18:0"
},
"scope": 1754,
"src": "28608:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1488,
"nodeType": "Block",
"src": "29218:148:0",
"statements": [
{
"expression": {
"id": 1476,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1471,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1469,
"src": "29228:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int80",
"typeString": "int80"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1474,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1466,
"src": "29247:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1473,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "29241:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int80_$",
"typeString": "type(int80)"
},
"typeName": {
"id": 1472,
"name": "int80",
"nodeType": "ElementaryTypeName",
"src": "29241:5:0",
"typeDescriptions": {}
}
},
"id": 1475,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "29241:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int80",
"typeString": "int80"
}
},
"src": "29228:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int80",
"typeString": "int80"
}
},
"id": 1477,
"nodeType": "ExpressionStatement",
"src": "29228:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1480,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1478,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1469,
"src": "29267:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int80",
"typeString": "int80"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1479,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1466,
"src": "29281:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "29267:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1487,
"nodeType": "IfStatement",
"src": "29263:97:0",
"trueBody": {
"id": 1486,
"nodeType": "Block",
"src": "29288:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3830",
"id": 1482,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "29339:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_80_by_1",
"typeString": "int_const 80"
},
"value": "80"
},
{
"id": 1483,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1466,
"src": "29343:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_80_by_1",
"typeString": "int_const 80"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1481,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "29309:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1484,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "29309:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1485,
"nodeType": "RevertStatement",
"src": "29302:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1464,
"nodeType": "StructuredDocumentation",
"src": "28834:307:0",
"text": " @dev Returns the downcasted int80 from int256, reverting on\n overflow (when the input is less than smallest int80 or\n greater than largest int80).\n Counterpart to Solidity's `int80` operator.\n Requirements:\n - input must fit into 80 bits"
},
"id": 1489,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt80",
"nameLocation": "29155:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1467,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1466,
"mutability": "mutable",
"name": "value",
"nameLocation": "29170:5:0",
"nodeType": "VariableDeclaration",
"scope": 1489,
"src": "29163:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1465,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "29163:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "29162:14:0"
},
"returnParameters": {
"id": 1470,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1469,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "29206:10:0",
"nodeType": "VariableDeclaration",
"scope": 1489,
"src": "29200:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int80",
"typeString": "int80"
},
"typeName": {
"id": 1468,
"name": "int80",
"nodeType": "ElementaryTypeName",
"src": "29200:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int80",
"typeString": "int80"
}
},
"visibility": "internal"
}
],
"src": "29199:18:0"
},
"scope": 1754,
"src": "29146:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1514,
"nodeType": "Block",
"src": "29756:148:0",
"statements": [
{
"expression": {
"id": 1502,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1497,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1495,
"src": "29766:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int72",
"typeString": "int72"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1500,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1492,
"src": "29785:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1499,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "29779:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int72_$",
"typeString": "type(int72)"
},
"typeName": {
"id": 1498,
"name": "int72",
"nodeType": "ElementaryTypeName",
"src": "29779:5:0",
"typeDescriptions": {}
}
},
"id": 1501,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "29779:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int72",
"typeString": "int72"
}
},
"src": "29766:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int72",
"typeString": "int72"
}
},
"id": 1503,
"nodeType": "ExpressionStatement",
"src": "29766:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1506,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1504,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1495,
"src": "29805:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int72",
"typeString": "int72"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1505,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1492,
"src": "29819:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "29805:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1513,
"nodeType": "IfStatement",
"src": "29801:97:0",
"trueBody": {
"id": 1512,
"nodeType": "Block",
"src": "29826:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3732",
"id": 1508,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "29877:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_72_by_1",
"typeString": "int_const 72"
},
"value": "72"
},
{
"id": 1509,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1492,
"src": "29881:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_72_by_1",
"typeString": "int_const 72"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1507,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "29847:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1510,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "29847:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1511,
"nodeType": "RevertStatement",
"src": "29840:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1490,
"nodeType": "StructuredDocumentation",
"src": "29372:307:0",
"text": " @dev Returns the downcasted int72 from int256, reverting on\n overflow (when the input is less than smallest int72 or\n greater than largest int72).\n Counterpart to Solidity's `int72` operator.\n Requirements:\n - input must fit into 72 bits"
},
"id": 1515,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt72",
"nameLocation": "29693:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1493,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1492,
"mutability": "mutable",
"name": "value",
"nameLocation": "29708:5:0",
"nodeType": "VariableDeclaration",
"scope": 1515,
"src": "29701:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1491,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "29701:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "29700:14:0"
},
"returnParameters": {
"id": 1496,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1495,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "29744:10:0",
"nodeType": "VariableDeclaration",
"scope": 1515,
"src": "29738:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int72",
"typeString": "int72"
},
"typeName": {
"id": 1494,
"name": "int72",
"nodeType": "ElementaryTypeName",
"src": "29738:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int72",
"typeString": "int72"
}
},
"visibility": "internal"
}
],
"src": "29737:18:0"
},
"scope": 1754,
"src": "29684:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1540,
"nodeType": "Block",
"src": "30294:148:0",
"statements": [
{
"expression": {
"id": 1528,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1523,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1521,
"src": "30304:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int64",
"typeString": "int64"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1526,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "30323:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1525,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "30317:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int64_$",
"typeString": "type(int64)"
},
"typeName": {
"id": 1524,
"name": "int64",
"nodeType": "ElementaryTypeName",
"src": "30317:5:0",
"typeDescriptions": {}
}
},
"id": 1527,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "30317:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int64",
"typeString": "int64"
}
},
"src": "30304:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int64",
"typeString": "int64"
}
},
"id": 1529,
"nodeType": "ExpressionStatement",
"src": "30304:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1532,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1530,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1521,
"src": "30343:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int64",
"typeString": "int64"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1531,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "30357:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "30343:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1539,
"nodeType": "IfStatement",
"src": "30339:97:0",
"trueBody": {
"id": 1538,
"nodeType": "Block",
"src": "30364:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3634",
"id": 1534,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "30415:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
{
"id": 1535,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "30419:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1533,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "30385:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1536,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "30385:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1537,
"nodeType": "RevertStatement",
"src": "30378:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1516,
"nodeType": "StructuredDocumentation",
"src": "29910:307:0",
"text": " @dev Returns the downcasted int64 from int256, reverting on\n overflow (when the input is less than smallest int64 or\n greater than largest int64).\n Counterpart to Solidity's `int64` operator.\n Requirements:\n - input must fit into 64 bits"
},
"id": 1541,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt64",
"nameLocation": "30231:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1519,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1518,
"mutability": "mutable",
"name": "value",
"nameLocation": "30246:5:0",
"nodeType": "VariableDeclaration",
"scope": 1541,
"src": "30239:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1517,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "30239:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "30238:14:0"
},
"returnParameters": {
"id": 1522,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1521,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "30282:10:0",
"nodeType": "VariableDeclaration",
"scope": 1541,
"src": "30276:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int64",
"typeString": "int64"
},
"typeName": {
"id": 1520,
"name": "int64",
"nodeType": "ElementaryTypeName",
"src": "30276:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int64",
"typeString": "int64"
}
},
"visibility": "internal"
}
],
"src": "30275:18:0"
},
"scope": 1754,
"src": "30222:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1566,
"nodeType": "Block",
"src": "30832:148:0",
"statements": [
{
"expression": {
"id": 1554,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1549,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1547,
"src": "30842:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int56",
"typeString": "int56"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1552,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1544,
"src": "30861:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1551,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "30855:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int56_$",
"typeString": "type(int56)"
},
"typeName": {
"id": 1550,
"name": "int56",
"nodeType": "ElementaryTypeName",
"src": "30855:5:0",
"typeDescriptions": {}
}
},
"id": 1553,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "30855:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int56",
"typeString": "int56"
}
},
"src": "30842:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int56",
"typeString": "int56"
}
},
"id": 1555,
"nodeType": "ExpressionStatement",
"src": "30842:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1558,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1556,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1547,
"src": "30881:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int56",
"typeString": "int56"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1557,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1544,
"src": "30895:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "30881:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1565,
"nodeType": "IfStatement",
"src": "30877:97:0",
"trueBody": {
"id": 1564,
"nodeType": "Block",
"src": "30902:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3536",
"id": 1560,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "30953:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_56_by_1",
"typeString": "int_const 56"
},
"value": "56"
},
{
"id": 1561,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1544,
"src": "30957:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_56_by_1",
"typeString": "int_const 56"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1559,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "30923:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "30923:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1563,
"nodeType": "RevertStatement",
"src": "30916:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1542,
"nodeType": "StructuredDocumentation",
"src": "30448:307:0",
"text": " @dev Returns the downcasted int56 from int256, reverting on\n overflow (when the input is less than smallest int56 or\n greater than largest int56).\n Counterpart to Solidity's `int56` operator.\n Requirements:\n - input must fit into 56 bits"
},
"id": 1567,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt56",
"nameLocation": "30769:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1545,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1544,
"mutability": "mutable",
"name": "value",
"nameLocation": "30784:5:0",
"nodeType": "VariableDeclaration",
"scope": 1567,
"src": "30777:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1543,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "30777:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "30776:14:0"
},
"returnParameters": {
"id": 1548,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1547,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "30820:10:0",
"nodeType": "VariableDeclaration",
"scope": 1567,
"src": "30814:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int56",
"typeString": "int56"
},
"typeName": {
"id": 1546,
"name": "int56",
"nodeType": "ElementaryTypeName",
"src": "30814:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int56",
"typeString": "int56"
}
},
"visibility": "internal"
}
],
"src": "30813:18:0"
},
"scope": 1754,
"src": "30760:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1592,
"nodeType": "Block",
"src": "31370:148:0",
"statements": [
{
"expression": {
"id": 1580,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1575,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1573,
"src": "31380:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int48",
"typeString": "int48"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1578,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1570,
"src": "31399:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1577,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "31393:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int48_$",
"typeString": "type(int48)"
},
"typeName": {
"id": 1576,
"name": "int48",
"nodeType": "ElementaryTypeName",
"src": "31393:5:0",
"typeDescriptions": {}
}
},
"id": 1579,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "31393:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int48",
"typeString": "int48"
}
},
"src": "31380:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int48",
"typeString": "int48"
}
},
"id": 1581,
"nodeType": "ExpressionStatement",
"src": "31380:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1584,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1582,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1573,
"src": "31419:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int48",
"typeString": "int48"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1583,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1570,
"src": "31433:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "31419:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1591,
"nodeType": "IfStatement",
"src": "31415:97:0",
"trueBody": {
"id": 1590,
"nodeType": "Block",
"src": "31440:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3438",
"id": 1586,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "31491:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_48_by_1",
"typeString": "int_const 48"
},
"value": "48"
},
{
"id": 1587,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1570,
"src": "31495:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_48_by_1",
"typeString": "int_const 48"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1585,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "31461:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1588,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "31461:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1589,
"nodeType": "RevertStatement",
"src": "31454:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1568,
"nodeType": "StructuredDocumentation",
"src": "30986:307:0",
"text": " @dev Returns the downcasted int48 from int256, reverting on\n overflow (when the input is less than smallest int48 or\n greater than largest int48).\n Counterpart to Solidity's `int48` operator.\n Requirements:\n - input must fit into 48 bits"
},
"id": 1593,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt48",
"nameLocation": "31307:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1571,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1570,
"mutability": "mutable",
"name": "value",
"nameLocation": "31322:5:0",
"nodeType": "VariableDeclaration",
"scope": 1593,
"src": "31315:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1569,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "31315:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "31314:14:0"
},
"returnParameters": {
"id": 1574,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1573,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "31358:10:0",
"nodeType": "VariableDeclaration",
"scope": 1593,
"src": "31352:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int48",
"typeString": "int48"
},
"typeName": {
"id": 1572,
"name": "int48",
"nodeType": "ElementaryTypeName",
"src": "31352:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int48",
"typeString": "int48"
}
},
"visibility": "internal"
}
],
"src": "31351:18:0"
},
"scope": 1754,
"src": "31298:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1618,
"nodeType": "Block",
"src": "31908:148:0",
"statements": [
{
"expression": {
"id": 1606,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1601,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1599,
"src": "31918:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int40",
"typeString": "int40"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1604,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1596,
"src": "31937:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1603,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "31931:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int40_$",
"typeString": "type(int40)"
},
"typeName": {
"id": 1602,
"name": "int40",
"nodeType": "ElementaryTypeName",
"src": "31931:5:0",
"typeDescriptions": {}
}
},
"id": 1605,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "31931:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int40",
"typeString": "int40"
}
},
"src": "31918:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int40",
"typeString": "int40"
}
},
"id": 1607,
"nodeType": "ExpressionStatement",
"src": "31918:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1610,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1608,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1599,
"src": "31957:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int40",
"typeString": "int40"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1609,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1596,
"src": "31971:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "31957:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1617,
"nodeType": "IfStatement",
"src": "31953:97:0",
"trueBody": {
"id": 1616,
"nodeType": "Block",
"src": "31978:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3430",
"id": 1612,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "32029:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_40_by_1",
"typeString": "int_const 40"
},
"value": "40"
},
{
"id": 1613,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1596,
"src": "32033:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_40_by_1",
"typeString": "int_const 40"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1611,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "31999:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1614,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "31999:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1615,
"nodeType": "RevertStatement",
"src": "31992:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1594,
"nodeType": "StructuredDocumentation",
"src": "31524:307:0",
"text": " @dev Returns the downcasted int40 from int256, reverting on\n overflow (when the input is less than smallest int40 or\n greater than largest int40).\n Counterpart to Solidity's `int40` operator.\n Requirements:\n - input must fit into 40 bits"
},
"id": 1619,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt40",
"nameLocation": "31845:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1597,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1596,
"mutability": "mutable",
"name": "value",
"nameLocation": "31860:5:0",
"nodeType": "VariableDeclaration",
"scope": 1619,
"src": "31853:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1595,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "31853:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "31852:14:0"
},
"returnParameters": {
"id": 1600,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1599,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "31896:10:0",
"nodeType": "VariableDeclaration",
"scope": 1619,
"src": "31890:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int40",
"typeString": "int40"
},
"typeName": {
"id": 1598,
"name": "int40",
"nodeType": "ElementaryTypeName",
"src": "31890:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int40",
"typeString": "int40"
}
},
"visibility": "internal"
}
],
"src": "31889:18:0"
},
"scope": 1754,
"src": "31836:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1644,
"nodeType": "Block",
"src": "32446:148:0",
"statements": [
{
"expression": {
"id": 1632,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1627,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1625,
"src": "32456:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int32",
"typeString": "int32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1630,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "32475:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1629,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "32469:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int32_$",
"typeString": "type(int32)"
},
"typeName": {
"id": 1628,
"name": "int32",
"nodeType": "ElementaryTypeName",
"src": "32469:5:0",
"typeDescriptions": {}
}
},
"id": 1631,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "32469:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int32",
"typeString": "int32"
}
},
"src": "32456:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int32",
"typeString": "int32"
}
},
"id": 1633,
"nodeType": "ExpressionStatement",
"src": "32456:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1636,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1634,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1625,
"src": "32495:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int32",
"typeString": "int32"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1635,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "32509:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "32495:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1643,
"nodeType": "IfStatement",
"src": "32491:97:0",
"trueBody": {
"id": 1642,
"nodeType": "Block",
"src": "32516:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3332",
"id": 1638,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "32567:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
{
"id": 1639,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "32571:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1637,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "32537:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1640,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "32537:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1641,
"nodeType": "RevertStatement",
"src": "32530:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1620,
"nodeType": "StructuredDocumentation",
"src": "32062:307:0",
"text": " @dev Returns the downcasted int32 from int256, reverting on\n overflow (when the input is less than smallest int32 or\n greater than largest int32).\n Counterpart to Solidity's `int32` operator.\n Requirements:\n - input must fit into 32 bits"
},
"id": 1645,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt32",
"nameLocation": "32383:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1623,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1622,
"mutability": "mutable",
"name": "value",
"nameLocation": "32398:5:0",
"nodeType": "VariableDeclaration",
"scope": 1645,
"src": "32391:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1621,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "32391:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "32390:14:0"
},
"returnParameters": {
"id": 1626,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1625,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "32434:10:0",
"nodeType": "VariableDeclaration",
"scope": 1645,
"src": "32428:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int32",
"typeString": "int32"
},
"typeName": {
"id": 1624,
"name": "int32",
"nodeType": "ElementaryTypeName",
"src": "32428:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int32",
"typeString": "int32"
}
},
"visibility": "internal"
}
],
"src": "32427:18:0"
},
"scope": 1754,
"src": "32374:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1670,
"nodeType": "Block",
"src": "32984:148:0",
"statements": [
{
"expression": {
"id": 1658,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1653,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1651,
"src": "32994:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int24",
"typeString": "int24"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1656,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1648,
"src": "33013:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1655,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "33007:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int24_$",
"typeString": "type(int24)"
},
"typeName": {
"id": 1654,
"name": "int24",
"nodeType": "ElementaryTypeName",
"src": "33007:5:0",
"typeDescriptions": {}
}
},
"id": 1657,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "33007:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int24",
"typeString": "int24"
}
},
"src": "32994:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int24",
"typeString": "int24"
}
},
"id": 1659,
"nodeType": "ExpressionStatement",
"src": "32994:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1662,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1660,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1651,
"src": "33033:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int24",
"typeString": "int24"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1661,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1648,
"src": "33047:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "33033:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1669,
"nodeType": "IfStatement",
"src": "33029:97:0",
"trueBody": {
"id": 1668,
"nodeType": "Block",
"src": "33054:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3234",
"id": 1664,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "33105:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_24_by_1",
"typeString": "int_const 24"
},
"value": "24"
},
{
"id": 1665,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1648,
"src": "33109:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_24_by_1",
"typeString": "int_const 24"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1663,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "33075:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1666,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "33075:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1667,
"nodeType": "RevertStatement",
"src": "33068:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1646,
"nodeType": "StructuredDocumentation",
"src": "32600:307:0",
"text": " @dev Returns the downcasted int24 from int256, reverting on\n overflow (when the input is less than smallest int24 or\n greater than largest int24).\n Counterpart to Solidity's `int24` operator.\n Requirements:\n - input must fit into 24 bits"
},
"id": 1671,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt24",
"nameLocation": "32921:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1649,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1648,
"mutability": "mutable",
"name": "value",
"nameLocation": "32936:5:0",
"nodeType": "VariableDeclaration",
"scope": 1671,
"src": "32929:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1647,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "32929:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "32928:14:0"
},
"returnParameters": {
"id": 1652,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1651,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "32972:10:0",
"nodeType": "VariableDeclaration",
"scope": 1671,
"src": "32966:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int24",
"typeString": "int24"
},
"typeName": {
"id": 1650,
"name": "int24",
"nodeType": "ElementaryTypeName",
"src": "32966:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int24",
"typeString": "int24"
}
},
"visibility": "internal"
}
],
"src": "32965:18:0"
},
"scope": 1754,
"src": "32912:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1696,
"nodeType": "Block",
"src": "33522:148:0",
"statements": [
{
"expression": {
"id": 1684,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1679,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1677,
"src": "33532:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1682,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "33551:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1681,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "33545:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int16_$",
"typeString": "type(int16)"
},
"typeName": {
"id": 1680,
"name": "int16",
"nodeType": "ElementaryTypeName",
"src": "33545:5:0",
"typeDescriptions": {}
}
},
"id": 1683,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "33545:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"src": "33532:25:0",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"id": 1685,
"nodeType": "ExpressionStatement",
"src": "33532:25:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1688,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1686,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1677,
"src": "33571:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1687,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "33585:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "33571:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1695,
"nodeType": "IfStatement",
"src": "33567:97:0",
"trueBody": {
"id": 1694,
"nodeType": "Block",
"src": "33592:72:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "3136",
"id": 1690,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "33643:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
{
"id": 1691,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "33647:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1689,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "33613:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1692,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "33613:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1693,
"nodeType": "RevertStatement",
"src": "33606:47:0"
}
]
}
}
]
},
"documentation": {
"id": 1672,
"nodeType": "StructuredDocumentation",
"src": "33138:307:0",
"text": " @dev Returns the downcasted int16 from int256, reverting on\n overflow (when the input is less than smallest int16 or\n greater than largest int16).\n Counterpart to Solidity's `int16` operator.\n Requirements:\n - input must fit into 16 bits"
},
"id": 1697,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt16",
"nameLocation": "33459:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1675,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1674,
"mutability": "mutable",
"name": "value",
"nameLocation": "33474:5:0",
"nodeType": "VariableDeclaration",
"scope": 1697,
"src": "33467:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1673,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "33467:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "33466:14:0"
},
"returnParameters": {
"id": 1678,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1677,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "33510:10:0",
"nodeType": "VariableDeclaration",
"scope": 1697,
"src": "33504:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
},
"typeName": {
"id": 1676,
"name": "int16",
"nodeType": "ElementaryTypeName",
"src": "33504:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int16",
"typeString": "int16"
}
},
"visibility": "internal"
}
],
"src": "33503:18:0"
},
"scope": 1754,
"src": "33450:220:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1722,
"nodeType": "Block",
"src": "34053:146:0",
"statements": [
{
"expression": {
"id": 1710,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1705,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1703,
"src": "34063:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int8",
"typeString": "int8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 1708,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1700,
"src": "34081:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1707,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "34076:4:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int8_$",
"typeString": "type(int8)"
},
"typeName": {
"id": 1706,
"name": "int8",
"nodeType": "ElementaryTypeName",
"src": "34076:4:0",
"typeDescriptions": {}
}
},
"id": 1709,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "34076:11:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int8",
"typeString": "int8"
}
},
"src": "34063:24:0",
"typeDescriptions": {
"typeIdentifier": "t_int8",
"typeString": "int8"
}
},
"id": 1711,
"nodeType": "ExpressionStatement",
"src": "34063:24:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 1714,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1712,
"name": "downcasted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1703,
"src": "34101:10:0",
"typeDescriptions": {
"typeIdentifier": "t_int8",
"typeString": "int8"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1713,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1700,
"src": "34115:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "34101:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1721,
"nodeType": "IfStatement",
"src": "34097:96:0",
"trueBody": {
"id": 1720,
"nodeType": "Block",
"src": "34122:71:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"hexValue": "38",
"id": 1716,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "34173:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
{
"id": 1717,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1700,
"src": "34176:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1715,
"name": "SafeCastOverflowedIntDowncast",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21,
"src": "34143:29:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$",
"typeString": "function (uint8,int256) pure returns (error)"
}
},
"id": 1718,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "34143:39:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1719,
"nodeType": "RevertStatement",
"src": "34136:46:0"
}
]
}
}
]
},
"documentation": {
"id": 1698,
"nodeType": "StructuredDocumentation",
"src": "33676:302:0",
"text": " @dev Returns the downcasted int8 from int256, reverting on\n overflow (when the input is less than smallest int8 or\n greater than largest int8).\n Counterpart to Solidity's `int8` operator.\n Requirements:\n - input must fit into 8 bits"
},
"id": 1723,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt8",
"nameLocation": "33992:6:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1701,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1700,
"mutability": "mutable",
"name": "value",
"nameLocation": "34006:5:0",
"nodeType": "VariableDeclaration",
"scope": 1723,
"src": "33999:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1699,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "33999:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "33998:14:0"
},
"returnParameters": {
"id": 1704,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1703,
"mutability": "mutable",
"name": "downcasted",
"nameLocation": "34041:10:0",
"nodeType": "VariableDeclaration",
"scope": 1723,
"src": "34036:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int8",
"typeString": "int8"
},
"typeName": {
"id": 1702,
"name": "int8",
"nodeType": "ElementaryTypeName",
"src": "34036:4:0",
"typeDescriptions": {
"typeIdentifier": "t_int8",
"typeString": "int8"
}
},
"visibility": "internal"
}
],
"src": "34035:17:0"
},
"scope": 1754,
"src": "33983:216:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1752,
"nodeType": "Block",
"src": "34439:250:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1731,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1726,
"src": "34552:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"arguments": [
{
"expression": {
"arguments": [
{
"id": 1736,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "34573:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int256_$",
"typeString": "type(int256)"
},
"typeName": {
"id": 1735,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "34573:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_int256_$",
"typeString": "type(int256)"
}
],
"id": 1734,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "34568:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 1737,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "34568:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_int256",
"typeString": "type(int256)"
}
},
"id": 1738,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "34581:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "34568:16:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 1733,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "34560:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 1732,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "34560:7:0",
"typeDescriptions": {}
}
},
"id": 1739,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "34560:25:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "34552:33:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1746,
"nodeType": "IfStatement",
"src": "34548:105:0",
"trueBody": {
"id": 1745,
"nodeType": "Block",
"src": "34587:66:0",
"statements": [
{
"errorCall": {
"arguments": [
{
"id": 1742,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1726,
"src": "34636:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1741,
"name": "SafeCastOverflowedUintToInt",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 26,
"src": "34608:27:0",
"typeDescriptions": {
"typeIdentifier": "t_function_error_pure$_t_uint256_$returns$_t_error_$",
"typeString": "function (uint256) pure returns (error)"
}
},
"id": 1743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "34608:34:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_error",
"typeString": "error"
}
},
"id": 1744,
"nodeType": "RevertStatement",
"src": "34601:41:0"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 1749,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1726,
"src": "34676:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1748,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "34669:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_int256_$",
"typeString": "type(int256)"
},
"typeName": {
"id": 1747,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "34669:6:0",
"typeDescriptions": {}
}
},
"id": 1750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "34669:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"functionReturnParameters": 1730,
"id": 1751,
"nodeType": "Return",
"src": "34662:20:0"
}
]
},
"documentation": {
"id": 1724,
"nodeType": "StructuredDocumentation",
"src": "34205:165:0",
"text": " @dev Converts an unsigned uint256 into a signed int256.\n Requirements:\n - input must be less than or equal to maxInt256."
},
"id": 1753,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toInt256",
"nameLocation": "34384:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1727,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1726,
"mutability": "mutable",
"name": "value",
"nameLocation": "34401:5:0",
"nodeType": "VariableDeclaration",
"scope": 1753,
"src": "34393:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1725,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "34393:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "34392:15:0"
},
"returnParameters": {
"id": 1730,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1729,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1753,
"src": "34431:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 1728,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "34431:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "34430:8:0"
},
"scope": 1754,
"src": "34375:314:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 1755,
"src": "764:33927:0",
"usedErrors": [
9,
14,
21,
26
],
"usedEvents": []
}
],
"src": "192:34500:0"
},
"id": 0
},
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol": {
"ast": {
"absolutePath": "contracts/bridges/bridge/common/libraries/UncheckedMath.sol",
"exportedSymbols": {
"UncheckedMath": [
1786
]
},
"id": 1787,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1756,
"literals": [
"solidity",
"^",
"0.8",
".13"
],
"nodeType": "PragmaDirective",
"src": "35:24:1"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "UncheckedMath",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 1757,
"nodeType": "StructuredDocumentation",
"src": "63:129:1",
"text": " @author Matter Labs\n @custom:security-contact security@matterlabs.dev\n @notice The library for unchecked math."
},
"fullyImplemented": true,
"id": 1786,
"linearizedBaseContracts": [
1786
],
"name": "UncheckedMath",
"nameLocation": "202:13:1",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1769,
"nodeType": "Block",
"src": "294:73:1",
"statements": [
{
"id": 1768,
"nodeType": "UncheckedBlock",
"src": "305:55:1",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1766,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1764,
"name": "_number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1759,
"src": "337:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 1765,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "347:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "337:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1763,
"id": 1767,
"nodeType": "Return",
"src": "330:18:1"
}
]
}
]
},
"id": 1770,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "uncheckedInc",
"nameLocation": "232:12:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1760,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1759,
"mutability": "mutable",
"name": "_number",
"nameLocation": "253:7:1",
"nodeType": "VariableDeclaration",
"scope": 1770,
"src": "245:15:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1758,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "245:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "244:17:1"
},
"returnParameters": {
"id": 1763,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1762,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1770,
"src": "285:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1761,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "285:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "284:9:1"
},
"scope": 1786,
"src": "223:144:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1784,
"nodeType": "Block",
"src": "457:73:1",
"statements": [
{
"id": 1783,
"nodeType": "UncheckedBlock",
"src": "468:55:1",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1781,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1779,
"name": "_lhs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1772,
"src": "500:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 1780,
"name": "_rhs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1774,
"src": "507:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "500:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1778,
"id": 1782,
"nodeType": "Return",
"src": "493:18:1"
}
]
}
]
},
"id": 1785,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "uncheckedAdd",
"nameLocation": "384:12:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1775,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1772,
"mutability": "mutable",
"name": "_lhs",
"nameLocation": "405:4:1",
"nodeType": "VariableDeclaration",
"scope": 1785,
"src": "397:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1771,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "397:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1774,
"mutability": "mutable",
"name": "_rhs",
"nameLocation": "419:4:1",
"nodeType": "VariableDeclaration",
"scope": 1785,
"src": "411:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1773,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "411:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "396:28:1"
},
"returnParameters": {
"id": 1778,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1777,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1785,
"src": "448:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1776,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "448:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "447:9:1"
},
"scope": 1786,
"src": "375:155:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 1787,
"src": "194:339:1",
"usedErrors": [],
"usedEvents": []
}
],
"src": "35:500:1"
},
"id": 1
},
"contracts/bridges/bridge/zksync/libraries/Diamond.sol": {
"ast": {
"absolutePath": "contracts/bridges/bridge/zksync/libraries/Diamond.sol",
"exportedSymbols": {
"Diamond": [
2632
],
"SafeCast": [
1754
],
"UncheckedMath": [
1786
]
},
"id": 2633,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1788,
"literals": [
"solidity",
"^",
"0.8",
".13"
],
"nodeType": "PragmaDirective",
"src": "35:24:2"
},
{
"absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol",
"file": "@openzeppelin/contracts/utils/math/SafeCast.sol",
"id": 1789,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2633,
"sourceUnit": 1755,
"src": "63:57:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/bridges/bridge/common/libraries/UncheckedMath.sol",
"file": "../../common/libraries/UncheckedMath.sol",
"id": 1790,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2633,
"sourceUnit": 1787,
"src": "122:50:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Diamond",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 1791,
"nodeType": "StructuredDocumentation",
"src": "176:152:2",
"text": "@author Matter Labs\n @custom:security-contact security@matterlabs.dev\n @notice The helper library for managing the EIP-2535 diamond proxy."
},
"fullyImplemented": true,
"id": 2632,
"linearizedBaseContracts": [
2632
],
"name": "Diamond",
"nameLocation": "336:7:2",
"nodeType": "ContractDefinition",
"nodes": [
{
"global": false,
"id": 1794,
"libraryName": {
"id": 1792,
"name": "UncheckedMath",
"nameLocations": [
"357:13:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1786,
"src": "357:13:2"
},
"nodeType": "UsingForDirective",
"src": "351:32:2",
"typeName": {
"id": 1793,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "375:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"global": false,
"id": 1797,
"libraryName": {
"id": 1795,
"name": "SafeCast",
"nameLocations": [
"395:8:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1754,
"src": "395:8:2"
},
"nodeType": "UsingForDirective",
"src": "389:27:2",
"typeName": {
"id": 1796,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "408:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": true,
"documentation": {
"id": 1798,
"nodeType": "StructuredDocumentation",
"src": "424:209:2",
"text": "@dev Magic value that should be returned by diamond cut initialize contracts.\n @dev Used to distinguish calls to contracts that were supposed to be used as diamond initializer from other contracts."
},
"id": 1801,
"mutability": "constant",
"name": "DIAMOND_INIT_SUCCESS_RETURN_VALUE",
"nameLocation": "656:33:2",
"nodeType": "VariableDeclaration",
"scope": 2632,
"src": "639:128:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1799,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "639:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"hexValue": "307833333737346536353933303665343735303930353065393763623635316537333131383061343264343538323132323934643330373531393235633535316132",
"id": 1800,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "701:66:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_23278751153108618837080029810906392473473739873211709866650633671102544826786_by_1",
"typeString": "int_const 2327...(69 digits omitted)...6786"
},
"value": "0x33774e659306e47509050e97cb651e731180a42d458212294d30751925c551a2"
},
"visibility": "internal"
},
{
"constant": true,
"documentation": {
"id": 1802,
"nodeType": "StructuredDocumentation",
"src": "816:56:2",
"text": "@dev Storage position of `DiamondStorage` structure."
},
"id": 1805,
"mutability": "constant",
"name": "DIAMOND_STORAGE_POSITION",
"nameLocation": "895:24:2",
"nodeType": "VariableDeclaration",
"scope": 2632,
"src": "878:110:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1803,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "878:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"hexValue": "307863386663616438646238346433636331386234633431643535316561306565363664643539396364653036386439393865353764356530393333326331333162",
"id": 1804,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "922:66:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_90909012999857140622417080374671856515688564136957639390032885430481714942747_by_1",
"typeString": "int_const 9090...(69 digits omitted)...2747"
},
"value": "0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b"
},
"visibility": "internal"
},
{
"anonymous": false,
"eventSelector": "87b829356b3403d36217eff1f66ee48eacd0a69015153aba4f0de29fe5340c30",
"id": 1815,
"name": "DiamondCut",
"nameLocation": "1057:10:2",
"nodeType": "EventDefinition",
"parameters": {
"id": 1814,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1809,
"indexed": false,
"mutability": "mutable",
"name": "facetCuts",
"nameLocation": "1079:9:2",
"nodeType": "VariableDeclaration",
"scope": 1815,
"src": "1068:20:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut[]"
},
"typeName": {
"baseType": {
"id": 1807,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1806,
"name": "FacetCut",
"nameLocations": [
"1068:8:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1859,
"src": "1068:8:2"
},
"referencedDeclaration": 1859,
"src": "1068:8:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetCut_$1859_storage_ptr",
"typeString": "struct Diamond.FacetCut"
}
},
"id": 1808,
"nodeType": "ArrayTypeName",
"src": "1068:10:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_storage_$dyn_storage_ptr",
"typeString": "struct Diamond.FacetCut[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1811,
"indexed": false,
"mutability": "mutable",
"name": "initAddress",
"nameLocation": "1098:11:2",
"nodeType": "VariableDeclaration",
"scope": 1815,
"src": "1090:19:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1810,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1090:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1813,
"indexed": false,
"mutability": "mutable",
"name": "initCalldata",
"nameLocation": "1117:12:2",
"nodeType": "VariableDeclaration",
"scope": 1815,
"src": "1111:18:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1812,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1111:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1067:63:2"
},
"src": "1051:80:2"
},
{
"canonicalName": "Diamond.SelectorToFacet",
"documentation": {
"id": 1816,
"nodeType": "StructuredDocumentation",
"src": "1139:343:2",
"text": "@dev Utility struct that contains associated facet & meta information of selector\n @param facetAddress address of the facet which is connected with selector\n @param selectorPosition index in `FacetToSelectors.selectors` array, where is selector stored\n @param isFreezable denotes whether the selector can be frozen."
},
"id": 1823,
"members": [
{
"constant": false,
"id": 1818,
"mutability": "mutable",
"name": "facetAddress",
"nameLocation": "1530:12:2",
"nodeType": "VariableDeclaration",
"scope": 1823,
"src": "1522:20:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1817,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1522:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1820,
"mutability": "mutable",
"name": "selectorPosition",
"nameLocation": "1560:16:2",
"nodeType": "VariableDeclaration",
"scope": 1823,
"src": "1553:23:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 1819,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "1553:6:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1822,
"mutability": "mutable",
"name": "isFreezable",
"nameLocation": "1592:11:2",
"nodeType": "VariableDeclaration",
"scope": 1823,
"src": "1587:16:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1821,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1587:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"name": "SelectorToFacet",
"nameLocation": "1495:15:2",
"nodeType": "StructDefinition",
"scope": 2632,
"src": "1488:123:2",
"visibility": "public"
},
{
"canonicalName": "Diamond.FacetToSelectors",
"documentation": {
"id": 1824,
"nodeType": "StructuredDocumentation",
"src": "1619:251:2",
"text": "@dev Utility struct that contains associated selectors & meta information of facet\n @param selectors list of all selectors that belong to the facet\n @param facetPosition index in `DiamondStorage.facets` array, where is facet stored"
},
"id": 1830,
"members": [
{
"constant": false,
"id": 1827,
"mutability": "mutable",
"name": "selectors",
"nameLocation": "1920:9:2",
"nodeType": "VariableDeclaration",
"scope": 1830,
"src": "1911:18:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr",
"typeString": "bytes4[]"
},
"typeName": {
"baseType": {
"id": 1825,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "1911:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"id": 1826,
"nodeType": "ArrayTypeName",
"src": "1911:8:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr",
"typeString": "bytes4[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1829,
"mutability": "mutable",
"name": "facetPosition",
"nameLocation": "1947:13:2",
"nodeType": "VariableDeclaration",
"scope": 1830,
"src": "1940:20:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 1828,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "1940:6:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"visibility": "internal"
}
],
"name": "FacetToSelectors",
"nameLocation": "1883:16:2",
"nodeType": "StructDefinition",
"scope": 2632,
"src": "1876:92:2",
"visibility": "public"
},
{
"canonicalName": "Diamond.DiamondStorage",
"documentation": {
"id": 1831,
"nodeType": "StructuredDocumentation",
"src": "1976:603:2",
"text": "@notice The structure that holds all diamond proxy associated parameters\n @dev According to the EIP-2535 should be stored on a special storage key - `DIAMOND_STORAGE_POSITION`\n @param selectorToFacet A mapping from the selector to the facet address and its meta information\n @param facetToSelectors A mapping from facet address to its selectors with meta information\n @param facets The array of all unique facet addresses that belong to the diamond proxy\n @param isFrozen Denotes whether the diamond proxy is frozen and all freezable facets are not accessible"
},
"id": 1847,
"members": [
{
"constant": false,
"id": 1836,
"mutability": "mutable",
"name": "selectorToFacet",
"nameLocation": "2653:15:2",
"nodeType": "VariableDeclaration",
"scope": 1847,
"src": "2618:50:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet)"
},
"typeName": {
"id": 1835,
"keyName": "",
"keyNameLocation": "-1:-1:-1",
"keyType": {
"id": 1832,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "2626:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "Mapping",
"src": "2618:34:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet)"
},
"valueName": "",
"valueNameLocation": "-1:-1:-1",
"valueType": {
"id": 1834,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1833,
"name": "SelectorToFacet",
"nameLocations": [
"2636:15:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1823,
"src": "2636:15:2"
},
"referencedDeclaration": 1823,
"src": "2636:15:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage_ptr",
"typeString": "struct Diamond.SelectorToFacet"
}
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1841,
"mutability": "mutable",
"name": "facetToSelectors",
"nameLocation": "2716:16:2",
"nodeType": "VariableDeclaration",
"scope": 1847,
"src": "2679:53:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors)"
},
"typeName": {
"id": 1840,
"keyName": "",
"keyNameLocation": "-1:-1:-1",
"keyType": {
"id": 1837,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2687:7:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "2679:36:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors)"
},
"valueName": "",
"valueNameLocation": "-1:-1:-1",
"valueType": {
"id": 1839,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1838,
"name": "FacetToSelectors",
"nameLocations": [
"2698:16:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1830,
"src": "2698:16:2"
},
"referencedDeclaration": 1830,
"src": "2698:16:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage_ptr",
"typeString": "struct Diamond.FacetToSelectors"
}
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1844,
"mutability": "mutable",
"name": "facets",
"nameLocation": "2753:6:2",
"nodeType": "VariableDeclaration",
"scope": 1847,
"src": "2743:16:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1842,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2743:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1843,
"nodeType": "ArrayTypeName",
"src": "2743:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1846,
"mutability": "mutable",
"name": "isFrozen",
"nameLocation": "2775:8:2",
"nodeType": "VariableDeclaration",
"scope": 1847,
"src": "2770:13:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1845,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2770:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"name": "DiamondStorage",
"nameLocation": "2592:14:2",
"nodeType": "StructDefinition",
"scope": 2632,
"src": "2585:206:2",
"visibility": "public"
},
{
"canonicalName": "Diamond.FacetCut",
"documentation": {
"id": 1848,
"nodeType": "StructuredDocumentation",
"src": "2799:377:2",
"text": "@dev Parameters for diamond changes that touch one of the facets\n @param facet The address of facet that's affected by the cut\n @param action The action that is made on the facet\n @param isFreezable Denotes whether the facet & all their selectors can be frozen\n @param selectors An array of unique selectors that belongs to the facet address"
},
"id": 1859,
"members": [
{
"constant": false,
"id": 1850,
"mutability": "mutable",
"name": "facet",
"nameLocation": "3217:5:2",
"nodeType": "VariableDeclaration",
"scope": 1859,
"src": "3209:13:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1849,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3209:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1853,
"mutability": "mutable",
"name": "action",
"nameLocation": "3240:6:2",
"nodeType": "VariableDeclaration",
"scope": 1859,
"src": "3233:13:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
},
"typeName": {
"id": 1852,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1851,
"name": "Action",
"nameLocations": [
"3233:6:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1874,
"src": "3233:6:2"
},
"referencedDeclaration": 1874,
"src": "3233:6:2",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1855,
"mutability": "mutable",
"name": "isFreezable",
"nameLocation": "3262:11:2",
"nodeType": "VariableDeclaration",
"scope": 1859,
"src": "3257:16:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1854,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3257:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1858,
"mutability": "mutable",
"name": "selectors",
"nameLocation": "3293:9:2",
"nodeType": "VariableDeclaration",
"scope": 1859,
"src": "3284:18:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr",
"typeString": "bytes4[]"
},
"typeName": {
"baseType": {
"id": 1856,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "3284:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"id": 1857,
"nodeType": "ArrayTypeName",
"src": "3284:8:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr",
"typeString": "bytes4[]"
}
},
"visibility": "internal"
}
],
"name": "FacetCut",
"nameLocation": "3189:8:2",
"nodeType": "StructDefinition",
"scope": 2632,
"src": "3182:128:2",
"visibility": "public"
},
{
"canonicalName": "Diamond.DiamondCutData",
"documentation": {
"id": 1860,
"nodeType": "StructuredDocumentation",
"src": "3318:325:2",
"text": "@dev Structure of the diamond proxy changes\n @param facetCuts The set of changes (adding/removing/replacement) of implementation contracts\n @param initAddress The address that's delegate called after setting up new facet changes\n @param initCalldata Calldata for the delegate call to `initAddress`"
},
"id": 1869,
"members": [
{
"constant": false,
"id": 1864,
"mutability": "mutable",
"name": "facetCuts",
"nameLocation": "3693:9:2",
"nodeType": "VariableDeclaration",
"scope": 1869,
"src": "3682:20:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_storage_$dyn_storage_ptr",
"typeString": "struct Diamond.FacetCut[]"
},
"typeName": {
"baseType": {
"id": 1862,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1861,
"name": "FacetCut",
"nameLocations": [
"3682:8:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1859,
"src": "3682:8:2"
},
"referencedDeclaration": 1859,
"src": "3682:8:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetCut_$1859_storage_ptr",
"typeString": "struct Diamond.FacetCut"
}
},
"id": 1863,
"nodeType": "ArrayTypeName",
"src": "3682:10:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_storage_$dyn_storage_ptr",
"typeString": "struct Diamond.FacetCut[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1866,
"mutability": "mutable",
"name": "initAddress",
"nameLocation": "3721:11:2",
"nodeType": "VariableDeclaration",
"scope": 1869,
"src": "3713:19:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1865,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3713:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1868,
"mutability": "mutable",
"name": "initCalldata",
"nameLocation": "3749:12:2",
"nodeType": "VariableDeclaration",
"scope": 1869,
"src": "3743:18:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1867,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3743:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"name": "DiamondCutData",
"nameLocation": "3656:14:2",
"nodeType": "StructDefinition",
"scope": 2632,
"src": "3649:120:2",
"visibility": "public"
},
{
"canonicalName": "Diamond.Action",
"documentation": {
"id": 1870,
"nodeType": "StructuredDocumentation",
"src": "3777:63:2",
"text": "@dev Type of change over diamond: add/replace/remove facets"
},
"id": 1874,
"members": [
{
"id": 1871,
"name": "Add",
"nameLocation": "3869:3:2",
"nodeType": "EnumValue",
"src": "3869:3:2"
},
{
"id": 1872,
"name": "Replace",
"nameLocation": "3883:7:2",
"nodeType": "EnumValue",
"src": "3883:7:2"
},
{
"id": 1873,
"name": "Remove",
"nameLocation": "3901:6:2",
"nodeType": "EnumValue",
"src": "3901:6:2"
}
],
"name": "Action",
"nameLocation": "3851:6:2",
"nodeType": "EnumDefinition",
"src": "3846:68:2"
},
{
"body": {
"id": 1886,
"nodeType": "Block",
"src": "4123:138:2",
"statements": [
{
"assignments": [
1882
],
"declarations": [
{
"constant": false,
"id": 1882,
"mutability": "mutable",
"name": "position",
"nameLocation": "4142:8:2",
"nodeType": "VariableDeclaration",
"scope": 1886,
"src": "4134:16:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1881,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "4134:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"id": 1884,
"initialValue": {
"id": 1883,
"name": "DIAMOND_STORAGE_POSITION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1805,
"src": "4153:24:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4134:43:2"
},
{
"AST": {
"nativeSrc": "4197:57:2",
"nodeType": "YulBlock",
"src": "4197:57:2",
"statements": [
{
"nativeSrc": "4212:31:2",
"nodeType": "YulAssignment",
"src": "4212:31:2",
"value": {
"name": "position",
"nativeSrc": "4235:8:2",
"nodeType": "YulIdentifier",
"src": "4235:8:2"
},
"variableNames": [
{
"name": "diamondStorage.slot",
"nativeSrc": "4212:19:2",
"nodeType": "YulIdentifier",
"src": "4212:19:2"
}
]
}
]
},
"evmVersion": "cancun",
"externalReferences": [
{
"declaration": 1879,
"isOffset": false,
"isSlot": true,
"src": "4212:19:2",
"suffix": "slot",
"valueSize": 1
},
{
"declaration": 1882,
"isOffset": false,
"isSlot": false,
"src": "4235:8:2",
"valueSize": 1
}
],
"id": 1885,
"nodeType": "InlineAssembly",
"src": "4188:66:2"
}
]
},
"documentation": {
"id": 1875,
"nodeType": "StructuredDocumentation",
"src": "3922:104:2",
"text": "@return diamondStorage The pointer to the storage where all specific diamond proxy parameters stored"
},
"id": 1887,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getDiamondStorage",
"nameLocation": "4041:17:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1876,
"nodeType": "ParameterList",
"parameters": [],
"src": "4058:2:2"
},
"returnParameters": {
"id": 1880,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1879,
"mutability": "mutable",
"name": "diamondStorage",
"nameLocation": "4107:14:2",
"nodeType": "VariableDeclaration",
"scope": 1887,
"src": "4084:37:2",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
},
"typeName": {
"id": 1878,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1877,
"name": "DiamondStorage",
"nameLocations": [
"4084:14:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1847,
"src": "4084:14:2"
},
"referencedDeclaration": 1847,
"src": "4084:14:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
}
},
"visibility": "internal"
}
],
"src": "4083:39:2"
},
"scope": 2632,
"src": "4032:229:2",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2023,
"nodeType": "Block",
"src": "4553:1200:2",
"statements": [
{
"assignments": [
1898
],
"declarations": [
{
"constant": false,
"id": 1898,
"mutability": "mutable",
"name": "facetCuts",
"nameLocation": "4582:9:2",
"nodeType": "VariableDeclaration",
"scope": 2023,
"src": "4564:27:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut[]"
},
"typeName": {
"baseType": {
"id": 1896,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1895,
"name": "FacetCut",
"nameLocations": [
"4564:8:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1859,
"src": "4564:8:2"
},
"referencedDeclaration": 1859,
"src": "4564:8:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetCut_$1859_storage_ptr",
"typeString": "struct Diamond.FacetCut"
}
},
"id": 1897,
"nodeType": "ArrayTypeName",
"src": "4564:10:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_storage_$dyn_storage_ptr",
"typeString": "struct Diamond.FacetCut[]"
}
},
"visibility": "internal"
}
],
"id": 1901,
"initialValue": {
"expression": {
"id": 1899,
"name": "_diamondCut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1891,
"src": "4594:11:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondCutData_$1869_memory_ptr",
"typeString": "struct Diamond.DiamondCutData memory"
}
},
"id": 1900,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4606:9:2",
"memberName": "facetCuts",
"nodeType": "MemberAccess",
"referencedDeclaration": 1864,
"src": "4594:21:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut memory[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4564:51:2"
},
{
"assignments": [
1903
],
"declarations": [
{
"constant": false,
"id": 1903,
"mutability": "mutable",
"name": "initAddress",
"nameLocation": "4634:11:2",
"nodeType": "VariableDeclaration",
"scope": 2023,
"src": "4626:19:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1902,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4626:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 1906,
"initialValue": {
"expression": {
"id": 1904,
"name": "_diamondCut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1891,
"src": "4648:11:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondCutData_$1869_memory_ptr",
"typeString": "struct Diamond.DiamondCutData memory"
}
},
"id": 1905,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4660:11:2",
"memberName": "initAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 1866,
"src": "4648:23:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4626:45:2"
},
{
"assignments": [
1908
],
"declarations": [
{
"constant": false,
"id": 1908,
"mutability": "mutable",
"name": "initCalldata",
"nameLocation": "4695:12:2",
"nodeType": "VariableDeclaration",
"scope": 2023,
"src": "4682:25:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1907,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "4682:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 1911,
"initialValue": {
"expression": {
"id": 1909,
"name": "_diamondCut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1891,
"src": "4710:11:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondCutData_$1869_memory_ptr",
"typeString": "struct Diamond.DiamondCutData memory"
}
},
"id": 1910,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4722:12:2",
"memberName": "initCalldata",
"nodeType": "MemberAccess",
"referencedDeclaration": 1868,
"src": "4710:24:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4682:52:2"
},
{
"assignments": [
1913
],
"declarations": [
{
"constant": false,
"id": 1913,
"mutability": "mutable",
"name": "facetCutsLength",
"nameLocation": "4753:15:2",
"nodeType": "VariableDeclaration",
"scope": 2023,
"src": "4745:23:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1912,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4745:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 1916,
"initialValue": {
"expression": {
"id": 1914,
"name": "facetCuts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "4771:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut memory[] memory"
}
},
"id": 1915,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4781:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "4771:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4745:42:2"
},
{
"body": {
"id": 2010,
"nodeType": "Block",
"src": "4861:760:2",
"statements": [
{
"assignments": [
1932
],
"declarations": [
{
"constant": false,
"id": 1932,
"mutability": "mutable",
"name": "action",
"nameLocation": "4883:6:2",
"nodeType": "VariableDeclaration",
"scope": 2010,
"src": "4876:13:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
},
"typeName": {
"id": 1931,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1930,
"name": "Action",
"nameLocations": [
"4876:6:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1874,
"src": "4876:6:2"
},
"referencedDeclaration": 1874,
"src": "4876:6:2",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
}
},
"visibility": "internal"
}
],
"id": 1937,
"initialValue": {
"expression": {
"baseExpression": {
"id": 1933,
"name": "facetCuts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "4892:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut memory[] memory"
}
},
"id": 1935,
"indexExpression": {
"id": 1934,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1918,
"src": "4902:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4892:12:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetCut_$1859_memory_ptr",
"typeString": "struct Diamond.FacetCut memory"
}
},
"id": 1936,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4905:6:2",
"memberName": "action",
"nodeType": "MemberAccess",
"referencedDeclaration": 1853,
"src": "4892:19:2",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4876:35:2"
},
{
"assignments": [
1939
],
"declarations": [
{
"constant": false,
"id": 1939,
"mutability": "mutable",
"name": "facet",
"nameLocation": "4934:5:2",
"nodeType": "VariableDeclaration",
"scope": 2010,
"src": "4926:13:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1938,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4926:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 1944,
"initialValue": {
"expression": {
"baseExpression": {
"id": 1940,
"name": "facetCuts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "4942:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut memory[] memory"
}
},
"id": 1942,
"indexExpression": {
"id": 1941,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1918,
"src": "4952:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4942:12:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetCut_$1859_memory_ptr",
"typeString": "struct Diamond.FacetCut memory"
}
},
"id": 1943,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4955:5:2",
"memberName": "facet",
"nodeType": "MemberAccess",
"referencedDeclaration": 1850,
"src": "4942:18:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4926:34:2"
},
{
"assignments": [
1946
],
"declarations": [
{
"constant": false,
"id": 1946,
"mutability": "mutable",
"name": "isFacetFreezable",
"nameLocation": "4980:16:2",
"nodeType": "VariableDeclaration",
"scope": 2010,
"src": "4975:21:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1945,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4975:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"id": 1951,
"initialValue": {
"expression": {
"baseExpression": {
"id": 1947,
"name": "facetCuts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "4999:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut memory[] memory"
}
},
"id": 1949,
"indexExpression": {
"id": 1948,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1918,
"src": "5009:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4999:12:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetCut_$1859_memory_ptr",
"typeString": "struct Diamond.FacetCut memory"
}
},
"id": 1950,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5012:11:2",
"memberName": "isFreezable",
"nodeType": "MemberAccess",
"referencedDeclaration": 1855,
"src": "4999:24:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4975:48:2"
},
{
"assignments": [
1956
],
"declarations": [
{
"constant": false,
"id": 1956,
"mutability": "mutable",
"name": "selectors",
"nameLocation": "5054:9:2",
"nodeType": "VariableDeclaration",
"scope": 2010,
"src": "5038:25:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[]"
},
"typeName": {
"baseType": {
"id": 1954,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "5038:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"id": 1955,
"nodeType": "ArrayTypeName",
"src": "5038:8:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr",
"typeString": "bytes4[]"
}
},
"visibility": "internal"
}
],
"id": 1961,
"initialValue": {
"expression": {
"baseExpression": {
"id": 1957,
"name": "facetCuts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "5066:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut memory[] memory"
}
},
"id": 1959,
"indexExpression": {
"id": 1958,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1918,
"src": "5076:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "5066:12:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetCut_$1859_memory_ptr",
"typeString": "struct Diamond.FacetCut memory"
}
},
"id": 1960,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5079:9:2",
"memberName": "selectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1858,
"src": "5066:22:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5038:50:2"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1966,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 1963,
"name": "selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1956,
"src": "5113:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"id": 1964,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5123:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "5113:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 1965,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5132:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "5113:20:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "42",
"id": 1967,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5135:3:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_1f675bff07515f5df96737194ea945c36c41e7b4fcef307b7cd4d0e602a69111",
"typeString": "literal_string \"B\""
},
"value": "B"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_1f675bff07515f5df96737194ea945c36c41e7b4fcef307b7cd4d0e602a69111",
"typeString": "literal_string \"B\""
}
],
"id": 1962,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5105:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1968,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5105:34:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1969,
"nodeType": "ExpressionStatement",
"src": "5105:34:2"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
},
"id": 1973,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1970,
"name": "action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1932,
"src": "5192:6:2",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 1971,
"name": "Action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1874,
"src": "5202:6:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Action_$1874_$",
"typeString": "type(enum Diamond.Action)"
}
},
"id": 1972,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "5209:3:2",
"memberName": "Add",
"nodeType": "MemberAccess",
"referencedDeclaration": 1871,
"src": "5202:10:2",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
}
},
"src": "5192:20:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
},
"id": 1984,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1981,
"name": "action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1932,
"src": "5308:6:2",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 1982,
"name": "Action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1874,
"src": "5318:6:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Action_$1874_$",
"typeString": "type(enum Diamond.Action)"
}
},
"id": 1983,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "5325:7:2",
"memberName": "Replace",
"nodeType": "MemberAccess",
"referencedDeclaration": 1872,
"src": "5318:14:2",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
}
},
"src": "5308:24:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
},
"id": 1995,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1992,
"name": "action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1932,
"src": "5432:6:2",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 1993,
"name": "Action",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1874,
"src": "5442:6:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Action_$1874_$",
"typeString": "type(enum Diamond.Action)"
}
},
"id": 1994,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "5449:6:2",
"memberName": "Remove",
"nodeType": "MemberAccess",
"referencedDeclaration": 1873,
"src": "5442:13:2",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Action_$1874",
"typeString": "enum Diamond.Action"
}
},
"src": "5432:23:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 2006,
"nodeType": "Block",
"src": "5532:78:2",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "43",
"id": 2003,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5558:3:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_017e667f4b8c174291d1543c466717566e206df1bfd6f30271055ddafdb18f72",
"typeString": "literal_string \"C\""
},
"value": "C"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_017e667f4b8c174291d1543c466717566e206df1bfd6f30271055ddafdb18f72",
"typeString": "literal_string \"C\""
}
],
"id": 2002,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967277,
4294967277
],
"referencedDeclaration": 4294967277,
"src": "5551:6:2",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
"id": 2004,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5551:11:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2005,
"nodeType": "ExpressionStatement",
"src": "5551:11:2"
}
]
},
"id": 2007,
"nodeType": "IfStatement",
"src": "5428:182:2",
"trueBody": {
"id": 2001,
"nodeType": "Block",
"src": "5457:69:2",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1997,
"name": "facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1939,
"src": "5493:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1998,
"name": "selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1956,
"src": "5500:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
],
"id": 1996,
"name": "_removeFunctions",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "5476:16:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_bytes4_$dyn_memory_ptr_$returns$__$",
"typeString": "function (address,bytes4[] memory)"
}
},
"id": 1999,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5476:34:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2000,
"nodeType": "ExpressionStatement",
"src": "5476:34:2"
}
]
}
},
"id": 2008,
"nodeType": "IfStatement",
"src": "5304:306:2",
"trueBody": {
"id": 1991,
"nodeType": "Block",
"src": "5334:88:2",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1986,
"name": "facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1939,
"src": "5371:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1987,
"name": "selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1956,
"src": "5378:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
{
"id": 1988,
"name": "isFacetFreezable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1946,
"src": "5389:16:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1985,
"name": "_replaceFunctions",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2196,
"src": "5353:17:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_bytes4_$dyn_memory_ptr_$_t_bool_$returns$__$",
"typeString": "function (address,bytes4[] memory,bool)"
}
},
"id": 1989,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5353:53:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1990,
"nodeType": "ExpressionStatement",
"src": "5353:53:2"
}
]
}
},
"id": 2009,
"nodeType": "IfStatement",
"src": "5188:422:2",
"trueBody": {
"id": 1980,
"nodeType": "Block",
"src": "5214:84:2",
"statements": [
{
"expression": {
"arguments": [
{
"id": 1975,
"name": "facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1939,
"src": "5247:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 1976,
"name": "selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1956,
"src": "5254:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
{
"id": 1977,
"name": "isFacetFreezable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1946,
"src": "5265:16:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1974,
"name": "_addFunctions",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2107,
"src": "5233:13:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_bytes4_$dyn_memory_ptr_$_t_bool_$returns$__$",
"typeString": "function (address,bytes4[] memory,bool)"
}
},
"id": 1978,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5233:49:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1979,
"nodeType": "ExpressionStatement",
"src": "5233:49:2"
}
]
}
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1923,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1921,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1918,
"src": "4818:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 1922,
"name": "facetCutsLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1913,
"src": "4822:15:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4818:19:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2011,
"initializationExpression": {
"assignments": [
1918
],
"declarations": [
{
"constant": false,
"id": 1918,
"mutability": "mutable",
"name": "i",
"nameLocation": "4811:1:2",
"nodeType": "VariableDeclaration",
"scope": 2011,
"src": "4803:9:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1917,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4803:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 1920,
"initialValue": {
"hexValue": "30",
"id": 1919,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4815:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "4803:13:2"
},
"isSimpleCounterLoop": false,
"loopExpression": {
"expression": {
"id": 1928,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1924,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1918,
"src": "4839:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"id": 1925,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1918,
"src": "4843:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1926,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4845:12:2",
"memberName": "uncheckedInc",
"nodeType": "MemberAccess",
"referencedDeclaration": 1770,
"src": "4843:14:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$attached_to$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 1927,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4843:16:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4839:20:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1929,
"nodeType": "ExpressionStatement",
"src": "4839:20:2"
},
"nodeType": "ForStatement",
"src": "4798:823:2"
},
{
"expression": {
"arguments": [
{
"id": 2013,
"name": "initAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1903,
"src": "5655:11:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2014,
"name": "initCalldata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1908,
"src": "5668:12:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 2012,
"name": "_initializeDiamondCut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2631,
"src": "5633:21:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (address,bytes memory)"
}
},
"id": 2015,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5633:48:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2016,
"nodeType": "ExpressionStatement",
"src": "5633:48:2"
},
{
"eventCall": {
"arguments": [
{
"id": 2018,
"name": "facetCuts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "5708:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut memory[] memory"
}
},
{
"id": 2019,
"name": "initAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1903,
"src": "5719:11:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2020,
"name": "initCalldata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1908,
"src": "5732:12:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr",
"typeString": "struct Diamond.FacetCut memory[] memory"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 2017,
"name": "DiamondCut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1815,
"src": "5697:10:2",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_array$_t_struct$_FacetCut_$1859_memory_ptr_$dyn_memory_ptr_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (struct Diamond.FacetCut memory[] memory,address,bytes memory)"
}
},
"id": 2021,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "5697:48:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2022,
"nodeType": "EmitStatement",
"src": "5692:53:2"
}
]
},
"documentation": {
"id": 1888,
"nodeType": "StructuredDocumentation",
"src": "4269:214:2",
"text": "@dev Add/replace/remove any number of selectors and optionally execute a function with delegatecall\n @param _diamondCut Diamond's facet changes and the parameters to optional initialization delegatecall"
},
"id": 2024,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "diamondCut",
"nameLocation": "4498:10:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1892,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1891,
"mutability": "mutable",
"name": "_diamondCut",
"nameLocation": "4531:11:2",
"nodeType": "VariableDeclaration",
"scope": 2024,
"src": "4509:33:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondCutData_$1869_memory_ptr",
"typeString": "struct Diamond.DiamondCutData"
},
"typeName": {
"id": 1890,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 1889,
"name": "DiamondCutData",
"nameLocations": [
"4509:14:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1869,
"src": "4509:14:2"
},
"referencedDeclaration": 1869,
"src": "4509:14:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondCutData_$1869_storage_ptr",
"typeString": "struct Diamond.DiamondCutData"
}
},
"visibility": "internal"
}
],
"src": "4508:35:2"
},
"returnParameters": {
"id": 1893,
"nodeType": "ParameterList",
"parameters": [],
"src": "4553:0:2"
},
"scope": 2632,
"src": "4489:1264:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2106,
"nodeType": "Block",
"src": "6022:707:2",
"statements": [
{
"assignments": [
2037
],
"declarations": [
{
"constant": false,
"id": 2037,
"mutability": "mutable",
"name": "ds",
"nameLocation": "6056:2:2",
"nodeType": "VariableDeclaration",
"scope": 2106,
"src": "6033:25:2",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
},
"typeName": {
"id": 2036,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2035,
"name": "DiamondStorage",
"nameLocations": [
"6033:14:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1847,
"src": "6033:14:2"
},
"referencedDeclaration": 1847,
"src": "6033:14:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
}
},
"visibility": "internal"
}
],
"id": 2040,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2038,
"name": "getDiamondStorage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1887,
"src": "6061:17:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DiamondStorage_$1847_storage_ptr_$",
"typeString": "function () pure returns (struct Diamond.DiamondStorage storage pointer)"
}
},
"id": 2039,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6061:19:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6033:47:2"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2047,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2042,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2027,
"src": "6101:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 2045,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6119:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2044,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "6111:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 2043,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6111:7:2",
"typeDescriptions": {}
}
},
"id": 2046,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6111:10:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "6101:20:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "47",
"id": 2048,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6123:3:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_077da99d806abd13c9f15ece5398525119d11e11e9836b2ee7d23f6159ad87d2",
"typeString": "literal_string \"G\""
},
"value": "G"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_077da99d806abd13c9f15ece5398525119d11e11e9836b2ee7d23f6159ad87d2",
"typeString": "literal_string \"G\""
}
],
"id": 2041,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "6093:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2049,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6093:34:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2050,
"nodeType": "ExpressionStatement",
"src": "6093:34:2"
},
{
"expression": {
"arguments": [
{
"id": 2052,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2027,
"src": "6275:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2051,
"name": "_saveFacetIfNew",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2321,
"src": "6259:15:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 2053,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6259:23:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2054,
"nodeType": "ExpressionStatement",
"src": "6259:23:2"
},
{
"assignments": [
2056
],
"declarations": [
{
"constant": false,
"id": 2056,
"mutability": "mutable",
"name": "selectorsLength",
"nameLocation": "6303:15:2",
"nodeType": "VariableDeclaration",
"scope": 2106,
"src": "6295:23:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2055,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6295:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2059,
"initialValue": {
"expression": {
"id": 2057,
"name": "_selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2030,
"src": "6321:10:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"id": 2058,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6332:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "6321:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6295:43:2"
},
{
"body": {
"id": 2104,
"nodeType": "Block",
"src": "6412:310:2",
"statements": [
{
"assignments": [
2074
],
"declarations": [
{
"constant": false,
"id": 2074,
"mutability": "mutable",
"name": "selector",
"nameLocation": "6434:8:2",
"nodeType": "VariableDeclaration",
"scope": 2104,
"src": "6427:15:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2073,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "6427:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"id": 2078,
"initialValue": {
"baseExpression": {
"id": 2075,
"name": "_selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2030,
"src": "6445:10:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"id": 2077,
"indexExpression": {
"id": 2076,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2061,
"src": "6456:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6445:13:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6427:31:2"
},
{
"assignments": [
2081
],
"declarations": [
{
"constant": false,
"id": 2081,
"mutability": "mutable",
"name": "oldFacet",
"nameLocation": "6496:8:2",
"nodeType": "VariableDeclaration",
"scope": 2104,
"src": "6473:31:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_memory_ptr",
"typeString": "struct Diamond.SelectorToFacet"
},
"typeName": {
"id": 2080,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2079,
"name": "SelectorToFacet",
"nameLocations": [
"6473:15:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1823,
"src": "6473:15:2"
},
"referencedDeclaration": 1823,
"src": "6473:15:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage_ptr",
"typeString": "struct Diamond.SelectorToFacet"
}
},
"visibility": "internal"
}
],
"id": 2086,
"initialValue": {
"baseExpression": {
"expression": {
"id": 2082,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2037,
"src": "6507:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2083,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6510:15:2",
"memberName": "selectorToFacet",
"nodeType": "MemberAccess",
"referencedDeclaration": 1836,
"src": "6507:18:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet storage ref)"
}
},
"id": 2085,
"indexExpression": {
"id": 2084,
"name": "selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2074,
"src": "6526:8:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6507:28:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage",
"typeString": "struct Diamond.SelectorToFacet storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6473:62:2"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 2088,
"name": "oldFacet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2081,
"src": "6558:8:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_memory_ptr",
"typeString": "struct Diamond.SelectorToFacet memory"
}
},
"id": 2089,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6567:12:2",
"memberName": "facetAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 1818,
"src": "6558:21:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 2092,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6591:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2091,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "6583:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 2090,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6583:7:2",
"typeDescriptions": {}
}
},
"id": 2093,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6583:10:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "6558:35:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4a",
"id": 2095,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6595:3:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_90174c907fea3d27ea14230ef6800c7bde0f907fb10d2c747a17af161f784d19",
"typeString": "literal_string \"J\""
},
"value": "J"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_90174c907fea3d27ea14230ef6800c7bde0f907fb10d2c747a17af161f784d19",
"typeString": "literal_string \"J\""
}
],
"id": 2087,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "6550:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2096,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6550:49:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2097,
"nodeType": "ExpressionStatement",
"src": "6550:49:2"
},
{
"expression": {
"arguments": [
{
"id": 2099,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2027,
"src": "6674:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2100,
"name": "selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2074,
"src": "6682:8:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
{
"id": 2101,
"name": "_isFacetFreezable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2032,
"src": "6692:17:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 2098,
"name": "_addOneFunction",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2398,
"src": "6658:15:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes4_$_t_bool_$returns$__$",
"typeString": "function (address,bytes4,bool)"
}
},
"id": 2102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6658:52:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2103,
"nodeType": "ExpressionStatement",
"src": "6658:52:2"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2066,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2064,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2061,
"src": "6369:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 2065,
"name": "selectorsLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2056,
"src": "6373:15:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6369:19:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2105,
"initializationExpression": {
"assignments": [
2061
],
"declarations": [
{
"constant": false,
"id": 2061,
"mutability": "mutable",
"name": "i",
"nameLocation": "6362:1:2",
"nodeType": "VariableDeclaration",
"scope": 2105,
"src": "6354:9:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2060,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6354:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2063,
"initialValue": {
"hexValue": "30",
"id": 2062,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6366:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "6354:13:2"
},
"isSimpleCounterLoop": false,
"loopExpression": {
"expression": {
"id": 2071,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 2067,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2061,
"src": "6390:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"id": 2068,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2061,
"src": "6394:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2069,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6396:12:2",
"memberName": "uncheckedInc",
"nodeType": "MemberAccess",
"referencedDeclaration": 1770,
"src": "6394:14:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$attached_to$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 2070,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "6394:16:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6390:20:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2072,
"nodeType": "ExpressionStatement",
"src": "6390:20:2"
},
"nodeType": "ForStatement",
"src": "6349:373:2"
}
]
},
"documentation": {
"id": 2025,
"nodeType": "StructuredDocumentation",
"src": "5761:122:2",
"text": "@dev Add new functions to the diamond proxy\n NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array"
},
"id": 2107,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_addFunctions",
"nameLocation": "5898:13:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2033,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2027,
"mutability": "mutable",
"name": "_facet",
"nameLocation": "5930:6:2",
"nodeType": "VariableDeclaration",
"scope": 2107,
"src": "5922:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2026,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5922:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2030,
"mutability": "mutable",
"name": "_selectors",
"nameLocation": "5963:10:2",
"nodeType": "VariableDeclaration",
"scope": 2107,
"src": "5947:26:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[]"
},
"typeName": {
"baseType": {
"id": 2028,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "5947:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"id": 2029,
"nodeType": "ArrayTypeName",
"src": "5947:8:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr",
"typeString": "bytes4[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2032,
"mutability": "mutable",
"name": "_isFacetFreezable",
"nameLocation": "5989:17:2",
"nodeType": "VariableDeclaration",
"scope": 2107,
"src": "5984:22:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2031,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5984:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "5911:102:2"
},
"returnParameters": {
"id": 2034,
"nodeType": "ParameterList",
"parameters": [],
"src": "6022:0:2"
},
"scope": 2632,
"src": "5889:840:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 2195,
"nodeType": "Block",
"src": "7024:797:2",
"statements": [
{
"assignments": [
2120
],
"declarations": [
{
"constant": false,
"id": 2120,
"mutability": "mutable",
"name": "ds",
"nameLocation": "7058:2:2",
"nodeType": "VariableDeclaration",
"scope": 2195,
"src": "7035:25:2",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
},
"typeName": {
"id": 2119,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2118,
"name": "DiamondStorage",
"nameLocations": [
"7035:14:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1847,
"src": "7035:14:2"
},
"referencedDeclaration": 1847,
"src": "7035:14:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
}
},
"visibility": "internal"
}
],
"id": 2123,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2121,
"name": "getDiamondStorage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1887,
"src": "7063:17:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DiamondStorage_$1847_storage_ptr_$",
"typeString": "function () pure returns (struct Diamond.DiamondStorage storage pointer)"
}
},
"id": 2122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7063:19:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7035:47:2"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2125,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2110,
"src": "7103:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 2128,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7121:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2127,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "7113:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 2126,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7113:7:2",
"typeDescriptions": {}
}
},
"id": 2129,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7113:10:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "7103:20:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4b",
"id": 2131,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7125:3:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_91cb023ee03dcff3e185aa303e77c329b6b62e0a68a590039a476bc8cb48d055",
"typeString": "literal_string \"K\""
},
"value": "K"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_91cb023ee03dcff3e185aa303e77c329b6b62e0a68a590039a476bc8cb48d055",
"typeString": "literal_string \"K\""
}
],
"id": 2124,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "7095:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7095:34:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2133,
"nodeType": "ExpressionStatement",
"src": "7095:34:2"
},
{
"assignments": [
2135
],
"declarations": [
{
"constant": false,
"id": 2135,
"mutability": "mutable",
"name": "selectorsLength",
"nameLocation": "7192:15:2",
"nodeType": "VariableDeclaration",
"scope": 2195,
"src": "7184:23:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2134,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7184:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2138,
"initialValue": {
"expression": {
"id": 2136,
"name": "_selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2113,
"src": "7210:10:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"id": 2137,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7221:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "7210:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7184:43:2"
},
{
"body": {
"id": 2193,
"nodeType": "Block",
"src": "7301:513:2",
"statements": [
{
"assignments": [
2153
],
"declarations": [
{
"constant": false,
"id": 2153,
"mutability": "mutable",
"name": "selector",
"nameLocation": "7323:8:2",
"nodeType": "VariableDeclaration",
"scope": 2193,
"src": "7316:15:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2152,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "7316:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"id": 2157,
"initialValue": {
"baseExpression": {
"id": 2154,
"name": "_selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2113,
"src": "7334:10:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"id": 2156,
"indexExpression": {
"id": 2155,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2140,
"src": "7345:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "7334:13:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7316:31:2"
},
{
"assignments": [
2160
],
"declarations": [
{
"constant": false,
"id": 2160,
"mutability": "mutable",
"name": "oldFacet",
"nameLocation": "7385:8:2",
"nodeType": "VariableDeclaration",
"scope": 2193,
"src": "7362:31:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_memory_ptr",
"typeString": "struct Diamond.SelectorToFacet"
},
"typeName": {
"id": 2159,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2158,
"name": "SelectorToFacet",
"nameLocations": [
"7362:15:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1823,
"src": "7362:15:2"
},
"referencedDeclaration": 1823,
"src": "7362:15:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage_ptr",
"typeString": "struct Diamond.SelectorToFacet"
}
},
"visibility": "internal"
}
],
"id": 2165,
"initialValue": {
"baseExpression": {
"expression": {
"id": 2161,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2120,
"src": "7396:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2162,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7399:15:2",
"memberName": "selectorToFacet",
"nodeType": "MemberAccess",
"referencedDeclaration": 1836,
"src": "7396:18:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet storage ref)"
}
},
"id": 2164,
"indexExpression": {
"id": 2163,
"name": "selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2153,
"src": "7415:8:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "7396:28:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage",
"typeString": "struct Diamond.SelectorToFacet storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7362:62:2"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2173,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 2167,
"name": "oldFacet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2160,
"src": "7447:8:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_memory_ptr",
"typeString": "struct Diamond.SelectorToFacet memory"
}
},
"id": 2168,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7456:12:2",
"memberName": "facetAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 1818,
"src": "7447:21:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 2171,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7480:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2170,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "7472:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 2169,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7472:7:2",
"typeDescriptions": {}
}
},
"id": 2172,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7472:10:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "7447:35:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4c",
"id": 2174,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7484:3:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8aa64f937099b65a4febc243a5ae0f2d6416bb9e473c30dd29c1ee498fb7c5a8",
"typeString": "literal_string \"L\""
},
"value": "L"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8aa64f937099b65a4febc243a5ae0f2d6416bb9e473c30dd29c1ee498fb7c5a8",
"typeString": "literal_string \"L\""
}
],
"id": 2166,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "7439:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2175,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7439:49:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2176,
"nodeType": "ExpressionStatement",
"src": "7439:49:2"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 2178,
"name": "oldFacet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2160,
"src": "7583:8:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_memory_ptr",
"typeString": "struct Diamond.SelectorToFacet memory"
}
},
"id": 2179,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7592:12:2",
"memberName": "facetAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 1818,
"src": "7583:21:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2180,
"name": "selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2153,
"src": "7606:8:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 2177,
"name": "_removeOneFunction",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2493,
"src": "7564:18:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes4_$returns$__$",
"typeString": "function (address,bytes4)"
}
},
"id": 2181,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7564:51:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2182,
"nodeType": "ExpressionStatement",
"src": "7564:51:2"
},
{
"expression": {
"arguments": [
{
"id": 2184,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2110,
"src": "7728:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2183,
"name": "_saveFacetIfNew",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2321,
"src": "7712:15:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 2185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7712:23:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2186,
"nodeType": "ExpressionStatement",
"src": "7712:23:2"
},
{
"expression": {
"arguments": [
{
"id": 2188,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2110,
"src": "7766:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2189,
"name": "selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2153,
"src": "7774:8:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
{
"id": 2190,
"name": "_isFacetFreezable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2115,
"src": "7784:17:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 2187,
"name": "_addOneFunction",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2398,
"src": "7750:15:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes4_$_t_bool_$returns$__$",
"typeString": "function (address,bytes4,bool)"
}
},
"id": 2191,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7750:52:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2192,
"nodeType": "ExpressionStatement",
"src": "7750:52:2"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2145,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2143,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2140,
"src": "7258:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 2144,
"name": "selectorsLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2135,
"src": "7262:15:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7258:19:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2194,
"initializationExpression": {
"assignments": [
2140
],
"declarations": [
{
"constant": false,
"id": 2140,
"mutability": "mutable",
"name": "i",
"nameLocation": "7251:1:2",
"nodeType": "VariableDeclaration",
"scope": 2194,
"src": "7243:9:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2139,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7243:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2142,
"initialValue": {
"hexValue": "30",
"id": 2141,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7255:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "7243:13:2"
},
"isSimpleCounterLoop": false,
"loopExpression": {
"expression": {
"id": 2150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 2146,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2140,
"src": "7279:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"id": 2147,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2140,
"src": "7283:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2148,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7285:12:2",
"memberName": "uncheckedInc",
"nodeType": "MemberAccess",
"referencedDeclaration": 1770,
"src": "7283:14:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$attached_to$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 2149,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "7283:16:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7279:20:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2151,
"nodeType": "ExpressionStatement",
"src": "7279:20:2"
},
"nodeType": "ForStatement",
"src": "7238:576:2"
}
]
},
"documentation": {
"id": 2108,
"nodeType": "StructuredDocumentation",
"src": "6737:144:2",
"text": "@dev Change associated facets to already known function selectors\n NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array"
},
"id": 2196,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_replaceFunctions",
"nameLocation": "6896:17:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2116,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2110,
"mutability": "mutable",
"name": "_facet",
"nameLocation": "6932:6:2",
"nodeType": "VariableDeclaration",
"scope": 2196,
"src": "6924:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2109,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6924:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2113,
"mutability": "mutable",
"name": "_selectors",
"nameLocation": "6965:10:2",
"nodeType": "VariableDeclaration",
"scope": 2196,
"src": "6949:26:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[]"
},
"typeName": {
"baseType": {
"id": 2111,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "6949:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"id": 2112,
"nodeType": "ArrayTypeName",
"src": "6949:8:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr",
"typeString": "bytes4[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2115,
"mutability": "mutable",
"name": "_isFacetFreezable",
"nameLocation": "6991:17:2",
"nodeType": "VariableDeclaration",
"scope": 2196,
"src": "6986:22:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2114,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "6986:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "6913:102:2"
},
"returnParameters": {
"id": 2117,
"nodeType": "ParameterList",
"parameters": [],
"src": "7024:0:2"
},
"scope": 2632,
"src": "6887:934:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 2272,
"nodeType": "Block",
"src": "8039:578:2",
"statements": [
{
"assignments": [
2207
],
"declarations": [
{
"constant": false,
"id": 2207,
"mutability": "mutable",
"name": "ds",
"nameLocation": "8073:2:2",
"nodeType": "VariableDeclaration",
"scope": 2272,
"src": "8050:25:2",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
},
"typeName": {
"id": 2206,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2205,
"name": "DiamondStorage",
"nameLocations": [
"8050:14:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1847,
"src": "8050:14:2"
},
"referencedDeclaration": 1847,
"src": "8050:14:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
}
},
"visibility": "internal"
}
],
"id": 2210,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2208,
"name": "getDiamondStorage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1887,
"src": "8078:17:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DiamondStorage_$1847_storage_ptr_$",
"typeString": "function () pure returns (struct Diamond.DiamondStorage storage pointer)"
}
},
"id": 2209,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8078:19:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8050:47:2"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2217,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2212,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2199,
"src": "8118:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 2215,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8136:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2214,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "8128:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 2213,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "8128:7:2",
"typeDescriptions": {}
}
},
"id": 2216,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8128:10:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8118:20:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "6131",
"id": 2218,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8140:4:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_37d3424576bafb5fd5f9f8e99478f66780477fcd8d71cb2319b37a64a01640db",
"typeString": "literal_string \"a1\""
},
"value": "a1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_37d3424576bafb5fd5f9f8e99478f66780477fcd8d71cb2319b37a64a01640db",
"typeString": "literal_string \"a1\""
}
],
"id": 2211,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "8110:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8110:35:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2220,
"nodeType": "ExpressionStatement",
"src": "8110:35:2"
},
{
"assignments": [
2222
],
"declarations": [
{
"constant": false,
"id": 2222,
"mutability": "mutable",
"name": "selectorsLength",
"nameLocation": "8196:15:2",
"nodeType": "VariableDeclaration",
"scope": 2272,
"src": "8188:23:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2221,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8188:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2225,
"initialValue": {
"expression": {
"id": 2223,
"name": "_selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2202,
"src": "8214:10:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"id": 2224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8225:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "8214:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8188:43:2"
},
{
"body": {
"id": 2270,
"nodeType": "Block",
"src": "8305:305:2",
"statements": [
{
"assignments": [
2240
],
"declarations": [
{
"constant": false,
"id": 2240,
"mutability": "mutable",
"name": "selector",
"nameLocation": "8327:8:2",
"nodeType": "VariableDeclaration",
"scope": 2270,
"src": "8320:15:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2239,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "8320:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"id": 2244,
"initialValue": {
"baseExpression": {
"id": 2241,
"name": "_selectors",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2202,
"src": "8338:10:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"id": 2243,
"indexExpression": {
"id": 2242,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2227,
"src": "8349:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "8338:13:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8320:31:2"
},
{
"assignments": [
2247
],
"declarations": [
{
"constant": false,
"id": 2247,
"mutability": "mutable",
"name": "oldFacet",
"nameLocation": "8389:8:2",
"nodeType": "VariableDeclaration",
"scope": 2270,
"src": "8366:31:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_memory_ptr",
"typeString": "struct Diamond.SelectorToFacet"
},
"typeName": {
"id": 2246,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2245,
"name": "SelectorToFacet",
"nameLocations": [
"8366:15:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1823,
"src": "8366:15:2"
},
"referencedDeclaration": 1823,
"src": "8366:15:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage_ptr",
"typeString": "struct Diamond.SelectorToFacet"
}
},
"visibility": "internal"
}
],
"id": 2252,
"initialValue": {
"baseExpression": {
"expression": {
"id": 2248,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2207,
"src": "8400:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2249,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8403:15:2",
"memberName": "selectorToFacet",
"nodeType": "MemberAccess",
"referencedDeclaration": 1836,
"src": "8400:18:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet storage ref)"
}
},
"id": 2251,
"indexExpression": {
"id": 2250,
"name": "selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2240,
"src": "8419:8:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "8400:28:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage",
"typeString": "struct Diamond.SelectorToFacet storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8366:62:2"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2260,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 2254,
"name": "oldFacet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2247,
"src": "8451:8:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_memory_ptr",
"typeString": "struct Diamond.SelectorToFacet memory"
}
},
"id": 2255,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8460:12:2",
"memberName": "facetAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 1818,
"src": "8451:21:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 2258,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8484:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2257,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "8476:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 2256,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "8476:7:2",
"typeDescriptions": {}
}
},
"id": 2259,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8476:10:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8451:35:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "6132",
"id": 2261,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8488:4:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a2060faa0fc5697bc282c626d908a989dc0d2b79270a5cdc58fbc0ab74c35faf",
"typeString": "literal_string \"a2\""
},
"value": "a2"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_a2060faa0fc5697bc282c626d908a989dc0d2b79270a5cdc58fbc0ab74c35faf",
"typeString": "literal_string \"a2\""
}
],
"id": 2253,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "8443:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8443:50:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2263,
"nodeType": "ExpressionStatement",
"src": "8443:50:2"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 2265,
"name": "oldFacet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2247,
"src": "8566:8:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_memory_ptr",
"typeString": "struct Diamond.SelectorToFacet memory"
}
},
"id": 2266,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8575:12:2",
"memberName": "facetAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 1818,
"src": "8566:21:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2267,
"name": "selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2240,
"src": "8589:8:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 2264,
"name": "_removeOneFunction",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2493,
"src": "8547:18:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes4_$returns$__$",
"typeString": "function (address,bytes4)"
}
},
"id": 2268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8547:51:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2269,
"nodeType": "ExpressionStatement",
"src": "8547:51:2"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2232,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2230,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2227,
"src": "8262:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 2231,
"name": "selectorsLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2222,
"src": "8266:15:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8262:19:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2271,
"initializationExpression": {
"assignments": [
2227
],
"declarations": [
{
"constant": false,
"id": 2227,
"mutability": "mutable",
"name": "i",
"nameLocation": "8255:1:2",
"nodeType": "VariableDeclaration",
"scope": 2271,
"src": "8247:9:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2226,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8247:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2229,
"initialValue": {
"hexValue": "30",
"id": 2228,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8259:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "8247:13:2"
},
"isSimpleCounterLoop": false,
"loopExpression": {
"expression": {
"id": 2237,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 2233,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2227,
"src": "8283:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"id": 2234,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2227,
"src": "8287:1:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2235,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8289:12:2",
"memberName": "uncheckedInc",
"nodeType": "MemberAccess",
"referencedDeclaration": 1770,
"src": "8287:14:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$attached_to$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 2236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8287:16:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8283:20:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2238,
"nodeType": "ExpressionStatement",
"src": "8283:20:2"
},
"nodeType": "ForStatement",
"src": "8242:368:2"
}
]
},
"documentation": {
"id": 2197,
"nodeType": "StructuredDocumentation",
"src": "7829:126:2",
"text": "@dev Remove association with function and facet\n NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array"
},
"id": 2273,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_removeFunctions",
"nameLocation": "7970:16:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2203,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2199,
"mutability": "mutable",
"name": "_facet",
"nameLocation": "7995:6:2",
"nodeType": "VariableDeclaration",
"scope": 2273,
"src": "7987:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2198,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7987:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2202,
"mutability": "mutable",
"name": "_selectors",
"nameLocation": "8019:10:2",
"nodeType": "VariableDeclaration",
"scope": 2273,
"src": "8003:26:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[]"
},
"typeName": {
"baseType": {
"id": 2200,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "8003:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"id": 2201,
"nodeType": "ArrayTypeName",
"src": "8003:8:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr",
"typeString": "bytes4[]"
}
},
"visibility": "internal"
}
],
"src": "7986:44:2"
},
"returnParameters": {
"id": 2204,
"nodeType": "ParameterList",
"parameters": [],
"src": "8039:0:2"
},
"scope": 2632,
"src": "7961:656:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 2320,
"nodeType": "Block",
"src": "8851:407:2",
"statements": [
{
"assignments": [
2281
],
"declarations": [
{
"constant": false,
"id": 2281,
"mutability": "mutable",
"name": "ds",
"nameLocation": "8885:2:2",
"nodeType": "VariableDeclaration",
"scope": 2320,
"src": "8862:25:2",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
},
"typeName": {
"id": 2280,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2279,
"name": "DiamondStorage",
"nameLocations": [
"8862:14:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1847,
"src": "8862:14:2"
},
"referencedDeclaration": 1847,
"src": "8862:14:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
}
},
"visibility": "internal"
}
],
"id": 2284,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2282,
"name": "getDiamondStorage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1887,
"src": "8890:17:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DiamondStorage_$1847_storage_ptr_$",
"typeString": "function () pure returns (struct Diamond.DiamondStorage storage pointer)"
}
},
"id": 2283,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "8890:19:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8862:47:2"
},
{
"assignments": [
2286
],
"declarations": [
{
"constant": false,
"id": 2286,
"mutability": "mutable",
"name": "selectorsLength",
"nameLocation": "8930:15:2",
"nodeType": "VariableDeclaration",
"scope": 2320,
"src": "8922:23:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2285,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8922:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2293,
"initialValue": {
"expression": {
"expression": {
"baseExpression": {
"expression": {
"id": 2287,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2281,
"src": "8948:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2288,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8951:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "8948:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2290,
"indexExpression": {
"id": 2289,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2276,
"src": "8968:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "8948:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2291,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8976:9:2",
"memberName": "selectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1827,
"src": "8948:37:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage",
"typeString": "bytes4[] storage ref"
}
},
"id": 2292,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8986:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "8948:44:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8922:70:2"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2296,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2294,
"name": "selectorsLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2286,
"src": "9094:15:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 2295,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9113:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "9094:20:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2319,
"nodeType": "IfStatement",
"src": "9090:161:2",
"trueBody": {
"id": 2318,
"nodeType": "Block",
"src": "9116:135:2",
"statements": [
{
"expression": {
"id": 2308,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"baseExpression": {
"expression": {
"id": 2297,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2281,
"src": "9131:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2300,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9134:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "9131:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2301,
"indexExpression": {
"id": 2299,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2276,
"src": "9151:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "9131:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2302,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "9159:13:2",
"memberName": "facetPosition",
"nodeType": "MemberAccess",
"referencedDeclaration": 1829,
"src": "9131:41:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"expression": {
"expression": {
"id": 2303,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2281,
"src": "9175:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2304,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9178:6:2",
"memberName": "facets",
"nodeType": "MemberAccess",
"referencedDeclaration": 1844,
"src": "9175:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2305,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9185:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "9175:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2306,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9192:8:2",
"memberName": "toUint16",
"nodeType": "MemberAccess",
"referencedDeclaration": 866,
"src": "9175:25:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint16_$attached_to$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint16)"
}
},
"id": 2307,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9175:27:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "9131:71:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 2309,
"nodeType": "ExpressionStatement",
"src": "9131:71:2"
},
{
"expression": {
"arguments": [
{
"id": 2315,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2276,
"src": "9232:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"expression": {
"id": 2310,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2281,
"src": "9217:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2313,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9220:6:2",
"memberName": "facets",
"nodeType": "MemberAccess",
"referencedDeclaration": 1844,
"src": "9217:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2314,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9227:4:2",
"memberName": "push",
"nodeType": "MemberAccess",
"src": "9217:14:2",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_address_$dyn_storage_ptr_$_t_address_$returns$__$attached_to$_t_array$_t_address_$dyn_storage_ptr_$",
"typeString": "function (address[] storage pointer,address)"
}
},
"id": 2316,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9217:22:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2317,
"nodeType": "ExpressionStatement",
"src": "9217:22:2"
}
]
}
}
]
},
"documentation": {
"id": 2274,
"nodeType": "StructuredDocumentation",
"src": "8625:171:2",
"text": "@dev Add address to the list of known facets if it is not on the list yet\n NOTE: should be called ONLY before adding a new selector associated with the address"
},
"id": 2321,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_saveFacetIfNew",
"nameLocation": "8811:15:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2277,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2276,
"mutability": "mutable",
"name": "_facet",
"nameLocation": "8835:6:2",
"nodeType": "VariableDeclaration",
"scope": 2321,
"src": "8827:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2275,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "8827:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "8826:16:2"
},
"returnParameters": {
"id": 2278,
"nodeType": "ParameterList",
"parameters": [],
"src": "8851:0:2"
},
"scope": 2632,
"src": "8802:456:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 2397,
"nodeType": "Block",
"src": "9676:896:2",
"statements": [
{
"assignments": [
2333
],
"declarations": [
{
"constant": false,
"id": 2333,
"mutability": "mutable",
"name": "ds",
"nameLocation": "9710:2:2",
"nodeType": "VariableDeclaration",
"scope": 2397,
"src": "9687:25:2",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
},
"typeName": {
"id": 2332,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2331,
"name": "DiamondStorage",
"nameLocations": [
"9687:14:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1847,
"src": "9687:14:2"
},
"referencedDeclaration": 1847,
"src": "9687:14:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
}
},
"visibility": "internal"
}
],
"id": 2336,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2334,
"name": "getDiamondStorage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1887,
"src": "9715:17:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DiamondStorage_$1847_storage_ptr_$",
"typeString": "function () pure returns (struct Diamond.DiamondStorage storage pointer)"
}
},
"id": 2335,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9715:19:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9687:47:2"
},
{
"assignments": [
2338
],
"declarations": [
{
"constant": false,
"id": 2338,
"mutability": "mutable",
"name": "selectorPosition",
"nameLocation": "9754:16:2",
"nodeType": "VariableDeclaration",
"scope": 2397,
"src": "9747:23:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 2337,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "9747:6:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"visibility": "internal"
}
],
"id": 2348,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"components": [
{
"expression": {
"expression": {
"baseExpression": {
"expression": {
"id": 2339,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2333,
"src": "9774:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2340,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9777:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "9774:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2342,
"indexExpression": {
"id": 2341,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2324,
"src": "9794:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "9774:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2343,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9802:9:2",
"memberName": "selectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1827,
"src": "9774:37:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage",
"typeString": "bytes4[] storage ref"
}
},
"id": 2344,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9812:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "9774:44:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2345,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "9773:46:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2346,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9820:8:2",
"memberName": "toUint16",
"nodeType": "MemberAccess",
"referencedDeclaration": 866,
"src": "9773:55:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint16_$attached_to$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint16)"
}
},
"id": 2347,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "9773:57:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9747:83:2"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 2351,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2349,
"name": "selectorPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2338,
"src": "10092:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 2350,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10112:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "10092:21:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2374,
"nodeType": "IfStatement",
"src": "10088:208:2",
"trueBody": {
"id": 2373,
"nodeType": "Block",
"src": "10115:181:2",
"statements": [
{
"assignments": [
2353
],
"declarations": [
{
"constant": false,
"id": 2353,
"mutability": "mutable",
"name": "selector0",
"nameLocation": "10137:9:2",
"nodeType": "VariableDeclaration",
"scope": 2373,
"src": "10130:16:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2352,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "10130:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"id": 2361,
"initialValue": {
"baseExpression": {
"expression": {
"baseExpression": {
"expression": {
"id": 2354,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2333,
"src": "10149:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2355,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10152:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "10149:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2357,
"indexExpression": {
"id": 2356,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2324,
"src": "10169:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10149:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2358,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10177:9:2",
"memberName": "selectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1827,
"src": "10149:37:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage",
"typeString": "bytes4[] storage ref"
}
},
"id": 2360,
"indexExpression": {
"hexValue": "30",
"id": 2359,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10187:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10149:40:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10130:59:2"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 2369,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2363,
"name": "_isSelectorFreezable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2328,
"src": "10212:20:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"baseExpression": {
"expression": {
"id": 2364,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2333,
"src": "10236:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2365,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10239:15:2",
"memberName": "selectorToFacet",
"nodeType": "MemberAccess",
"referencedDeclaration": 1836,
"src": "10236:18:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet storage ref)"
}
},
"id": 2367,
"indexExpression": {
"id": 2366,
"name": "selector0",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "10255:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10236:29:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage",
"typeString": "struct Diamond.SelectorToFacet storage ref"
}
},
"id": 2368,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10266:11:2",
"memberName": "isFreezable",
"nodeType": "MemberAccess",
"referencedDeclaration": 1822,
"src": "10236:41:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "10212:65:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4a31",
"id": 2370,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10279:4:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ff8b10989f49826860c2c79d4539b4b75e3e301856bc5834f4b0778cddba6f15",
"typeString": "literal_string \"J1\""
},
"value": "J1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ff8b10989f49826860c2c79d4539b4b75e3e301856bc5834f4b0778cddba6f15",
"typeString": "literal_string \"J1\""
}
],
"id": 2362,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "10204:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2371,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "10204:80:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2372,
"nodeType": "ExpressionStatement",
"src": "10204:80:2"
}
]
}
},
{
"expression": {
"id": 2385,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"expression": {
"id": 2375,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2333,
"src": "10308:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2378,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10311:15:2",
"memberName": "selectorToFacet",
"nodeType": "MemberAccess",
"referencedDeclaration": 1836,
"src": "10308:18:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet storage ref)"
}
},
"id": 2379,
"indexExpression": {
"id": 2377,
"name": "_selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2326,
"src": "10327:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "10308:29:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage",
"typeString": "struct Diamond.SelectorToFacet storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 2381,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2324,
"src": "10385:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 2382,
"name": "selectorPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2338,
"src": "10424:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
{
"id": 2383,
"name": "_isSelectorFreezable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2328,
"src": "10468:20:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 2380,
"name": "SelectorToFacet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "10340:15:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_SelectorToFacet_$1823_storage_ptr_$",
"typeString": "type(struct Diamond.SelectorToFacet storage pointer)"
}
},
"id": 2384,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"nameLocations": [
"10371:12:2",
"10406:16:2",
"10455:11:2"
],
"names": [
"facetAddress",
"selectorPosition",
"isFreezable"
],
"nodeType": "FunctionCall",
"src": "10340:160:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_memory_ptr",
"typeString": "struct Diamond.SelectorToFacet memory"
}
},
"src": "10308:192:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage",
"typeString": "struct Diamond.SelectorToFacet storage ref"
}
},
"id": 2386,
"nodeType": "ExpressionStatement",
"src": "10308:192:2"
},
{
"expression": {
"arguments": [
{
"id": 2394,
"name": "_selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2326,
"src": "10554:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"expression": {
"expression": {
"baseExpression": {
"expression": {
"id": 2387,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2333,
"src": "10511:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2390,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10514:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "10511:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2391,
"indexExpression": {
"id": 2389,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2324,
"src": "10531:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10511:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2392,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10539:9:2",
"memberName": "selectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1827,
"src": "10511:37:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage",
"typeString": "bytes4[] storage ref"
}
},
"id": 2393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10549:4:2",
"memberName": "push",
"nodeType": "MemberAccess",
"src": "10511:42:2",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_bytes4_$dyn_storage_ptr_$_t_bytes4_$returns$__$attached_to$_t_array$_t_bytes4_$dyn_storage_ptr_$",
"typeString": "function (bytes4[] storage pointer,bytes4)"
}
},
"id": 2395,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "10511:53:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2396,
"nodeType": "ExpressionStatement",
"src": "10511:53:2"
}
]
},
"documentation": {
"id": 2322,
"nodeType": "StructuredDocumentation",
"src": "9266:276:2",
"text": "@dev Add one function to the already known facet\n NOTE: It is expected but NOT enforced that:\n - `_facet` is NON-ZERO address\n - `_facet` is already stored address in `DiamondStorage.facets`\n - `_selector` is NOT associated by another facet"
},
"id": 2398,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_addOneFunction",
"nameLocation": "9557:15:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2329,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2324,
"mutability": "mutable",
"name": "_facet",
"nameLocation": "9591:6:2",
"nodeType": "VariableDeclaration",
"scope": 2398,
"src": "9583:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2323,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9583:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2326,
"mutability": "mutable",
"name": "_selector",
"nameLocation": "9615:9:2",
"nodeType": "VariableDeclaration",
"scope": 2398,
"src": "9608:16:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2325,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "9608:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2328,
"mutability": "mutable",
"name": "_isSelectorFreezable",
"nameLocation": "9640:20:2",
"nodeType": "VariableDeclaration",
"scope": 2398,
"src": "9635:25:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2327,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "9635:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "9572:95:2"
},
"returnParameters": {
"id": 2330,
"nodeType": "ParameterList",
"parameters": [],
"src": "9676:0:2"
},
"scope": 2632,
"src": "9548:1024:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 2492,
"nodeType": "Block",
"src": "10787:1205:2",
"statements": [
{
"assignments": [
2408
],
"declarations": [
{
"constant": false,
"id": 2408,
"mutability": "mutable",
"name": "ds",
"nameLocation": "10821:2:2",
"nodeType": "VariableDeclaration",
"scope": 2492,
"src": "10798:25:2",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
},
"typeName": {
"id": 2407,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2406,
"name": "DiamondStorage",
"nameLocations": [
"10798:14:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1847,
"src": "10798:14:2"
},
"referencedDeclaration": 1847,
"src": "10798:14:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
}
},
"visibility": "internal"
}
],
"id": 2411,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2409,
"name": "getDiamondStorage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1887,
"src": "10826:17:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DiamondStorage_$1847_storage_ptr_$",
"typeString": "function () pure returns (struct Diamond.DiamondStorage storage pointer)"
}
},
"id": 2410,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "10826:19:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10798:47:2"
},
{
"assignments": [
2413
],
"declarations": [
{
"constant": false,
"id": 2413,
"mutability": "mutable",
"name": "selectorPosition",
"nameLocation": "10962:16:2",
"nodeType": "VariableDeclaration",
"scope": 2492,
"src": "10954:24:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2412,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10954:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2419,
"initialValue": {
"expression": {
"baseExpression": {
"expression": {
"id": 2414,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2408,
"src": "10981:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2415,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10984:15:2",
"memberName": "selectorToFacet",
"nodeType": "MemberAccess",
"referencedDeclaration": 1836,
"src": "10981:18:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet storage ref)"
}
},
"id": 2417,
"indexExpression": {
"id": 2416,
"name": "_selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2403,
"src": "11000:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10981:29:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage",
"typeString": "struct Diamond.SelectorToFacet storage ref"
}
},
"id": 2418,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11011:16:2",
"memberName": "selectorPosition",
"nodeType": "MemberAccess",
"referencedDeclaration": 1820,
"src": "10981:46:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10954:73:2"
},
{
"assignments": [
2421
],
"declarations": [
{
"constant": false,
"id": 2421,
"mutability": "mutable",
"name": "lastSelectorPosition",
"nameLocation": "11046:20:2",
"nodeType": "VariableDeclaration",
"scope": 2492,
"src": "11038:28:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2420,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11038:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2430,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2429,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"baseExpression": {
"expression": {
"id": 2422,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2408,
"src": "11069:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2423,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11072:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "11069:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2425,
"indexExpression": {
"id": 2424,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2401,
"src": "11089:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11069:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2426,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11097:9:2",
"memberName": "selectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1827,
"src": "11069:37:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage",
"typeString": "bytes4[] storage ref"
}
},
"id": 2427,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11107:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "11069:44:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"hexValue": "31",
"id": 2428,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11116:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "11069:48:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11038:79:2"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2433,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2431,
"name": "selectorPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2413,
"src": "11245:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 2432,
"name": "lastSelectorPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2421,
"src": "11265:20:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11245:40:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2467,
"nodeType": "IfStatement",
"src": "11241:335:2",
"trueBody": {
"id": 2466,
"nodeType": "Block",
"src": "11287:289:2",
"statements": [
{
"assignments": [
2435
],
"declarations": [
{
"constant": false,
"id": 2435,
"mutability": "mutable",
"name": "lastSelector",
"nameLocation": "11309:12:2",
"nodeType": "VariableDeclaration",
"scope": 2466,
"src": "11302:19:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2434,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "11302:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"id": 2443,
"initialValue": {
"baseExpression": {
"expression": {
"baseExpression": {
"expression": {
"id": 2436,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2408,
"src": "11324:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2437,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11327:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "11324:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2439,
"indexExpression": {
"id": 2438,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2401,
"src": "11344:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11324:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2440,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11352:9:2",
"memberName": "selectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1827,
"src": "11324:37:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage",
"typeString": "bytes4[] storage ref"
}
},
"id": 2442,
"indexExpression": {
"id": 2441,
"name": "lastSelectorPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2421,
"src": "11362:20:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11324:59:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11302:81:2"
},
{
"expression": {
"id": 2453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"expression": {
"baseExpression": {
"expression": {
"id": 2444,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2408,
"src": "11400:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2447,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11403:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "11400:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2448,
"indexExpression": {
"id": 2446,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2401,
"src": "11420:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11400:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2449,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11428:9:2",
"memberName": "selectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1827,
"src": "11400:37:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage",
"typeString": "bytes4[] storage ref"
}
},
"id": 2451,
"indexExpression": {
"id": 2450,
"name": "selectorPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2413,
"src": "11438:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "11400:55:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 2452,
"name": "lastSelector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2435,
"src": "11458:12:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "11400:70:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"id": 2454,
"nodeType": "ExpressionStatement",
"src": "11400:70:2"
},
{
"expression": {
"id": 2464,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"baseExpression": {
"expression": {
"id": 2455,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2408,
"src": "11485:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2458,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11488:15:2",
"memberName": "selectorToFacet",
"nodeType": "MemberAccess",
"referencedDeclaration": 1836,
"src": "11485:18:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet storage ref)"
}
},
"id": 2459,
"indexExpression": {
"id": 2457,
"name": "lastSelector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2435,
"src": "11504:12:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11485:32:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage",
"typeString": "struct Diamond.SelectorToFacet storage ref"
}
},
"id": 2460,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "11518:16:2",
"memberName": "selectorPosition",
"nodeType": "MemberAccess",
"referencedDeclaration": 1820,
"src": "11485:49:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"id": 2461,
"name": "selectorPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2413,
"src": "11537:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2462,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11554:8:2",
"memberName": "toUint16",
"nodeType": "MemberAccess",
"referencedDeclaration": 866,
"src": "11537:25:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint16_$attached_to$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint16)"
}
},
"id": 2463,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11537:27:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "11485:79:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 2465,
"nodeType": "ExpressionStatement",
"src": "11485:79:2"
}
]
}
},
{
"expression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"expression": {
"baseExpression": {
"expression": {
"id": 2468,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2408,
"src": "11645:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2471,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11648:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "11645:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2472,
"indexExpression": {
"id": 2470,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2401,
"src": "11665:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11645:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2473,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11673:9:2",
"memberName": "selectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1827,
"src": "11645:37:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_storage",
"typeString": "bytes4[] storage ref"
}
},
"id": 2474,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11683:3:2",
"memberName": "pop",
"nodeType": "MemberAccess",
"src": "11645:41:2",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_bytes4_$dyn_storage_ptr_$returns$__$attached_to$_t_array$_t_bytes4_$dyn_storage_ptr_$",
"typeString": "function (bytes4[] storage pointer)"
}
},
"id": 2475,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11645:43:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2476,
"nodeType": "ExpressionStatement",
"src": "11645:43:2"
},
{
"expression": {
"id": 2481,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "delete",
"prefix": true,
"src": "11758:36:2",
"subExpression": {
"baseExpression": {
"expression": {
"id": 2477,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2408,
"src": "11765:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2478,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11768:15:2",
"memberName": "selectorToFacet",
"nodeType": "MemberAccess",
"referencedDeclaration": 1836,
"src": "11765:18:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_SelectorToFacet_$1823_storage_$",
"typeString": "mapping(bytes4 => struct Diamond.SelectorToFacet storage ref)"
}
},
"id": 2480,
"indexExpression": {
"id": 2479,
"name": "_selector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2403,
"src": "11784:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "11765:29:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SelectorToFacet_$1823_storage",
"typeString": "struct Diamond.SelectorToFacet storage ref"
}
},
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2482,
"nodeType": "ExpressionStatement",
"src": "11758:36:2"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2485,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2483,
"name": "lastSelectorPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2421,
"src": "11911:20:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 2484,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11935:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "11911:25:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2491,
"nodeType": "IfStatement",
"src": "11907:78:2",
"trueBody": {
"id": 2490,
"nodeType": "Block",
"src": "11938:47:2",
"statements": [
{
"expression": {
"arguments": [
{
"id": 2487,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2401,
"src": "11966:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2486,
"name": "_removeFacet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2560,
"src": "11953:12:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 2488,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "11953:20:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2489,
"nodeType": "ExpressionStatement",
"src": "11953:20:2"
}
]
}
}
]
},
"documentation": {
"id": 2399,
"nodeType": "StructuredDocumentation",
"src": "10580:131:2",
"text": "@dev Remove one associated function with facet\n NOTE: It is expected but NOT enforced that `_facet` is NON-ZERO address"
},
"id": 2493,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_removeOneFunction",
"nameLocation": "10726:18:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2404,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2401,
"mutability": "mutable",
"name": "_facet",
"nameLocation": "10753:6:2",
"nodeType": "VariableDeclaration",
"scope": 2493,
"src": "10745:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2400,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "10745:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2403,
"mutability": "mutable",
"name": "_selector",
"nameLocation": "10768:9:2",
"nodeType": "VariableDeclaration",
"scope": 2493,
"src": "10761:16:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2402,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "10761:6:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "10744:34:2"
},
"returnParameters": {
"id": 2405,
"nodeType": "ParameterList",
"parameters": [],
"src": "10787:0:2"
},
"scope": 2632,
"src": "10717:1275:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 2559,
"nodeType": "Block",
"src": "12203:744:2",
"statements": [
{
"assignments": [
2501
],
"declarations": [
{
"constant": false,
"id": 2501,
"mutability": "mutable",
"name": "ds",
"nameLocation": "12237:2:2",
"nodeType": "VariableDeclaration",
"scope": 2559,
"src": "12214:25:2",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
},
"typeName": {
"id": 2500,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 2499,
"name": "DiamondStorage",
"nameLocations": [
"12214:14:2"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1847,
"src": "12214:14:2"
},
"referencedDeclaration": 1847,
"src": "12214:14:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage"
}
},
"visibility": "internal"
}
],
"id": 2504,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2502,
"name": "getDiamondStorage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1887,
"src": "12242:17:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DiamondStorage_$1847_storage_ptr_$",
"typeString": "function () pure returns (struct Diamond.DiamondStorage storage pointer)"
}
},
"id": 2503,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12242:19:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12214:47:2"
},
{
"assignments": [
2506
],
"declarations": [
{
"constant": false,
"id": 2506,
"mutability": "mutable",
"name": "facetPosition",
"nameLocation": "12370:13:2",
"nodeType": "VariableDeclaration",
"scope": 2559,
"src": "12362:21:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2505,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "12362:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2512,
"initialValue": {
"expression": {
"baseExpression": {
"expression": {
"id": 2507,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2501,
"src": "12386:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2508,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12389:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "12386:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2510,
"indexExpression": {
"id": 2509,
"name": "_facet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "12406:6:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12386:27:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2511,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12414:13:2",
"memberName": "facetPosition",
"nodeType": "MemberAccess",
"referencedDeclaration": 1829,
"src": "12386:41:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12362:65:2"
},
{
"assignments": [
2514
],
"declarations": [
{
"constant": false,
"id": 2514,
"mutability": "mutable",
"name": "lastFacetPosition",
"nameLocation": "12446:17:2",
"nodeType": "VariableDeclaration",
"scope": 2559,
"src": "12438:25:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2513,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "12438:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 2520,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2519,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"id": 2515,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2501,
"src": "12466:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2516,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12469:6:2",
"memberName": "facets",
"nodeType": "MemberAccess",
"referencedDeclaration": 1844,
"src": "12466:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2517,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12476:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "12466:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"hexValue": "31",
"id": 2518,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12485:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "12466:20:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12438:48:2"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2523,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2521,
"name": "facetPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2506,
"src": "12608:13:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 2522,
"name": "lastFacetPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2514,
"src": "12625:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "12608:34:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2551,
"nodeType": "IfStatement",
"src": "12604:254:2",
"trueBody": {
"id": 2550,
"nodeType": "Block",
"src": "12644:214:2",
"statements": [
{
"assignments": [
2525
],
"declarations": [
{
"constant": false,
"id": 2525,
"mutability": "mutable",
"name": "lastFacet",
"nameLocation": "12667:9:2",
"nodeType": "VariableDeclaration",
"scope": 2550,
"src": "12659:17:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2524,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12659:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 2530,
"initialValue": {
"baseExpression": {
"expression": {
"id": 2526,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2501,
"src": "12679:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2527,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12682:6:2",
"memberName": "facets",
"nodeType": "MemberAccess",
"referencedDeclaration": 1844,
"src": "12679:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2529,
"indexExpression": {
"id": 2528,
"name": "lastFacetPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2514,
"src": "12689:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12679:28:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12659:48:2"
},
{
"expression": {
"id": 2537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"expression": {
"id": 2531,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2501,
"src": "12724:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2534,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12727:6:2",
"memberName": "facets",
"nodeType": "MemberAccess",
"referencedDeclaration": 1844,
"src": "12724:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2535,
"indexExpression": {
"id": 2533,
"name": "facetPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2506,
"src": "12734:13:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "12724:24:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 2536,
"name": "lastFacet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2525,
"src": "12751:9:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "12724:36:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 2538,
"nodeType": "ExpressionStatement",
"src": "12724:36:2"
},
{
"expression": {
"id": 2548,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"baseExpression": {
"expression": {
"id": 2539,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2501,
"src": "12775:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2542,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12778:16:2",
"memberName": "facetToSelectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 1841,
"src": "12775:19:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_FacetToSelectors_$1830_storage_$",
"typeString": "mapping(address => struct Diamond.FacetToSelectors storage ref)"
}
},
"id": 2543,
"indexExpression": {
"id": 2541,
"name": "lastFacet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2525,
"src": "12795:9:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12775:30:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FacetToSelectors_$1830_storage",
"typeString": "struct Diamond.FacetToSelectors storage ref"
}
},
"id": 2544,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "12806:13:2",
"memberName": "facetPosition",
"nodeType": "MemberAccess",
"referencedDeclaration": 1829,
"src": "12775:44:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"id": 2545,
"name": "facetPosition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2506,
"src": "12822:13:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12836:8:2",
"memberName": "toUint16",
"nodeType": "MemberAccess",
"referencedDeclaration": 866,
"src": "12822:22:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint16_$attached_to$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint16)"
}
},
"id": 2547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12822:24:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "12775:71:2",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 2549,
"nodeType": "ExpressionStatement",
"src": "12775:71:2"
}
]
}
},
{
"expression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"expression": {
"id": 2552,
"name": "ds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2501,
"src": "12924:2:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DiamondStorage_$1847_storage_ptr",
"typeString": "struct Diamond.DiamondStorage storage pointer"
}
},
"id": 2555,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12927:6:2",
"memberName": "facets",
"nodeType": "MemberAccess",
"referencedDeclaration": 1844,
"src": "12924:9:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2556,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12934:3:2",
"memberName": "pop",
"nodeType": "MemberAccess",
"src": "12924:13:2",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_address_$dyn_storage_ptr_$returns$__$attached_to$_t_array$_t_address_$dyn_storage_ptr_$",
"typeString": "function (address[] storage pointer)"
}
},
"id": 2557,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "12924:15:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2558,
"nodeType": "ExpressionStatement",
"src": "12924:15:2"
}
]
},
"documentation": {
"id": 2494,
"nodeType": "StructuredDocumentation",
"src": "12000:151:2",
"text": "@dev remove facet from the list of known facets\n NOTE: It is expected but NOT enforced that there are no selectors associated with `_facet`"
},
"id": 2560,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_removeFacet",
"nameLocation": "12166:12:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2497,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2496,
"mutability": "mutable",
"name": "_facet",
"nameLocation": "12187:6:2",
"nodeType": "VariableDeclaration",
"scope": 2560,
"src": "12179:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2495,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12179:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "12178:16:2"
},
"returnParameters": {
"id": 2498,
"nodeType": "ParameterList",
"parameters": [],
"src": "12203:0:2"
},
"scope": 2632,
"src": "12157:790:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 2630,
"nodeType": "Block",
"src": "13227:1015:2",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2573,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2568,
"name": "_init",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2563,
"src": "13242:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 2571,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13259:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2570,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "13251:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 2569,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "13251:7:2",
"typeDescriptions": {}
}
},
"id": 2572,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13251:10:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "13242:19:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 2628,
"nodeType": "Block",
"src": "13370:865:2",
"statements": [
{
"assignments": [
2584,
2586
],
"declarations": [
{
"constant": false,
"id": 2584,
"mutability": "mutable",
"name": "success",
"nameLocation": "13493:7:2",
"nodeType": "VariableDeclaration",
"scope": 2628,
"src": "13488:12:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2583,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "13488:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2586,
"mutability": "mutable",
"name": "data",
"nameLocation": "13515:4:2",
"nodeType": "VariableDeclaration",
"scope": 2628,
"src": "13502:17:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2585,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "13502:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 2591,
"initialValue": {
"arguments": [
{
"id": 2589,
"name": "_calldata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2565,
"src": "13542:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"id": 2587,
"name": "_init",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2563,
"src": "13523:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 2588,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13529:12:2",
"memberName": "delegatecall",
"nodeType": "MemberAccess",
"src": "13523:18:2",
"typeDescriptions": {
"typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory) returns (bool,bytes memory)"
}
},
"id": 2590,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13523:29:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13487:65:2"
},
{
"condition": {
"id": 2593,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "13571:8:2",
"subExpression": {
"id": 2592,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2584,
"src": "13572:7:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2606,
"nodeType": "IfStatement",
"src": "13567:353:2",
"trueBody": {
"id": 2605,
"nodeType": "Block",
"src": "13581:339:2",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2597,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 2594,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2586,
"src": "13703:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 2595,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13708:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "13703:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"hexValue": "34",
"id": 2596,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13718:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "13703:16:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2603,
"nodeType": "IfStatement",
"src": "13699:99:2",
"trueBody": {
"id": 2602,
"nodeType": "Block",
"src": "13721:77:2",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "49",
"id": 2599,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13751:3:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8d61ecf6e15472e15b1a0f63cd77f62aa57e6edcd3871d7a841f1056fb42b216",
"typeString": "literal_string \"I\""
},
"value": "I"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_8d61ecf6e15472e15b1a0f63cd77f62aa57e6edcd3871d7a841f1056fb42b216",
"typeString": "literal_string \"I\""
}
],
"id": 2598,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967277,
4294967277
],
"referencedDeclaration": 4294967277,
"src": "13744:6:2",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
"id": 2600,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13744:11:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2601,
"nodeType": "ExpressionStatement",
"src": "13744:11:2"
}
]
}
},
{
"AST": {
"nativeSrc": "13827:78:2",
"nodeType": "YulBlock",
"src": "13827:78:2",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "data",
"nativeSrc": "13861:4:2",
"nodeType": "YulIdentifier",
"src": "13861:4:2"
},
{
"kind": "number",
"nativeSrc": "13867:4:2",
"nodeType": "YulLiteral",
"src": "13867:4:2",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "13857:3:2",
"nodeType": "YulIdentifier",
"src": "13857:3:2"
},
"nativeSrc": "13857:15:2",
"nodeType": "YulFunctionCall",
"src": "13857:15:2"
},
{
"arguments": [
{
"name": "data",
"nativeSrc": "13880:4:2",
"nodeType": "YulIdentifier",
"src": "13880:4:2"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "13874:5:2",
"nodeType": "YulIdentifier",
"src": "13874:5:2"
},
"nativeSrc": "13874:11:2",
"nodeType": "YulFunctionCall",
"src": "13874:11:2"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "13850:6:2",
"nodeType": "YulIdentifier",
"src": "13850:6:2"
},
"nativeSrc": "13850:36:2",
"nodeType": "YulFunctionCall",
"src": "13850:36:2"
},
"nativeSrc": "13850:36:2",
"nodeType": "YulExpressionStatement",
"src": "13850:36:2"
}
]
},
"evmVersion": "cancun",
"externalReferences": [
{
"declaration": 2586,
"isOffset": false,
"isSlot": false,
"src": "13861:4:2",
"valueSize": 1
},
{
"declaration": 2586,
"isOffset": false,
"isSlot": false,
"src": "13880:4:2",
"valueSize": 1
}
],
"id": 2604,
"nodeType": "InlineAssembly",
"src": "13818:87:2"
}
]
}
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2611,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 2608,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2586,
"src": "14104:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 2609,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "14109:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "14104:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "3332",
"id": 2610,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14119:2:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "14104:17:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "6c70",
"id": 2612,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14123:4:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a79ba951aed53127f485cdd66334e703faf1cf0cab0b71a7e0b50b1d9f9c1dfb",
"typeString": "literal_string \"lp\""
},
"value": "lp"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_a79ba951aed53127f485cdd66334e703faf1cf0cab0b71a7e0b50b1d9f9c1dfb",
"typeString": "literal_string \"lp\""
}
],
"id": 2607,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "14096:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2613,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "14096:32:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2614,
"nodeType": "ExpressionStatement",
"src": "14096:32:2"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"id": 2624,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 2618,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2586,
"src": "14162:4:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"components": [
{
"id": 2620,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "14169:7:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
"id": 2619,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "14169:7:2",
"typeDescriptions": {}
}
}
],
"id": 2621,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "14168:9:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
}
],
"expression": {
"id": 2616,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "14151:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 2617,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "14155:6:2",
"memberName": "decode",
"nodeType": "MemberAccess",
"src": "14151:10:2",
"typeDescriptions": {
"typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 2622,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "14151:27:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 2623,
"name": "DIAMOND_INIT_SUCCESS_RETURN_VALUE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1801,
"src": "14182:33:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "14151:64:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "6c7031",
"id": 2625,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14217:5:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3f2fb8f93c7b9dc99fccc9a0b583fd86fd15f0d867dd41658d5be038abc040ab",
"typeString": "literal_string \"lp1\""
},
"value": "lp1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3f2fb8f93c7b9dc99fccc9a0b583fd86fd15f0d867dd41658d5be038abc040ab",
"typeString": "literal_string \"lp1\""
}
],
"id": 2615,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "14143:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2626,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "14143:80:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2627,
"nodeType": "ExpressionStatement",
"src": "14143:80:2"
}
]
},
"id": 2629,
"nodeType": "IfStatement",
"src": "13238:997:2",
"trueBody": {
"id": 2582,
"nodeType": "Block",
"src": "13263:101:2",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2578,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 2575,
"name": "_calldata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2565,
"src": "13286:9:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 2576,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13296:6:2",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "13286:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 2577,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13306:1:2",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "13286:21:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "48",
"id": 2579,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13309:3:2",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_321c2cb0b0673952956a3bfa56cf1ce4df0cd3371ad51a2c5524561250b01836",
"typeString": "literal_string \"H\""
},
"value": "H"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_321c2cb0b0673952956a3bfa56cf1ce4df0cd3371ad51a2c5524561250b01836",
"typeString": "literal_string \"H\""
}
],
"id": 2574,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "13278:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2580,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "13278:35:2",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2581,
"nodeType": "ExpressionStatement",
"src": "13278:35:2"
}
]
}
}
]
},
"documentation": {
"id": 2561,
"nodeType": "StructuredDocumentation",
"src": "12955:188:2",
"text": "@dev Delegates call to the initialization address with provided calldata\n @dev Used as a final step of diamond cut to execute the logic of the initialization for changed facets"
},
"id": 2631,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_initializeDiamondCut",
"nameLocation": "13158:21:2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2566,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2563,
"mutability": "mutable",
"name": "_init",
"nameLocation": "13188:5:2",
"nodeType": "VariableDeclaration",
"scope": 2631,
"src": "13180:13:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2562,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "13180:7:2",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2565,
"mutability": "mutable",
"name": "_calldata",
"nameLocation": "13208:9:2",
"nodeType": "VariableDeclaration",
"scope": 2631,
"src": "13195:22:2",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2564,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "13195:5:2",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "13179:39:2"
},
"returnParameters": {
"id": 2567,
"nodeType": "ParameterList",
"parameters": [],
"src": "13227:0:2"
},
"scope": 2632,
"src": "13149:1093:2",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
}
],
"scope": 2633,
"src": "328:13917:2",
"usedErrors": [],
"usedEvents": [
1815
]
}
],
"src": "35:14212:2"
},
"id": 2
}
}
}
}