Skip to content

Commit

Permalink
ci(build): bump release, deps, and solidity to v0.8.23 for gas service (
Browse files Browse the repository at this point in the history
#276)

* ci(build): bump release, deps, and solidity to v0.8.23 for gas service

* add test coverage

* test fix
  • Loading branch information
milapsheth authored Mar 26, 2024
1 parent d7c11de commit f0c50c4
Show file tree
Hide file tree
Showing 8 changed files with 1,029 additions and 574 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/slither.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ jobs:
run: npm ci

- name: Run Slither
uses: crytic/[email protected]
uses: crytic/[email protected]
env:
NO_OVERRIDES: true
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
run: npm ci

- name: Test
run: CHECK_CONTRACT_SIZE=true npm run test-evm-versions
run: CHECK_CONTRACT_SIZE=true npx hardhat test --parallel
27 changes: 20 additions & 7 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const chains = require(`@axelar-network/axelar-chains-config/info/${env}.json`);
const keys = readJSON(`${__dirname}/keys.json`);
const { networks, etherscan } = importNetworks(chains, keys);

networks.hardhat.hardfork = process.env.EVM_VERSION || 'merge';

const optimizerSettings = {
enabled: true,
runs: 1000,
Expand All @@ -41,20 +43,31 @@ const compilerSettings = {
},
};

const gasServiceSettings = {
version: '0.8.23',
settings: {
evmVersion: process.env.EVM_VERSION || 'london',
optimizer: optimizerSettings,
},
};

/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [compilerSettings],
// Fix the Proxy bytecodes
overrides: {
'contracts/AxelarGatewayProxy.sol': compilerSettings,
'contracts/BurnableMintableCappedERC20.sol': compilerSettings,
'contracts/DepositHandler.sol': compilerSettings,
'contracts/gas-service/AxelarGasServiceProxy.sol': compilerSettings,
'contracts/deposit-service/AxelarDepositServiceProxy.sol': compilerSettings,
},
overrides: process.env.NO_OVERRIDES
? {}
: {
'contracts/AxelarGatewayProxy.sol': compilerSettings,
'contracts/BurnableMintableCappedERC20.sol': compilerSettings,
'contracts/DepositHandler.sol': compilerSettings,
'contracts/gas-service/AxelarGasServiceProxy.sol': compilerSettings,
'contracts/deposit-service/AxelarDepositServiceProxy.sol': compilerSettings,
'contracts/gas-service/AxelarGasService.sol': gasServiceSettings, // use optimized setting for the gas service
},
},
defaultNetwork: 'hardhat',
networks,
Expand Down
Loading

0 comments on commit f0c50c4

Please sign in to comment.