diff --git a/.gitignore b/.gitignore index 668256290..a35cf7045 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ pnpm-debug.log* # Temporary directory tmp/ + +# Environment configuration files +.envrc diff --git a/core/hardhat.config.ts b/core/hardhat.config.ts index 9d8131afe..264e9fcbd 100644 --- a/core/hardhat.config.ts +++ b/core/hardhat.config.ts @@ -1,6 +1,7 @@ import type { HardhatUserConfig } from "hardhat/config" import "@nomicfoundation/hardhat-toolbox" +import "hardhat-contract-sizer" import "hardhat-deploy" const config: HardhatUserConfig = { @@ -71,6 +72,17 @@ const config: HardhatUserConfig = { }, }, + contractSizer: { + alphaSort: true, + runOnCompile: true, + strict: true, + }, + + gasReporter: { + enabled: true, + coinmarketcap: process.env.COINMARKETCAP_API_KEY, + }, + typechain: { outDir: "typechain", }, diff --git a/core/package.json b/core/package.json index 603cb8643..ff7aa5197 100644 --- a/core/package.json +++ b/core/package.json @@ -45,6 +45,7 @@ "eslint": "^8.54.0", "ethers": "^6.8.1", "hardhat": "^2.19.1", + "hardhat-contract-sizer": "^2.10.0", "hardhat-deploy": "^0.11.43", "hardhat-gas-reporter": "^1.0.9", "prettier": "^3.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 257a3a017..2ef71f0cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -75,6 +75,9 @@ importers: hardhat: specifier: ^2.19.1 version: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat-contract-sizer: + specifier: ^2.10.0 + version: 2.10.0(hardhat@2.19.1) hardhat-deploy: specifier: ^0.11.43 version: 0.11.43 @@ -2704,6 +2707,13 @@ packages: react: 18.2.0 dev: false + /@colors/colors@1.5.0: + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + engines: {node: '>=0.1.90'} + requiresBuild: true + dev: true + optional: true + /@cspotcode/source-map-support@0.8.1: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -7187,6 +7197,15 @@ packages: colors: 1.4.0 dev: true + /cli-table3@0.6.3: + resolution: {integrity: sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==} + engines: {node: 10.* || >= 12.*} + dependencies: + string-width: 4.2.3 + optionalDependencies: + '@colors/colors': 1.5.0 + dev: true + /cli-width@3.0.0: resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} engines: {node: '>= 10'} @@ -10283,6 +10302,17 @@ packages: uglify-js: 3.17.4 dev: true + /hardhat-contract-sizer@2.10.0(hardhat@2.19.1): + resolution: {integrity: sha512-QiinUgBD5MqJZJh1hl1jc9dNnpJg7eE/w4/4GEnrcmZJJTDbVFNe3+/3Ep24XqISSkYxRz36czcPHKHd/a0dwA==} + peerDependencies: + hardhat: ^2.0.0 + dependencies: + chalk: 4.1.2 + cli-table3: 0.6.3 + hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + strip-ansi: 6.0.1 + dev: true + /hardhat-deploy@0.11.43: resolution: {integrity: sha512-D760CjDtinwjOCpKOvdyRtIJYLQIYXmhfgkFe+AkxlYM9bPZ/T4tZ/xIB2tR89ZT+z0hF1YuZFBXIL3/G/9T5g==} dependencies: