# Snapshot report for `src/utils/make-namespaced.test.ts`

The actual snapshot is saved in `make-namespaced.test.ts.snap`.

Generated by [AVA](https://avajs.dev).

## make namespaced input

> Snapshot 1

    {
      language: 'Solidity',
      settings: {
        evmVersion: 'paris',
        optimizer: {
          enabled: true,
          runs: 200,
        },
        outputSelection: {
          '*': {
            '': [
              'ast',
            ],
            '*': [
              'storageLayout',
            ],
          },
        },
      },
      sources: {
        'contracts/test/NamespacedToModify.sol': {
          content: `// SPDX-License-Identifier: MIT␊
          pragma solidity ^0.8.20;␊
          ␊
          abstract contract Example {␊
              /// @custom:storage-location erc7201:example.main␊
              struct MainStorage {␊
                  uint256 x;␊
                  uint256 y;␊
              } MainStorage $MainStorage_random;␊
          ␊
              /// @custom:storage-location erc7201:example.secondary␊
              struct SecondaryStorage {␊
                  uint256 a;␊
                  uint256 b;␊
              } SecondaryStorage $SecondaryStorage_random;␊
          ␊
              /// @custom:storage-location erc7201:example.with.following.comment␊
              // some comment␊
              struct StorageWithComment {␊
                  uint256 a;␊
                  uint256 b;␊
              } StorageWithComment $StorageWithComment_random;␊
          ␊
              ␊
              function foo() virtual  public ;␊
          ␊
              ␊
              function foo1(uint a) virtual  public ;␊
          ␊
              ␊
              function foo2(uint a) virtual  internal ;␊
              struct MyStruct { uint b; }␊
          ␊
              // keccak256(abi.encode(uint256(keccak256("example.main")) - 1)) & ~bytes32(uint256(0xff));␊
              bytes32 private constant MAIN_STORAGE_LOCATION =␊
                  0x183a6125c38840424c4a85fa12bab2ab606c4b6d0e7cc73c0c06ba5300eab500;␊
          ␊
              function _getMainStorage() private pure returns (bool $) {}␊
          ␊
              function _getXTimesY() virtual  internal view returns (uint256) ;␊
          ␊
              ␊
          ␊
              ␊
              enum $astId_id_random { dummy }␊
          ␊
              // standalone doc␊
          ␊
              ␊
          ␊
              ␊
              function foo3() virtual  public ;␊
          ␊
              ␊
              function foo4() virtual  public ;␊
          ␊
              ␊
              enum $astId_id_random { dummy }␊
          ␊
              enum $astId_id_random { dummy }␊
              enum $astId_id_random { dummy }␊
              enum $astId_id_random { dummy }␊
              enum $astId_id_random { dummy }␊
              enum $astId_id_random { dummy }␊
          }␊
          ␊
          abstract contract HasFunction {␊
            ␊
            enum $astId_id_random { dummy }␊
          ␊
            function foo() virtual  pure public returns (uint) ;␊
          }␊
          ␊
          abstract contract UsingFunction is HasFunction {␊
            enum $astId_id_random { dummy }␊
          }␊
          ␊
          function FreeFunctionUsingSelector() pure returns (bool) {}␊
          ␊
          bytes4 constant CONSTANT_USING_SELECTOR = HasFunction.foo.selector;␊
          ␊
          library Lib {␊
            function usingSelector() pure public returns (bool) {}␊
          ␊
            function plusOne(uint x) pure public returns (bool) {}␊
          }␊
          ␊
          abstract contract Consumer {␊
            enum $astId_id_random { dummy }␊
          ␊
            function usingFreeFunction() virtual  pure public returns (bytes4) ;␊
          ␊
            function usingConstant() virtual  pure public returns (bytes4) ;␊
          ␊
            function usingLibraryFunction() virtual  pure public returns (bytes4) ;␊
          }␊
          ␊
          abstract contract HasConstantWithSelector {␊
            bytes4 constant CONTRACT_CONSTANT_USING_SELECTOR = HasFunction.foo.selector;␊
          }␊
          ␊
          function plusTwo(uint x) pure returns (bool) {}␊
          ␊
          ␊
          ␊
          ␊
          function plusThree(uint x) pure returns (bool) {}␊
          ␊
          ␊
          ␊
          ␊
          function plusThree(uint x, uint y) pure returns (bool) {}␊
          ␊
          function originallyNoDocumentation() pure {}␊
          ␊
          ␊
          enum $astId_id_random { dummy }␊
          ␊
          abstract contract UsingForDirectives {␊
            enum $astId_id_random { dummy }␊
          ␊
            function usingFor(uint x) virtual  pure public returns (uint) ;␊
          }␊
          ␊
          ␊
          enum FreeEnum { MyEnum }␊
          ␊
          ␊
          enum CustomErrorOutsideContract { dummy }␊
          ␊
          int8 constant MAX_SIZE_C = 2;␊
          ␊
          abstract contract StructArrayUsesConstant {␊
            uint16 private constant MAX_SIZE = 10;␊
          ␊
            struct NotNamespaced {␊
              uint16 a;␊
              uint256[MAX_SIZE] b;␊
              uint256[MAX_SIZE_C] c;␊
            }␊
          ␊
            /// @custom:storage-location erc7201:uses.constant␊
            struct MainStorage {␊
              uint256 x;␊
              uint256[MAX_SIZE] y;␊
              uint256[MAX_SIZE_C] c;␊
            } MainStorage $MainStorage_random;␊
          }␊
          ␊
          address constant MY_ADDRESS = address(0);␊
          uint constant CONVERTED_ADDRESS = uint160(MY_ADDRESS);␊
          ␊
          interface IDummy {␊
          }␊
          ␊
          abstract contract UsesAddress {␊
            IDummy public constant MY_CONTRACT = IDummy(MY_ADDRESS);␊
          }␊
          ␊
          abstract contract HasFunctionWithRequiredReturn {␊
              struct S { uint x; }␊
              enum $astId_id_random { dummy }␊
              function foo(S calldata s) virtual  internal pure  returns (S calldata) ;␊
          }␊
          ␊
          library LibWithRequiredReturn {␊
              struct S { uint x; }␊
              enum $astId_id_random { dummy }␊
              function foo(S calldata s)  internal pure returns (bool) {}␊
          }␊
          ␊
          ␊
          function hasMultipleReturns() pure returns (bool, bool) {}␊
          ␊
          ␊
          function hasMultipleNamedReturns() pure returns (bool a, bool b) {}␊
          ␊
          ␊
          function hasReturnsDocumentedAsParams() pure returns (bool a, bool b) {}␊
          ␊
          abstract contract HasNatSpecWithMultipleReturns {␊
              ␊
              function hasMultipleReturnsInContract() virtual  public pure returns (uint, uint) ;␊
          ␊
              ␊
              function hasMultipleNamedReturnsInContract() virtual  public pure returns (uint a, uint b) ;␊
          ␊
              ␊
              function hasReturnsDocumentedAsParamsInContract() virtual  public pure returns (uint a, uint b) ;␊
          }␊
          ␊
          interface IHasExternalViewFunction {␊
              function foo() external view returns (uint256);␊
          }␊
          ␊
          abstract contract HasExternalViewFunction is IHasExternalViewFunction {␊
              // This generates a getter function that conforms to the interface␊
              enum $astId_id_random { dummy }␊
          ␊
              // References a selector in an interface␊
              bytes4 constant USING_INTERFACE_FUNCTION_SELECTOR = IHasExternalViewFunction.foo.selector;␊
          ␊
              // References a getter generated for a public variable␊
              enum $astId_id_random { dummy }␊
          }␊
          ␊
          abstract contract DeploysContractToImmutable {␊
              enum $astId_id_random { dummy }␊
          }␊
          ␊
          abstract contract HasSpecialFunctions {␊
              ␊
              ␊
              enum $astId_id_random { dummy }␊
          ␊
              enum $astId_id_random { dummy }␊
          ␊
              // Regular function but payable␊
              function hasPayable() virtual  public payable ;␊
          ␊
              bytes4 constant PAYABLE_SELECTOR = this.hasPayable.selector;␊
          }␊
          ␊
          ␊
          library LibraryWithNamespace {␊
              /// @custom:storage-location erc7201:example.main␊
              struct MainStorage {␊
                  uint256 x;␊
                  uint256 y;␊
              }␊
          }␊
          ␊
          interface InterfaceWithNamespace {␊
              /// @custom:storage-location erc7201:example.main␊
              struct MainStorage {␊
                  uint256 x;␊
                  uint256 y;␊
              }␊
          }␊
          ␊
          interface IHasConstantGetter {␊
            function a() external view returns (bytes32);␊
          }␊
          ␊
          abstract contract HasConstantGetter is IHasConstantGetter {␊
            bytes32 public override constant a = bytes32("foo");␊
          }␊
          ␊
          abstract contract AbstractHasConstantGetter {␊
            function a() virtual external pure returns (bytes32) ;␊
          }␊
          ␊
          abstract contract HasConstantGetterOverride is AbstractHasConstantGetter {␊
            bytes32 public override constant a = bytes32("foo");␊
          }␊
          ␊
          abstract contract HasFunctionOverride is AbstractHasConstantGetter {␊
            function a() override virtual external pure returns (bytes32) ;␊
          }`,
        },
        'contracts/test/NamespacedToModifyImported.sol': {
          content: `// SPDX-License-Identifier: MIT␊
          pragma solidity ^0.8.20;␊
          ␊
          import {CONSTANT_USING_SELECTOR, plusTwo, plusThree, CustomErrorOutsideContract} from "./NamespacedToModify.sol";␊
          ␊
          abstract contract Example {}␊
          `,
        },
      },
    }

## make namespaced input - keep all natspec

> Snapshot 1

    {
      language: 'Solidity',
      settings: {
        evmVersion: 'paris',
        optimizer: {
          enabled: true,
          runs: 200,
        },
        outputSelection: {
          '*': {
            '': [
              'ast',
            ],
            '*': [
              'storageLayout',
            ],
          },
        },
      },
      sources: {
        'contracts/test/NamespacedToModify.sol': {
          content: `// SPDX-License-Identifier: MIT␊
          pragma solidity ^0.8.20;␊
          ␊
          abstract contract Example {␊
              /// @custom:storage-location erc7201:example.main␊
              struct MainStorage {␊
                  uint256 x;␊
                  uint256 y;␊
              } MainStorage $MainStorage_random;␊
          ␊
              /// @custom:storage-location erc7201:example.secondary␊
              struct SecondaryStorage {␊
                  uint256 a;␊
                  uint256 b;␊
              } SecondaryStorage $SecondaryStorage_random;␊
          ␊
              /// @custom:storage-location erc7201:example.with.following.comment␊
              // some comment␊
              struct StorageWithComment {␊
                  uint256 a;␊
                  uint256 b;␊
              } StorageWithComment $StorageWithComment_random;␊
          ␊
              /// @notice some natspec␊
              function foo() virtual  public ;␊
          ␊
              /// @param a docs␊
              function foo1(uint a) virtual  public ;␊
          ␊
              /// @param a docs␊
              function foo2(uint a) virtual  internal ;␊
              struct MyStruct { uint b; }␊
          ␊
              // keccak256(abi.encode(uint256(keccak256("example.main")) - 1)) & ~bytes32(uint256(0xff));␊
              bytes32 private constant MAIN_STORAGE_LOCATION =␊
                  0x183a6125c38840424c4a85fa12bab2ab606c4b6d0e7cc73c0c06ba5300eab500;␊
          ␊
              function _getMainStorage() private pure returns (bool $) {}␊
          ␊
              function _getXTimesY() virtual  internal view returns (uint256) ;␊
          ␊
              /// @notice standlone natspec␊
          ␊
              /// @notice natspec for var␊
              enum $astId_id_random { dummy }␊
          ␊
              // standalone doc␊
          ␊
              /**␊
               * standlone doc block␊
               */␊
          ␊
              /**␊
               * doc block without natspec␊
               */␊
              function foo3() virtual  public ;␊
          ␊
              /**␊
               * doc block with natspec␊
               *␊
               * @notice some natspec␊
               */␊
              function foo4() virtual  public ;␊
          ␊
              /**␊
               * @dev a custom error inside a contract␊
               */␊
              enum $astId_id_random { dummy }␊
          ␊
              enum $astId_id_random { dummy }␊
              enum $astId_id_random { dummy }␊
              enum $astId_id_random { dummy }␊
              enum $astId_id_random { dummy }␊
              enum $astId_id_random { dummy }␊
          }␊
          ␊
          abstract contract HasFunction {␊
            /// @param myInt an integer␊
            enum $astId_id_random { dummy }␊
          ␊
            function foo() virtual  pure public returns (uint) ;␊
          }␊
          ␊
          abstract contract UsingFunction is HasFunction {␊
            enum $astId_id_random { dummy }␊
          }␊
          ␊
          function FreeFunctionUsingSelector() pure returns (bool) {}␊
          ␊
          bytes4 constant CONSTANT_USING_SELECTOR = HasFunction.foo.selector;␊
          ␊
          library Lib {␊
            function usingSelector() pure public returns (bool) {}␊
          ␊
            function plusOne(uint x) pure public returns (bool) {}␊
          }␊
          ␊
          abstract contract Consumer {␊
            enum $astId_id_random { dummy }␊
          ␊
            function usingFreeFunction() virtual  pure public returns (bytes4) ;␊
          ␊
            function usingConstant() virtual  pure public returns (bytes4) ;␊
          ␊
            function usingLibraryFunction() virtual  pure public returns (bytes4) ;␊
          }␊
          ␊
          abstract contract HasConstantWithSelector {␊
            bytes4 constant CONTRACT_CONSTANT_USING_SELECTOR = HasFunction.foo.selector;␊
          }␊
          ␊
          function plusTwo(uint x) pure returns (bool) {}␊
          ␊
          /**␊
           * @notice originally orphaned natspec␊
           */␊
          ␊
          /**␊
           * @dev plusThree␊
           * @param x x␊
           */␊
          function plusThree(uint x) pure returns (bool) {}␊
          ␊
          /// @notice originally orphaned natspec 2␊
          ␊
          /**␊
           * @dev plusThree overloaded␊
           * @param x x␊
           * @param y y␊
           */␊
          function plusThree(uint x, uint y) pure returns (bool) {}␊
          ␊
          function originallyNoDocumentation() pure {}␊
          ␊
          /**␊
           * @param foo foo␊
           */␊
          enum $astId_id_random { dummy }␊
          ␊
          abstract contract UsingForDirectives {␊
            enum $astId_id_random { dummy }␊
          ␊
            function usingFor(uint x) virtual  pure public returns (uint) ;␊
          }␊
          ␊
          /**␊
           * @title a␊
           * @author a␊
           * @inheritdoc Example␊
           * @dev a␊
           * @custom:a a␊
           * @notice a␊
           * @param a a␊
           * @return a a␊
           */␊
          enum FreeEnum { MyEnum }␊
          ␊
          /**␊
           * @dev a custom error outside a contract␊
           * @param example example parameter␊
           */␊
          enum CustomErrorOutsideContract { dummy }␊
          ␊
          int8 constant MAX_SIZE_C = 2;␊
          ␊
          abstract contract StructArrayUsesConstant {␊
            uint16 private constant MAX_SIZE = 10;␊
          ␊
            struct NotNamespaced {␊
              uint16 a;␊
              uint256[MAX_SIZE] b;␊
              uint256[MAX_SIZE_C] c;␊
            }␊
          ␊
            /// @custom:storage-location erc7201:uses.constant␊
            struct MainStorage {␊
              uint256 x;␊
              uint256[MAX_SIZE] y;␊
              uint256[MAX_SIZE_C] c;␊
            } MainStorage $MainStorage_random;␊
          }␊
          ␊
          address constant MY_ADDRESS = address(0);␊
          uint constant CONVERTED_ADDRESS = uint160(MY_ADDRESS);␊
          ␊
          interface IDummy {␊
          }␊
          ␊
          abstract contract UsesAddress {␊
            IDummy public constant MY_CONTRACT = IDummy(MY_ADDRESS);␊
          }␊
          ␊
          abstract contract HasFunctionWithRequiredReturn {␊
              struct S { uint x; }␊
              enum $astId_id_random { dummy }␊
              function foo(S calldata s) virtual  internal pure  returns (S calldata) ;␊
          }␊
          ␊
          library LibWithRequiredReturn {␊
              struct S { uint x; }␊
              enum $astId_id_random { dummy }␊
              function foo(S calldata s)  internal pure returns (bool) {}␊
          }␊
          ␊
          /**␊
           * @return uint 1␊
           * @return uint 2␊
           */␊
          function hasMultipleReturns() pure returns (bool, bool) {}␊
          ␊
          /**␊
           * @return a first␊
           * @return b second␊
           */␊
          function hasMultipleNamedReturns() pure returns (bool a, bool b) {}␊
          ␊
          /**␊
           * @param a first␊
           * @param b second␊
           */␊
          function hasReturnsDocumentedAsParams() pure returns (bool a, bool b) {}␊
          ␊
          abstract contract HasNatSpecWithMultipleReturns {␊
              /**␊
               * @return uint 1␊
               * @return uint 2␊
               */␊
              function hasMultipleReturnsInContract() virtual  public pure returns (uint, uint) ;␊
          ␊
              /**␊
               * @return a first␊
               * @return b second␊
               */␊
              function hasMultipleNamedReturnsInContract() virtual  public pure returns (uint a, uint b) ;␊
          ␊
              /**␊
               * @param a first␊
               * @param b second␊
               */␊
              function hasReturnsDocumentedAsParamsInContract() virtual  public pure returns (uint a, uint b) ;␊
          }␊
          ␊
          interface IHasExternalViewFunction {␊
              function foo() external view returns (uint256);␊
          }␊
          ␊
          abstract contract HasExternalViewFunction is IHasExternalViewFunction {␊
              // This generates a getter function that conforms to the interface␊
              enum $astId_id_random { dummy }␊
          ␊
              // References a selector in an interface␊
              bytes4 constant USING_INTERFACE_FUNCTION_SELECTOR = IHasExternalViewFunction.foo.selector;␊
          ␊
              // References a getter generated for a public variable␊
              enum $astId_id_random { dummy }␊
          }␊
          ␊
          abstract contract DeploysContractToImmutable {␊
              enum $astId_id_random { dummy }␊
          }␊
          ␊
          abstract contract HasSpecialFunctions {␊
              /// @param data call data␊
              /// @return dataReturn returned data␊
              enum $astId_id_random { dummy }␊
          ␊
              enum $astId_id_random { dummy }␊
          ␊
              // Regular function but payable␊
              function hasPayable() virtual  public payable ;␊
          ␊
              bytes4 constant PAYABLE_SELECTOR = this.hasPayable.selector;␊
          }␊
          ␊
          /// This is not considered a namespace according to ERC-7201 because the namespaced struct is outside of a contract.␊
          library LibraryWithNamespace {␊
              /// @custom:storage-location erc7201:example.main␊
              struct MainStorage {␊
                  uint256 x;␊
                  uint256 y;␊
              }␊
          }␊
          ␊
          interface InterfaceWithNamespace {␊
              /// @custom:storage-location erc7201:example.main␊
              struct MainStorage {␊
                  uint256 x;␊
                  uint256 y;␊
              }␊
          }␊
          ␊
          interface IHasConstantGetter {␊
            function a() external view returns (bytes32);␊
          }␊
          ␊
          abstract contract HasConstantGetter is IHasConstantGetter {␊
            bytes32 public override constant a = bytes32("foo");␊
          }␊
          ␊
          abstract contract AbstractHasConstantGetter {␊
            function a() virtual external pure returns (bytes32) ;␊
          }␊
          ␊
          abstract contract HasConstantGetterOverride is AbstractHasConstantGetter {␊
            bytes32 public override constant a = bytes32("foo");␊
          }␊
          ␊
          abstract contract HasFunctionOverride is AbstractHasConstantGetter {␊
            function a() override virtual external pure returns (bytes32) ;␊
          }`,
        },
        'contracts/test/NamespacedToModifyImported.sol': {
          content: `// SPDX-License-Identifier: MIT␊
          pragma solidity ^0.8.20;␊
          ␊
          import {CONSTANT_USING_SELECTOR, plusTwo, plusThree, CustomErrorOutsideContract} from "./NamespacedToModify.sol";␊
          ␊
          abstract contract Example {}␊
          `,
        },
      },
    }

## make namespaced input - solc 0.7

> Snapshot 1

    {
      language: 'Solidity',
      settings: {
        optimizer: {
          enabled: true,
          runs: 200,
        },
        outputSelection: {
          '*': {
            '': [
              'ast',
            ],
            '*': [
              'storageLayout',
            ],
          },
        },
      },
      sources: {
        'contracts/test/NamespacedToModify07.sol': {
          content: `// SPDX-License-Identifier: MIT␊
          pragma solidity 0.7.6;␊
           ␊
          abstract contract HasFunction {␊
            enum $astId_id_random { dummy }␊
            function foo() virtual  pure public returns (uint) ;␊
          }␊
          ␊
          abstract contract UsingFunction is HasFunction {␊
            enum $astId_id_random { dummy }␊
          }␊
          `,
        },
      },
    }
