Commit f4bf4f52 authored by smartcontracts's avatar smartcontracts Committed by GitHub

fix(ctp): use correct contract import paths (#3340)

Fixes two contracts in contracts-periphery to use the correct import
paths. Also modifies the contracts package to copy contracts into the
root directory on every build, not just before publish. This resolves
the issue where the contracts package could not be properly used within
the monorepo.
Co-authored-by: default avatarMark Tyneway <mark.tyneway@gmail.com>
parent c85a1d2e
---
'@eth-optimism/contracts-periphery': patch
---
Fixes import paths in the contracts-periphery package
......@@ -3,7 +3,7 @@ pragma solidity 0.8.15;
import {
CrossDomainEnabled
} from "@eth-optimism/contracts/contracts/libraries/bridge/CrossDomainEnabled.sol";
} from "@eth-optimism/contracts/libraries/bridge/CrossDomainEnabled.sol";
import {
OwnableUpgradeable
} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
......
......@@ -3,7 +3,7 @@ pragma solidity 0.8.15;
import {
CrossDomainEnabled
} from "@eth-optimism/contracts/contracts/libraries/bridge/CrossDomainEnabled.sol";
} from "@eth-optimism/contracts/libraries/bridge/CrossDomainEnabled.sol";
import {
OwnableUpgradeable
} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
......
src/contract-artifacts.ts
src/contract-deployed-artifacts.ts
/chugsplash
/L1
/L2
/libraries
/standards
......@@ -20,11 +20,12 @@
"standards"
],
"scripts": {
"build": "yarn build:contracts && yarn autogen:artifacts && yarn build:typescript",
"build": "yarn build:contracts && yarn copy:contracts && yarn autogen:artifacts && yarn build:typescript",
"build:typescript": "tsc -p ./tsconfig.json",
"build:contracts": "hardhat compile --show-stack-traces",
"autogen:markdown": "ts-node scripts/generate-markdown.ts",
"autogen:artifacts": "ts-node scripts/generate-artifacts.ts && ts-node scripts/generate-deployed-artifacts.ts",
"copy:contracts": "yarn copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./",
"test": "yarn test:contracts",
"test:contracts": "hardhat test --show-stack-traces",
"test:coverage": "NODE_OPTIONS=--max_old_space_size=8192 hardhat coverage && istanbul check-coverage --statements 90 --branches 84 --functions 88 --lines 90",
......@@ -38,11 +39,7 @@
"lint:contracts:fix": "yarn prettier --write 'contracts/**/*.sol'",
"lint:fix": "yarn lint:contracts:fix && yarn lint:ts:fix",
"lint": "yarn lint:fix && yarn lint:check",
"clean": "rm -rf ./dist ./artifacts ./cache ./coverage ./tsconfig.tsbuildinfo",
"prepublishOnly": "yarn copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./",
"postpublish": "rimraf chugsplash L1 L2 libraries standards",
"prepack": "yarn prepublishOnly",
"postpack": "yarn postpublish",
"clean": "rm -rf ./dist ./artifacts ./cache ./coverage ./tsconfig.tsbuildinfo ./chugsplash ./L1 ./L2 ./libraries ./standards",
"pre-commit": "lint-staged",
"validateDocs": "hardhat validateOutput"
},
......@@ -107,7 +104,6 @@
"prettier": "^2.3.1",
"prettier-plugin-solidity": "^1.0.0-beta.18",
"random-bytes-seed": "^1.0.3",
"rimraf": "^3.0.2",
"rlp": "^2.2.6",
"solhint": "^3.3.6",
"solhint-plugin-prettier": "^0.0.5",
......
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