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

feat: check bytecode size in gh actions #259

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
milapsheth marked this conversation as resolved.
Show resolved Hide resolved

- name: Test
run: npm run test-evm-versions
11 changes: 10 additions & 1 deletion hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
require('@nomicfoundation/hardhat-toolbox');
require('solidity-coverage');
const { importNetworks, readJSON } = require('@axelar-network/axelar-chains-config');

if (process.env.STORAGE_LAYOUT) {
require('hardhat-storage-layout');
}

if (process.env.CHECK_CONTRACT_SIZE) {
require('hardhat-contract-sizer');
}

const { importNetworks, readJSON } = require('@axelar-network/axelar-chains-config');

const env = process.env.ENV || 'testnet';
const chains = require(`@axelar-network/axelar-chains-config/info/${env}.json`);
const keys = readJSON(`${__dirname}/keys.json`);
Expand Down Expand Up @@ -47,4 +52,8 @@ module.exports = {
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
},
contractSizer: {
runOnCompile: process.env.CHECK_CONTRACT_SIZE,
strict: process.env.CHECK_CONTRACT_SIZE,
},
};
147 changes: 143 additions & 4 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@
"eslint-config-richardpringle": "^2.0.0",
"ethers": "^5.7.2",
"fs-extra": "^11.1.1",
"hardhat": "^2.17.2",
"hardhat": "^2.19.1",
"hardhat-storage-layout": "^0.1.7",
"hardhat-contract-sizer": "^2.10.0",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"prettier": "^2.8.7",
Expand Down
Loading