Skip to content

Commit

Permalink
perf: update solidity compiler settings
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth committed Oct 28, 2024
1 parent a0efe34 commit c0a5506
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 191 deletions.
24 changes: 12 additions & 12 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ const optimizerSettings = {
},
},
};
const compilerSettings = {
const proxyContractCompilerSettings = {
version: '0.8.21',
settings: {
evmVersion: process.env.EVM_VERSION || 'london',
optimizer: optimizerSettings,
optimizer: {
...optimizerSettings,
runs: 1000,
},
},
};
const itsCompilerSettings = {
version: '0.8.24',
const compilerSettings = {
version: '0.8.27',
settings: {
evmVersion: process.env.EVM_VERSION || 'london',
optimizer: {
...optimizerSettings,
runs: 100, // Reduce runs to keep bytecode size under limit
},
optimizer: optimizerSettings,
},
};

Expand All @@ -55,10 +55,10 @@ module.exports = {
overrides: process.env.NO_OVERRIDES
? {}
: {
'contracts/proxies/Proxy.sol': compilerSettings,
'contracts/proxies/TokenManagerProxy.sol': compilerSettings,
'contracts/InterchainTokenService.sol': itsCompilerSettings,
'contracts/test/TestInterchainTokenService.sol': itsCompilerSettings,
'contracts/proxies/InterchainProxy.sol': proxyContractCompilerSettings,
'contracts/proxies/TokenManagerProxy.sol': proxyContractCompilerSettings,
'contracts/interchain-token/InterchainToken.sol': proxyContractCompilerSettings,
'contracts/test/TestInterchainTokenService.sol': proxyContractCompilerSettings,
},
},
defaultNetwork: 'hardhat',
Expand Down
Loading

0 comments on commit c0a5506

Please sign in to comment.