Kaynağa Gözat

Ignore specific warnings and make the rest into errors (#3695)

Francisco 3 yıl önce
ebeveyn
işleme
046121e080

+ 62 - 0
contracts/mocks/ERC721ConsecutiveEnumerableMock.unreachable.sol

@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: MIT
+
+pragma solidity ^0.8.0;
+
+import "../token/ERC721/extensions/ERC721Consecutive.sol";
+import "../token/ERC721/extensions/ERC721Enumerable.sol";
+
+contract ERC721ConsecutiveEnumerableMock is ERC721Consecutive, ERC721Enumerable {
+    constructor(
+        string memory name,
+        string memory symbol,
+        address[] memory receivers,
+        uint96[] memory amounts
+    ) ERC721(name, symbol) {
+        for (uint256 i = 0; i < receivers.length; ++i) {
+            _mintConsecutive(receivers[i], amounts[i]);
+        }
+    }
+
+    function supportsInterface(bytes4 interfaceId)
+        public
+        view
+        virtual
+        override(ERC721, ERC721Enumerable)
+        returns (bool)
+    {
+        return super.supportsInterface(interfaceId);
+    }
+
+    function _ownerOf(uint256 tokenId) internal view virtual override(ERC721, ERC721Consecutive) returns (address) {
+        return super._ownerOf(tokenId);
+    }
+
+    function _mint(address to, uint256 tokenId) internal virtual override(ERC721, ERC721Consecutive) {
+        super._mint(to, tokenId);
+    }
+
+    function _beforeTokenTransfer(
+        address from,
+        address to,
+        uint256 tokenId
+    ) internal virtual override(ERC721, ERC721Enumerable) {
+        super._beforeTokenTransfer(from, to, tokenId);
+    }
+
+    function _afterTokenTransfer(
+        address from,
+        address to,
+        uint256 tokenId
+    ) internal virtual override(ERC721, ERC721Consecutive) {
+        super._afterTokenTransfer(from, to, tokenId);
+    }
+
+    function _beforeConsecutiveTokenTransfer(
+        address from,
+        address to,
+        uint256 first,
+        uint96 size
+    ) internal virtual override(ERC721, ERC721Enumerable) {
+        super._beforeConsecutiveTokenTransfer(from, to, first, size);
+    }
+}

+ 0 - 56
contracts/mocks/ERC721ConsecutiveMock.sol

@@ -95,62 +95,6 @@ contract ERC721ConsecutiveMock is ERC721Burnable, ERC721Consecutive, ERC721Pausa
     }
 }
 
