Commit 6482bc3a authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4300 from ethereum-optimism/sc/ctb-cfg-ts

feat(ctb): type safety for deploy config
parents b3e50ae0 fff25e62
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
"@types/chai-as-promised": "^7.1.4", "@types/chai-as-promised": "^7.1.4",
"@types/mocha": "^8.2.2", "@types/mocha": "^8.2.2",
"@types/rimraf": "^3.0.0", "@types/rimraf": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^4.26.0", "@typescript-eslint/eslint-plugin": "^5.45.1",
"@typescript-eslint/parser": "^4.26.0", "@typescript-eslint/parser": "^5.45.1",
"@uniswap/v3-core": "1.0.0", "@uniswap/v3-core": "1.0.0",
"@uniswap/v3-periphery": "^1.0.1", "@uniswap/v3-periphery": "^1.0.1",
"@uniswap/v3-sdk": "^3.6.2", "@uniswap/v3-sdk": "^3.6.2",
......
import { DeployConfig } from '../src/deploy-config'
import config from './devnetL1.json'
export default config satisfies DeployConfig
import { DeployConfig } from '../src/deploy-config'
import config from './goerli-forked.json'
export default config satisfies DeployConfig
import { DeployConfig } from '../src/deploy-config'
import config from './goerli.json'
export default config satisfies DeployConfig
import { DeployConfig } from '../src/deploy-config'
import config from './hardhat.json'
export default config satisfies DeployConfig
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"build:differential": "tsc scripts/differential-testing.ts --outDir dist --moduleResolution node --esModuleInterop", "build:differential": "tsc scripts/differential-testing.ts --outDir dist --moduleResolution node --esModuleInterop",
"prebuild": "yarn ts-node scripts/verify-foundry-install.ts", "prebuild": "yarn ts-node scripts/verify-foundry-install.ts",
"build": "hardhat compile && yarn autogen:artifacts && yarn build:ts && yarn typechain", "build": "hardhat compile && yarn autogen:artifacts && yarn build:ts && yarn typechain",
"build:ts": "tsc -p tsconfig.json", "build:ts": "tsc -p tsconfig.build.json",
"autogen:artifacts": "ts-node scripts/generate-artifacts.ts", "autogen:artifacts": "ts-node scripts/generate-artifacts.ts",
"deploy": "hardhat deploy", "deploy": "hardhat deploy",
"test": "yarn build:differential && forge test", "test": "yarn build:differential && forge test",
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
"@nomiclabs/hardhat-waffle": "^2.0.0", "@nomiclabs/hardhat-waffle": "^2.0.0",
"@rari-capital/solmate": "https://github.com/rari-capital/solmate.git#8f9b23f8838670afda0fd8983f2c41e8037ae6bc", "@rari-capital/solmate": "https://github.com/rari-capital/solmate.git#8f9b23f8838670afda0fd8983f2c41e8037ae6bc",
"@typechain/ethers-v5": "^10.1.0", "@typechain/ethers-v5": "^10.1.0",
"@typescript-eslint/eslint-plugin": "^5.26.0", "@typescript-eslint/eslint-plugin": "^5.45.1",
"@typescript-eslint/parser": "^4.29.1", "@typescript-eslint/parser": "^5.45.1",
"bip39": "^3.0.4", "bip39": "^3.0.4",
"chai": "^4.2.0", "chai": "^4.2.0",
"command-exists": "1.2.9", "command-exists": "1.2.9",
......
...@@ -7,19 +7,19 @@ interface RequiredDeployConfig { ...@@ -7,19 +7,19 @@ interface RequiredDeployConfig {
/** /**
* Number of confirmations to wait when deploying contracts. * Number of confirmations to wait when deploying contracts.
*/ */
numDeployConfirmations: number numDeployConfirmations?: number
/** /**
* Address that will own the entire system on L1 when the deploy is complete. * Address that will own the entire system on L1 when the deploy is complete.
*/ */
finalSystemOwner: string finalSystemOwner?: string
/** /**
* Address that will own the entire system on L1 during the deployment process. This address will * Address that will own the entire system on L1 during the deployment process. This address will
* not own the system after the deployment is complete, ownership will be transferred to the * not own the system after the deployment is complete, ownership will be transferred to the
* final system owner. * final system owner.
*/ */
controller: string controller?: string
/** /**
* The L2 genesis script uses this to fill the storage of the L1Block info predeploy. The rollup * The L2 genesis script uses this to fill the storage of the L1Block info predeploy. The rollup
...@@ -84,12 +84,12 @@ interface RequiredDeployConfig { ...@@ -84,12 +84,12 @@ interface RequiredDeployConfig {
/** /**
* Starting block number for the output oracle. * Starting block number for the output oracle.
*/ */
l2OutputOracleStartingBlockNumber: number l2OutputOracleStartingBlockNumber?: number
/** /**
* Starting timestamp for the output oracle. * Starting timestamp for the output oracle.
*/ */
l2OutputOracleStartingTimestamp: number l2OutputOracleStartingTimestamp?: number
/** /**
* Address of the L2 output oracle proposer. * Address of the L2 output oracle proposer.
......
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist"
},
"include": ["src/**/*"]
}
{ {
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"rootDir": "./src",
"outDir": "./dist" "outDir": "./dist"
}, },
"include": ["src/**/*"] "include": [
"src/**/*",
"deploy-config/**/*",
"deploy-config/**/*.json",
"tasks/**/*",
"scripts/**/*"
]
} }
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
"ethereum-waffle": "^3.4.0", "ethereum-waffle": "^3.4.0",
"hardhat-gas-reporter": "^1.0.7", "hardhat-gas-reporter": "^1.0.7",
"hardhat-deploy": "^0.11.4", "hardhat-deploy": "^0.11.4",
"prettier": "^2.3.1", "prettier": "^2.8.0",
"prettier-plugin-solidity": "^1.0.0-beta.18", "prettier-plugin-solidity": "^1.0.0-beta.18",
"solhint": "^3.3.6", "solhint": "^3.3.6",
"solidity-coverage": "^0.7.19", "solidity-coverage": "^0.7.19",
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
"mocha": "^10.0.0", "mocha": "^10.0.0",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"node-fetch": "^2.6.7", "node-fetch": "^2.6.7",
"prettier": "^2.3.1", "prettier": "^2.8.0",
"prettier-plugin-solidity": "^1.0.0-beta.18", "prettier-plugin-solidity": "^1.0.0-beta.18",
"solhint": "^3.3.6", "solhint": "^3.3.6",
"solhint-plugin-prettier": "^0.0.5", "solhint-plugin-prettier": "^0.0.5",
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
"merkletreejs": "^0.2.18", "merkletreejs": "^0.2.18",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"mocha": "^8.4.0", "mocha": "^8.4.0",
"prettier": "^2.3.1", "prettier": "^2.8.0",
"prettier-plugin-solidity": "^1.0.0-beta.18", "prettier-plugin-solidity": "^1.0.0-beta.18",
"random-bytes-seed": "^1.0.3", "random-bytes-seed": "^1.0.3",
"rlp": "^2.2.6", "rlp": "^2.2.6",
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
"hardhat": "^2.9.6", "hardhat": "^2.9.6",
"mocha": "^8.4.0", "mocha": "^8.4.0",
"pino-pretty": "^4.7.1", "pino-pretty": "^4.7.1",
"prettier": "^2.3.1", "prettier": "^2.8.0",
"prom-client": "^13.1.0", "prom-client": "^13.1.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-node": "^10.9.1" "ts-node": "^10.9.1"
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment