Skip to content

Commit

Permalink
contracts-bedrock: delete dead typescript
Browse files Browse the repository at this point in the history
This commit deletes a bunch of dead typescript code
from the contracts-bedrock package.

This deletes bundling in all of the artifacts into the
npm package so it will make the npm package must smaller.
It will also reduce the build time by removing some steps
from the build.
  • Loading branch information
tynes committed Jun 26, 2023
1 parent dc3922c commit 8109c91
Show file tree
Hide file tree
Showing 21 changed files with 34 additions and 966 deletions.
15 changes: 1 addition & 14 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"configsProject": [
"{projectRoot}/foundry.toml",
"{projectRoot}/tsconfig.json",
"{projectRoot}/hardhat.config.ts",
"{projectRoot}/package.json"
],
"default": ["{projectRoot}/**/*", "configsWorkspace"],
Expand All @@ -38,8 +37,6 @@
],
"productionSrc": [
"{projectRoot}/src/**/*",
"!{projectRoot}/src/contract-artifacts.ts",
"!{projectRoot}/src/contract-deployed-artifacts.ts",
"!{projectRoot}/src/**/*.spec.ts"
],
"productionContracts": ["{projectRoot}/contracts/**/*"],
Expand All @@ -63,24 +60,14 @@
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/artifacts", "{projectRoot}/forge-artifacts"]
},
"autogen:artifacts": {
"inputs": [
"configsWorkspace",
"configsProject",
"productionContracts",
"^productionContracts"
],
"dependsOn": ["^build", "build:contracts"],
"outputs": ["srcGenerated"]
},
"build": {
"inputs": [
"configsWorkspace",
"configsProject",
"production",
"^production"
],
"dependsOn": ["^build", "autogen:artifacts", "build:contracts"],
"dependsOn": ["^build", "build:contracts"],
"outputs": ["{projectRoot}/dist"]
}
}
Expand Down
4 changes: 0 additions & 4 deletions packages/contracts-bedrock/deploy-config/devnetL1.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/contracts-bedrock/deploy-config/getting-started.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/contracts-bedrock/deploy-config/goerli-forked.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/contracts-bedrock/deploy-config/goerli.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/contracts-bedrock/deploy-config/hardhat.ts

This file was deleted.

57 changes: 0 additions & 57 deletions packages/contracts-bedrock/deploy-config/local.ts

This file was deleted.

26 changes: 0 additions & 26 deletions packages/contracts-bedrock/deploy-config/mainnet.ts

This file was deleted.

180 changes: 0 additions & 180 deletions packages/contracts-bedrock/hardhat.config.ts

This file was deleted.

26 changes: 5 additions & 21 deletions packages/contracts-bedrock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,19 @@
"scripts": {
"bindings": "cd ../../op-bindings && make",
"build:with-metadata": "FOUNDRY_PROFILE=echidna yarn build:forge",
"build": "npx nx build:ts && npx nx typechain",
"build": "npx nx build:contracts && npx nx typechain",
"prebuild:contracts": "yarn ts-node scripts/verify-foundry-install.ts",
"build:contracts": "yarn build:hardhat",
"build:contracts": "yarn build:forge",
"build:forge": "forge build",
"build:hardhat": "hardhat compile",
"build:ts": "tsc -p tsconfig.build.json",
"build:differential": "go build -o ./scripts/differential-testing/differential-testing ./scripts/differential-testing",
"build:fuzz": "(cd test-case-generator && go build ./cmd/fuzz.go)",
"autogen:artifacts": "ts-node scripts/generate-artifacts.ts",
"autogen:invariant-docs": "ts-node scripts/invariant-doc-gen.ts",
"test": "yarn build:differential && yarn build:fuzz && forge test",
"coverage": "yarn build:differential && yarn build:fuzz && forge coverage",
"coverage:lcov": "yarn build:differential && yarn build:fuzz && forge coverage --report lcov",
"gas-snapshot": "yarn build:differential && yarn build:fuzz && forge snapshot --no-match-test 'testDiff|testFuzz|invariant|generateArtifact'",
"storage-snapshot": "./scripts/storage-snapshot.sh",
"validate-deploy-configs": "hardhat compile && hardhat generate-deploy-config && ./scripts/validate-deploy-configs.sh",
"validate-deploy-configs": "./scripts/validate-deploy-configs.sh",
"validate-spacers": "forge build && npx ts-node scripts/validate-spacers.ts",
"slither": "./scripts/slither.sh",
"slither:triage": "TRIAGE_MODE=1 ./scripts/slither.sh",
Expand All @@ -57,33 +54,20 @@
"@eth-optimism/core-utils": "^0.12.1",
"@openzeppelin/contracts": "4.7.3",
"@openzeppelin/contracts-upgradeable": "4.7.3",
"@rari-capital/solmate": "https://github.com/rari-capital/solmate.git#8f9b23f8838670afda0fd8983f2c41e8037ae6bc",
"clones-with-immutable-args": "https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args.git#105efee1b9127ed7f6fedf139e1fc796ce8791f2",
"ethers": "^5.7.0"
},
"devDependencies": {
"@eth-optimism/hardhat-deploy-config": "^0.2.6",
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/abstract-signer": "^5.7.0",
"ethereumjs-wallet": "^1.0.2",
"@defi-wonderland/smock": "^2.0.2",
"@foundry-rs/hardhat-forge": "^0.1.17",
"@foundry-rs/easy-foundryup": "^0.1.3",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-waffle": "^2.0.0",
"@rari-capital/solmate": "https://github.com/rari-capital/solmate.git#8f9b23f8838670afda0fd8983f2c41e8037ae6bc",
"clones-with-immutable-args": "https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args.git#105efee1b9127ed7f6fedf139e1fc796ce8791f2",
"@typechain/ethers-v5": "^10.1.0",
"@typescript-eslint/eslint-plugin": "^5.45.1",
"@typescript-eslint/parser": "^5.45.1",
"bip39": "^3.0.4",
"chai": "^4.2.0",
"command-exists": "1.2.9",
"dotenv": "^16.0.0",
"ds-test": "https://github.com/dapphub/ds-test.git#9310e879db8ba3ea6d5c6489a579118fd264a3f5",
"ethereum-waffle": "^3.0.0",
"forge-std": "https://github.com/foundry-rs/forge-std.git#e8a047e3f40f13fa37af6fe14e6e06283d9a060e",
"glob": "^7.1.6",
"hardhat": "^2.9.6",
"hardhat-deploy": "^0.11.4",
"solhint": "^3.3.7",
"solhint-plugin-prettier": "^0.0.5",
"ts-node": "^10.9.1",
Expand Down
Loading

0 comments on commit 8109c91

Please sign in to comment.