Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: contract sizer [AXE-2035] #123

Merged
merged 10 commits into from
Oct 12, 2023
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Set environment variable
run: export CHECK_CONTRACT_SIZE=true

- name: Test
run: npm run test
5 changes: 5 additions & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ require('dotenv').config();
require('@nomicfoundation/hardhat-toolbox');
require('solidity-coverage');
require('solidity-docgen');
require('hardhat-contract-sizer');
milapsheth marked this conversation as resolved.
Show resolved Hide resolved

const env = process.env.ENV || 'testnet';
const { importNetworks, readJSON } = require('@axelar-network/axelar-chains-config');
Expand Down Expand Up @@ -45,4 +46,8 @@ module.exports = {
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
},
contractSizer: {
runOnCompile: process.env.CHECK_CONTRACT_SIZE,
strict: process.env.CHECK_CONTRACT_SIZE,
},
};
133 changes: 133 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"eslint": "^8.43.0",
"eslint-config-richardpringle": "^2.0.0",
"hardhat": "~2.18.0",
"hardhat-contract-sizer": "^2.10.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"prettier-plugin-solidity": "^1.1.3",
Expand Down
Loading