-contract ERC721ConsecutiveEnumerableMock is ERC721Consecutive, ERC721Enumerable {
-    constructor(
-        string memory name,
-        string memory symbol,
-        address[] memory receivers,
-        uint96[] memory amounts
-    ) ERC721(name, symbol) {
-        for (uint256 i = 0; i < receivers.length; ++i) {
-            _mintConsecutive(receivers[i], amounts[i]);
-        }
-    }
-
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        virtual
-        override(ERC721, ERC721Enumerable)
-        returns (bool)
-    {
-        return super.supportsInterface(interfaceId);
-    }
-
-    function _ownerOf(uint256 tokenId) internal view virtual override(ERC721, ERC721Consecutive) returns (address) {
-        return super._ownerOf(tokenId);
-    }
-
-    function _mint(address to, uint256 tokenId) internal virtual override(ERC721, ERC721Consecutive) {
-        super._mint(to, tokenId);
-    }
-
-    function _beforeTokenTransfer(
-        address from,
-        address to,
-        uint256 tokenId
-    ) internal virtual override(ERC721, ERC721Enumerable) {
-        super._beforeTokenTransfer(from, to, tokenId);
-    }
-
-    function _afterTokenTransfer(
-        address from,
-        address to,
-        uint256 tokenId
-    ) internal virtual override(ERC721, ERC721Consecutive) {
-        super._afterTokenTransfer(from, to, tokenId);
-    }
-
-    function _beforeConsecutiveTokenTransfer(
-        address from,
-        address to,
-        uint256 first,
-        uint96 size
-    ) internal virtual override(ERC721, ERC721Enumerable) {
-        super._beforeConsecutiveTokenTransfer(from, to, first, size);
-    }
-}
-
 contract ERC721ConsecutiveNoConstructorMintMock is ERC721Consecutive {
     constructor(string memory name, string memory symbol) ERC721(name, symbol) {
         _mint(msg.sender, 0);

+ 6 - 2
contracts/token/ERC721/extensions/ERC721Enumerable.sol

@@ -106,9 +106,13 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
         address,
         address,
         uint256,
-        uint96
+        uint96 size
     ) internal virtual override {
-        revert("ERC721Enumerable: consecutive transfers not supported");
+        // We revert because enumerability is not supported with consecutive batch minting.
+        // This conditional is only needed to silence spurious warnings about unreachable code.
+        if (size > 0) {
+            revert("ERC721Enumerable: consecutive transfers not supported");
+        }
     }
 
     /**

+ 8 - 0
hardhat.config.js

@@ -50,6 +50,7 @@ const argv = require('yargs/yargs')()
   .argv;
 
 require('@nomiclabs/hardhat-truffle5');
+require('hardhat-ignore-warnings');
 
 if (argv.gas) {
   require('hardhat-gas-reporter');
@@ -75,6 +76,13 @@ module.exports = {
       viaIR: withOptimizations && argv.ir,
     },
   },
+  warnings: {
+    '*': {
+      'code-size': withOptimizations,
+      'unused-param': !argv.coverage, // coverage causes unused-param warnings
+      default: 'error',
+    },
+  },
   networks: {
     hardhat: {
       blockGasLimit: 10000000,

+ 47 - 0
hardhat/ignore-unreachable-warnings.js

@@ -0,0 +1,47 @@
+// Warnings about unreachable code are emitted with a source location that corresponds to the unreachable code.
+// We have some testing contracts that purposely cause unreachable code, but said code is in the library contracts, and
+// with hardhat-ignore-warnings we are not able to selectively ignore them without potentially ignoring relevant
+// warnings that we don't want to miss.
+// Thus, we need to handle these warnings separately. We force Hardhat to compile them in a separate compilation job and
+// then ignore the warnings about unreachable code that come from that compilation job.
+
+const { task } = require('hardhat/config');
+const {
+  TASK_COMPILE_SOLIDITY_GET_COMPILATION_JOB_FOR_FILE,
+  TASK_COMPILE_SOLIDITY_COMPILE,
+} = require('hardhat/builtin-tasks/task-names');
+
+const marker = Symbol('unreachable');
+const markedCache = new WeakMap();
+
+task(TASK_COMPILE_SOLIDITY_GET_COMPILATION_JOB_FOR_FILE, async (params, _, runSuper) => {
+  const job = await runSuper(params);
+  // If the file is in the unreachable directory, we make a copy of the config and mark it, which will cause it to get
+  // compiled separately (along with the other marked files).
+  if (params.file.sourceName.startsWith('contracts/mocks/') && /\bunreachable\b/.test(params.file.sourceName)) {
+    const originalConfig = job.solidityConfig;
+    let markedConfig = markedCache.get(originalConfig);
+    if (markedConfig === undefined) {
+      markedConfig = { ...originalConfig, [marker]: true };
+      markedCache.set(originalConfig, markedConfig);
+    }
+    job.solidityConfig = markedConfig;
+  }
+  return job;
+});
+
+const W_UNREACHABLE_CODE = '5740';
+
+task(TASK_COMPILE_SOLIDITY_COMPILE, async (params, _, runSuper) => {
+  const marked = params.compilationJob.solidityConfig[marker];
+  const result = await runSuper(params);
+  if (marked) {
+    result.output = {
+      ...result.output,
+      errors: result.output.errors?.filter(
+        e => e.severity !== 'warning' || e.errorCode !== W_UNREACHABLE_CODE,
+      ),
+    };
+  }
+  return result;
+});

+ 366 - 0
package-lock.json

@@ -30,6 +30,7 @@
         "graphlib": "^2.1.8",
         "hardhat": "^2.9.1",
         "hardhat-gas-reporter": "^1.0.4",
+        "hardhat-ignore-warnings": "^0.2.0",
         "keccak256": "^1.0.2",
         "lodash.startcase": "^4.4.0",
         "lodash.zip": "^4.2.0",
@@ -9469,6 +9470,38 @@
         "hardhat": "^2.0.2"
       }
     },
+    "node_modules/hardhat-ignore-warnings": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/hardhat-ignore-warnings/-/hardhat-ignore-warnings-0.2.0.tgz",
+      "integrity": "sha512-fetYwdpjAg6pl7oxOAL0yZQTKt/87KgDV5P7sEoIORXaoqCBvRGcGAQLJZ8hCiWNZ+vZKYw/9oVVZVlFcOxZTw==",
+      "dev": true,
+      "dependencies": {
+        "minimatch": "^5.1.0",
+        "node-interval-tree": "^2.0.1",
+        "solidity-comments": "^0.0.2"
+      }
+    },
+    "node_modules/hardhat-ignore-warnings/node_modules/brace-expansion": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+      "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+      "dev": true,
+      "dependencies": {
+        "balanced-match": "^1.0.0"
+      }
+    },
+    "node_modules/hardhat-ignore-warnings/node_modules/minimatch": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
+      "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==",
+      "dev": true,
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/hardhat/node_modules/ansi-styles": {
       "version": "3.2.1",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
@@ -12725,6 +12758,18 @@
         "node-gyp-build-test": "build-test.js"
       }
     },
+    "node_modules/node-interval-tree": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-2.0.1.tgz",
+      "integrity": "sha512-KodzC8le4U8LOmCvn1wSyIY8eplzRSjsLMzs0EjLteCXWDjRpCTzrjtQ4t8jh3w3r6OIglha1zChzjRYMVwuLA==",
+      "dev": true,
+      "dependencies": {
+        "shallowequal": "^1.1.0"
+      },
+      "engines": {
+        "node": ">= 14.0.0"
+      }
+    },
     "node_modules/nofilter": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz",
@@ -14898,6 +14943,12 @@
         "ieee754": "^1.2.1"
       }
     },
+    "node_modules/shallowequal": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
+      "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
+      "dev": true
+    },
     "node_modules/shebang-command": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -15898,12 +15949,193 @@
       "integrity": "sha512-F5bTDLh3rmDxRmLSrs3qt3nvxJprWSEkS7h2KmuXDx7XTfJ6ZKVTV1rtPIYCqJAuPsU/qa8YUeFn7jdOAZcTPA==",
       "dev": true
     },
+    "node_modules/solidity-comments": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments/-/solidity-comments-0.0.2.tgz",
+      "integrity": "sha512-G+aK6qtyUfkn1guS8uzqUeua1dURwPlcOjoTYW/TwmXAcE7z/1+oGCfZUdMSe4ZMKklNbVZNiG5ibnF8gkkFfw==",
+      "dev": true,
+      "engines": {
+        "node": ">= 12"
+      },
+      "optionalDependencies": {
+        "solidity-comments-darwin-arm64": "0.0.2",
+        "solidity-comments-darwin-x64": "0.0.2",
+        "solidity-comments-freebsd-x64": "0.0.2",
+        "solidity-comments-linux-arm64-gnu": "0.0.2",
+        "solidity-comments-linux-arm64-musl": "0.0.2",
+        "solidity-comments-linux-x64-gnu": "0.0.2",
+        "solidity-comments-linux-x64-musl": "0.0.2",
+        "solidity-comments-win32-arm64-msvc": "0.0.2",
+        "solidity-comments-win32-ia32-msvc": "0.0.2",
+        "solidity-comments-win32-x64-msvc": "0.0.2"
+      }
+    },
+    "node_modules/solidity-comments-darwin-arm64": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-darwin-arm64/-/solidity-comments-darwin-arm64-0.0.2.tgz",
+      "integrity": "sha512-HidWkVLSh7v+Vu0CA7oI21GWP/ZY7ro8g8OmIxE8oTqyMwgMbE8F1yc58Sj682Hj199HCZsjmtn1BE4PCbLiGA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/solidity-comments-darwin-x64": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-darwin-x64/-/solidity-comments-darwin-x64-0.0.2.tgz",
+      "integrity": "sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
     "node_modules/solidity-comments-extractor": {
       "version": "0.0.7",
       "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz",
       "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==",
       "dev": true
     },
+    "node_modules/solidity-comments-freebsd-x64": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-freebsd-x64/-/solidity-comments-freebsd-x64-0.0.2.tgz",
+      "integrity": "sha512-8Qe4mpjuAxFSwZJVk7B8gAoLCdbtS412bQzBwk63L8dmlHogvE39iT70aAk3RHUddAppT5RMBunlPUCFYJ3ZTw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "freebsd"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/solidity-comments-linux-arm64-gnu": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-gnu/-/solidity-comments-linux-arm64-gnu-0.0.2.tgz",
+      "integrity": "sha512-spkb0MZZnmrP+Wtq4UxP+nyPAVRe82idOjqndolcNR0S9Xvu4ebwq+LvF4HiUgjTDmeiqYiFZQ8T9KGdLSIoIg==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/solidity-comments-linux-arm64-musl": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-musl/-/solidity-comments-linux-arm64-musl-0.0.2.tgz",
+      "integrity": "sha512-guCDbHArcjE+JDXYkxx5RZzY1YF6OnAKCo+sTC5fstyW/KGKaQJNPyBNWuwYsQiaEHpvhW1ha537IvlGek8GqA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/solidity-comments-linux-x64-gnu": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-gnu/-/solidity-comments-linux-x64-gnu-0.0.2.tgz",
+      "integrity": "sha512-zIqLehBK/g7tvrFmQljrfZXfkEeLt2v6wbe+uFu6kH/qAHZa7ybt8Vc0wYcmjo2U0PeBm15d79ee3AkwbIjFdQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/solidity-comments-linux-x64-musl": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-musl/-/solidity-comments-linux-x64-musl-0.0.2.tgz",
+      "integrity": "sha512-R9FeDloVlFGTaVkOlELDVC7+1Tjx5WBPI5L8r0AGOPHK3+jOcRh6sKYpI+VskSPDc3vOO46INkpDgUXrKydlIw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/solidity-comments-win32-arm64-msvc": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-win32-arm64-msvc/-/solidity-comments-win32-arm64-msvc-0.0.2.tgz",
+      "integrity": "sha512-QnWJoCQcJj+rnutULOihN9bixOtYWDdF5Rfz9fpHejL1BtNjdLW1om55XNVHGAHPqBxV4aeQQ6OirKnp9zKsug==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/solidity-comments-win32-ia32-msvc": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-win32-ia32-msvc/-/solidity-comments-win32-ia32-msvc-0.0.2.tgz",
+      "integrity": "sha512-vUg4nADtm/NcOtlIymG23NWJUSuMsvX15nU7ynhGBsdKtt8xhdP3C/zA6vjDk8Jg+FXGQL6IHVQ++g/7rSQi0w==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/solidity-comments-win32-x64-msvc": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-win32-x64-msvc/-/solidity-comments-win32-x64-msvc-0.0.2.tgz",
+      "integrity": "sha512-36j+KUF4V/y0t3qatHm/LF5sCUCBx2UndxE1kq5bOzh/s+nQgatuyB+Pd5BfuPQHdWu2KaExYe20FlAa6NL7+Q==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
     "node_modules/solidity-coverage": {
       "version": "0.8.2",
       "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.2.tgz",
@@ -26518,6 +26750,37 @@
         "sha1": "^1.1.1"
       }
     },
+    "hardhat-ignore-warnings": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/hardhat-ignore-warnings/-/hardhat-ignore-warnings-0.2.0.tgz",
+      "integrity": "sha512-fetYwdpjAg6pl7oxOAL0yZQTKt/87KgDV5P7sEoIORXaoqCBvRGcGAQLJZ8hCiWNZ+vZKYw/9oVVZVlFcOxZTw==",
+      "dev": true,
+      "requires": {
+        "minimatch": "^5.1.0",
+        "node-interval-tree": "^2.0.1",
+        "solidity-comments": "^0.0.2"
+      },
+      "dependencies": {
+        "brace-expansion": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+          "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+          "dev": true,
+          "requires": {
+            "balanced-match": "^1.0.0"
+          }
+        },
+        "minimatch": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
+          "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==",
+          "dev": true,
+          "requires": {
+            "brace-expansion": "^2.0.1"
+          }
+        }
+      }
+    },
     "has": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -28867,6 +29130,15 @@
       "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==",
       "dev": true
     },
+    "node-interval-tree": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-2.0.1.tgz",
+      "integrity": "sha512-KodzC8le4U8LOmCvn1wSyIY8eplzRSjsLMzs0EjLteCXWDjRpCTzrjtQ4t8jh3w3r6OIglha1zChzjRYMVwuLA==",
+      "dev": true,
+      "requires": {
+        "shallowequal": "^1.1.0"
+      }
+    },
     "nofilter": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz",
@@ -30535,6 +30807,12 @@
         }
       }
     },
+    "shallowequal": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
+      "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
+      "dev": true
+    },
     "shebang-command": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -31332,12 +31610,100 @@
       "integrity": "sha512-F5bTDLh3rmDxRmLSrs3qt3nvxJprWSEkS7h2KmuXDx7XTfJ6ZKVTV1rtPIYCqJAuPsU/qa8YUeFn7jdOAZcTPA==",
       "dev": true
     },
+    "solidity-comments": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments/-/solidity-comments-0.0.2.tgz",
+      "integrity": "sha512-G+aK6qtyUfkn1guS8uzqUeua1dURwPlcOjoTYW/TwmXAcE7z/1+oGCfZUdMSe4ZMKklNbVZNiG5ibnF8gkkFfw==",
+      "dev": true,
+      "requires": {
+        "solidity-comments-darwin-arm64": "0.0.2",
+        "solidity-comments-darwin-x64": "0.0.2",
+        "solidity-comments-freebsd-x64": "0.0.2",
+        "solidity-comments-linux-arm64-gnu": "0.0.2",
+        "solidity-comments-linux-arm64-musl": "0.0.2",
+        "solidity-comments-linux-x64-gnu": "0.0.2",
+        "solidity-comments-linux-x64-musl": "0.0.2",
+        "solidity-comments-win32-arm64-msvc": "0.0.2",
+        "solidity-comments-win32-ia32-msvc": "0.0.2",
+        "solidity-comments-win32-x64-msvc": "0.0.2"
+      }
+    },
+    "solidity-comments-darwin-arm64": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-darwin-arm64/-/solidity-comments-darwin-arm64-0.0.2.tgz",
+      "integrity": "sha512-HidWkVLSh7v+Vu0CA7oI21GWP/ZY7ro8g8OmIxE8oTqyMwgMbE8F1yc58Sj682Hj199HCZsjmtn1BE4PCbLiGA==",
+      "dev": true,
+      "optional": true
+    },
+    "solidity-comments-darwin-x64": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-darwin-x64/-/solidity-comments-darwin-x64-0.0.2.tgz",
+      "integrity": "sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA==",
+      "dev": true,
+      "optional": true
+    },
     "solidity-comments-extractor": {
       "version": "0.0.7",
       "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz",
       "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==",
       "dev": true
     },
+    "solidity-comments-freebsd-x64": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-freebsd-x64/-/solidity-comments-freebsd-x64-0.0.2.tgz",
+      "integrity": "sha512-8Qe4mpjuAxFSwZJVk7B8gAoLCdbtS412bQzBwk63L8dmlHogvE39iT70aAk3RHUddAppT5RMBunlPUCFYJ3ZTw==",
+      "dev": true,
+      "optional": true
+    },
+    "solidity-comments-linux-arm64-gnu": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-gnu/-/solidity-comments-linux-arm64-gnu-0.0.2.tgz",
+      "integrity": "sha512-spkb0MZZnmrP+Wtq4UxP+nyPAVRe82idOjqndolcNR0S9Xvu4ebwq+LvF4HiUgjTDmeiqYiFZQ8T9KGdLSIoIg==",
+      "dev": true,
+      "optional": true
+    },
+    "solidity-comments-linux-arm64-musl": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-linux-arm64-musl/-/solidity-comments-linux-arm64-musl-0.0.2.tgz",
+      "integrity": "sha512-guCDbHArcjE+JDXYkxx5RZzY1YF6OnAKCo+sTC5fstyW/KGKaQJNPyBNWuwYsQiaEHpvhW1ha537IvlGek8GqA==",
+      "dev": true,
+      "optional": true
+    },
+    "solidity-comments-linux-x64-gnu": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-gnu/-/solidity-comments-linux-x64-gnu-0.0.2.tgz",
+      "integrity": "sha512-zIqLehBK/g7tvrFmQljrfZXfkEeLt2v6wbe+uFu6kH/qAHZa7ybt8Vc0wYcmjo2U0PeBm15d79ee3AkwbIjFdQ==",
+      "dev": true,
+      "optional": true
+    },
+    "solidity-comments-linux-x64-musl": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-linux-x64-musl/-/solidity-comments-linux-x64-musl-0.0.2.tgz",
+      "integrity": "sha512-R9FeDloVlFGTaVkOlELDVC7+1Tjx5WBPI5L8r0AGOPHK3+jOcRh6sKYpI+VskSPDc3vOO46INkpDgUXrKydlIw==",
+      "dev": true,
+      "optional": true
+    },
+    "solidity-comments-win32-arm64-msvc": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-win32-arm64-msvc/-/solidity-comments-win32-arm64-msvc-0.0.2.tgz",
+      "integrity": "sha512-QnWJoCQcJj+rnutULOihN9bixOtYWDdF5Rfz9fpHejL1BtNjdLW1om55XNVHGAHPqBxV4aeQQ6OirKnp9zKsug==",
+      "dev": true,
+      "optional": true
+    },
+    "solidity-comments-win32-ia32-msvc": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-win32-ia32-msvc/-/solidity-comments-win32-ia32-msvc-0.0.2.tgz",
+      "integrity": "sha512-vUg4nADtm/NcOtlIymG23NWJUSuMsvX15nU7ynhGBsdKtt8xhdP3C/zA6vjDk8Jg+FXGQL6IHVQ++g/7rSQi0w==",
+      "dev": true,
+      "optional": true
+    },
+    "solidity-comments-win32-x64-msvc": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/solidity-comments-win32-x64-msvc/-/solidity-comments-win32-x64-msvc-0.0.2.tgz",
+      "integrity": "sha512-36j+KUF4V/y0t3qatHm/LF5sCUCBx2UndxE1kq5bOzh/s+nQgatuyB+Pd5BfuPQHdWu2KaExYe20FlAa6NL7+Q==",
+      "dev": true,
+      "optional": true
+    },
     "solidity-coverage": {
       "version": "0.8.2",
       "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.2.tgz",

+ 1 - 0
package.json

@@ -71,6 +71,7 @@
     "graphlib": "^2.1.8",
     "hardhat": "^2.9.1",
     "hardhat-gas-reporter": "^1.0.4",
+    "hardhat-ignore-warnings": "^0.2.0",
     "keccak256": "^1.0.2",
     "lodash.startcase": "^4.4.0",
     "lodash.zip": "^4.2.0",