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 FAIL_COMPILE_IF_SIZE_EXCEEDS=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-contract-deployments/evm/utils');
Expand Down Expand Up @@ -44,4 +45,8 @@ module.exports = {
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
},
contractSizer: {
runOnCompile: true,
blockchainguyy marked this conversation as resolved.
Show resolved Hide resolved
strict: process.env.FAIL_COMPILE_IF_SIZE_EXCEEDS,
blockchainguyy marked this conversation as resolved.
Show resolved Hide resolved
},
};
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 @@ -37,6 +37,7 @@
"eslint-config-richardpringle": "^2.0.0",
"fs-extra": "^11.1.1",
"hardhat": "^2.13.0",
"hardhat-contract-sizer": "^2.10.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"prettier-plugin-solidity": "^1.1.3",
Expand Down
Loading