Skip to content

Commit

Permalink
Merge pull request #6757 from ethereum-optimism/fix/revert-lockdir
Browse files Browse the repository at this point in the history
Revert "feat(ctb): Consolidate lock files into a single directory"
  • Loading branch information
tynes authored Aug 11, 2023
2 parents e6fb26b + 613e493 commit 6cc232e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ jobs:
pnpm lint:check || echo "export LINT_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: gas lock
name: gas snapshot
command: |
forge --version
pnpm gas-lock --check || echo "export GAS_LOCK_STATUS=1" >> "$BASH_ENV"
pnpm gas-snapshot --check || echo "export GAS_SNAPSHOT_STATUS=1" >> "$BASH_ENV"
environment:
FOUNDRY_PROFILE: ci
working_directory: packages/contracts-bedrock
Expand All @@ -398,10 +398,10 @@ jobs:
FOUNDRY_PROFILE: ci
working_directory: packages/contracts-bedrock
- run:
name: storage lock
name: storage snapshot
command: |
pnpm storage-lock
git diff --exit-code locks/storage-lock || echo "export STORAGE_LOCK_STATUS=1" >> "$BASH_ENV"
pnpm storage-snapshot
git diff --exit-code .storage-layout || echo "export STORAGE_SNAPSHOT_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: semver lock
Expand All @@ -422,16 +422,16 @@ jobs:
FAILED=1
echo "Linting failed, see job output for details."
fi
if [[ "$GAS_LOCK_STATUS" -ne 0 ]]; then
if [[ "$GAS_SNAPSHOT_STATUS" -ne 0 ]]; then
FAILED=1
echo "Gas lock failed, see job output for details."
echo "Gas snapshot failed, see job output for details."
fi
if [[ "$DEPLOY_CONFIG_STATUS" -ne 0 ]]; then
FAILED=1
echo "Deploy configs invalid, see job output for details."
fi
if [[ "$STORAGE_LOCK_STATUS" -ne 0 ]]; then
echo "Storage lock failed, see job output for details."
if [[ "$STORAGE_SNAPSHOT_STATUS" -ne 0 ]]; then
echo "Storage snapshot failed, see job output for details."
FAILED=1
fi
if [[ "$INVARIANT_DOCS_STATUS" -ne 0 ]]; then
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=======================
👁👁 STORAGE LAYOUT LOCK 👁👁
👁👁 STORAGE LAYOUT snapshot 👁👁
=======================

=======================
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"test": "pnpm build:differential && pnpm build:fuzz && forge test",
"coverage": "pnpm build:differential && pnpm build:fuzz && forge coverage",
"coverage:lcov": "pnpm build:differential && pnpm build:fuzz && forge coverage --report lcov",
"gas-lock": "pnpm build:differential && pnpm build:fuzz && forge snapshot --snap locks/gas-lock --no-match-test 'testDiff|testFuzz|invariant|generateArtifact'",
"storage-lock": "./scripts/storage-lock.sh",
"gas-snapshot": "pnpm build:differential && pnpm build:fuzz && forge snapshot --no-match-test 'testDiff|testFuzz|invariant|generateArtifact'",
"storage-snapshot": "./scripts/storage-snapshot.sh",
"semver-lock": "forge script scripts/SemverLock.s.sol",
"validate-deploy-configs": "./scripts/validate-deploy-configs.sh",
"validate-spacers": "pnpm build && npx ts-node scripts/validate-spacers.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ dir=$(dirname "$0")

echo "Creating storage layout diagrams.."

echo "=======================" > $dir/../locks/storage-lock
echo "👁👁 STORAGE LAYOUT LOCK 👁👁" >> $dir/../locks/storage-lock
echo "=======================" >> $dir/../locks/storage-lock
echo "=======================" > $dir/../.storage-layout
echo "👁👁 STORAGE LAYOUT snapshot 👁👁" >> $dir/../.storage-layout
echo "=======================" >> $dir/../.storage-layout

for contract in ${contracts[@]}
do
echo -e "\n=======================" >> $dir/../locks/storage-lock
echo "$contract">> $dir/../locks/storage-lock
echo -e "=======================\n" >> $dir/../locks/storage-lock
forge inspect --pretty $contract storageLayout >> $dir/../locks/storage-lock
echo -e "\n=======================" >> $dir/../.storage-layout
echo "$contract">> $dir/../.storage-layout
echo -e "=======================\n" >> $dir/../.storage-layout
forge inspect --pretty $contract storage-layout >> $dir/../.storage-layout
done
echo "Storage layout lock stored at $dir/../locks/storage-lock"
echo "Storage layout snapshot stored at $dir/../.storage-layout"
File renamed without changes.

0 comments on commit 6cc232e

Please sign in to comment.