Commit 95fc3fbf authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

contracts-periphery: add typechain (#2987)

* contracts-periphery: add typechain

* ctp: fix depcheck
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 28bd76ae
---
'@eth-optimism/contracts-periphery': patch
---
Add typechain with ethers v5 support
...@@ -2,6 +2,8 @@ ignores: [ ...@@ -2,6 +2,8 @@ ignores: [
"@eth-optimism/contracts-bedrock", "@eth-optimism/contracts-bedrock",
"@openzeppelin/contracts", "@openzeppelin/contracts",
"@openzeppelin/contracts-upgradeable", "@openzeppelin/contracts-upgradeable",
"@ethersproject/providers",
"@ethersproject/abi",
"@rari-capital/solmate", "@rari-capital/solmate",
"@types/node", "@types/node",
"hardhat-deploy", "hardhat-deploy",
......
...@@ -10,6 +10,7 @@ import '@nomiclabs/hardhat-ethers' ...@@ -10,6 +10,7 @@ import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle' import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-etherscan' import '@nomiclabs/hardhat-etherscan'
import '@eth-optimism/hardhat-deploy-config' import '@eth-optimism/hardhat-deploy-config'
import '@typechain/hardhat'
import 'solidity-coverage' import 'solidity-coverage'
import 'hardhat-gas-reporter' import 'hardhat-gas-reporter'
import 'hardhat-deploy' import 'hardhat-deploy'
...@@ -92,6 +93,10 @@ const config: HardhatUserConfig = { ...@@ -92,6 +93,10 @@ const config: HardhatUserConfig = {
mocha: { mocha: {
timeout: 50000, timeout: 50000,
}, },
typechain: {
outDir: 'dist/types',
target: 'ethers-v5',
},
solidity: { solidity: {
compilers: [ compilers: [
{ {
......
...@@ -7,13 +7,10 @@ ...@@ -7,13 +7,10 @@
"files": [ "files": [
"dist/**/*.js", "dist/**/*.js",
"dist/**/*.d.ts", "dist/**/*.d.ts",
"dist/types/*.ts", "dist/types",
"artifacts/contracts/**/*.json", "artifacts/contracts/**/*.json",
"deployments/**/*.json", "deployments/**/*.json",
"L1", "contracts"
"L2",
"libraries",
"standards"
], ],
"scripts": { "scripts": {
"build": "yarn build:hh", "build": "yarn build:hh",
...@@ -71,6 +68,8 @@ ...@@ -71,6 +68,8 @@
"@types/chai": "^4.2.18", "@types/chai": "^4.2.18",
"@types/mocha": "^8.2.2", "@types/mocha": "^8.2.2",
"@types/node": "^17.0.21", "@types/node": "^17.0.21",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"chai": "^4.3.4", "chai": "^4.3.4",
"copyfiles": "^2.3.0", "copyfiles": "^2.3.0",
...@@ -92,6 +91,7 @@ ...@@ -92,6 +91,7 @@
"solhint": "^3.3.6", "solhint": "^3.3.6",
"solhint-plugin-prettier": "^0.0.5", "solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.7.17", "solidity-coverage": "^0.7.17",
"ts-node": "^10.8.2" "ts-node": "^10.8.2",
"typechain": "^8.1.0"
} }
} }
...@@ -3190,6 +3190,14 @@ ...@@ -3190,6 +3190,14 @@
dependencies: dependencies:
fs-extra "^9.1.0" fs-extra "^9.1.0"
"@typechain/hardhat@^6.1.2":
version "6.1.2"
resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-6.1.2.tgz#d3beccc6937d93f9b437616b741f839a8b953693"
integrity sha512-k4Ea3pVITKB2DH8p1a5U38cyy7KZPD04Spo4q5b4wO+n2mT+uAz5dxckPtbczn/Kk5wiFq+ZkuOtw5ZKFhL/+w==
dependencies:
fs-extra "^9.1.0"
lodash "^4.17.15"
"@types/abstract-leveldown@*": "@types/abstract-leveldown@*":
version "5.0.2" version "5.0.2"
resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-5.0.2.tgz#ee81917fe38f770e29eec8139b6f16ee4a8b0a5f" resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-5.0.2.tgz#ee81917fe38f770e29eec8139b6f16ee4a8b0a5f"
......
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