Skip to content

Commit

Permalink
optimize contracts (#1888)
Browse files Browse the repository at this point in the history
* optimize contracts

wont affect proxy contracts becuase they are exclusively locked by the common config

* legacy market is affected too

* fix all deps

* fix
  • Loading branch information
dbeal-eth authored Nov 2, 2023
1 parent d6dcc08 commit e272c0e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
1 change: 0 additions & 1 deletion markets/legacy-market/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { templates } from '@synthetixio/docgen';

const config = {
...commonConfig,
solidity: '0.8.17',
docgen: {
exclude: [
'./interfaces/external',
Expand Down
1 change: 0 additions & 1 deletion markets/perps-market/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { templates } from '@synthetixio/docgen';

const config = {
...commonConfig,
solidity: '0.8.17',
allowUnlimitedContractSize: true,
docgen: {
exclude: [
Expand Down
1 change: 0 additions & 1 deletion protocol/oracle-manager/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { templates } from '@synthetixio/docgen';

const config = {
...commonConfig,
solidity: '0.8.17',
docgen: {
exclude: [
'./interfaces/external',
Expand Down
28 changes: 23 additions & 5 deletions utils/common-config/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,32 @@ import '@synthetixio/hardhat-storage';
// Load common .env file from root
dotenv.config({ path: path.resolve(__dirname, '..', '..', '.env') });

const lockedConfig = {
version: '0.8.17',
settings: {
optimizer: {
enabled: false,
runs: 200,
},
},
};

const config = {
solidity: {
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 200,
compilers: [
{
version: '0.8.22',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
overrides: {
'contracts/Proxy.sol': lockedConfig,
'contracts/modules/CoreModule.sol': lockedConfig,
},
},
defaultNetwork: 'cannon',
Expand Down

0 comments on commit e272c0e

Please sign in to comment.