Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat(ctb): Consolidate lock files into a single directory" #6757

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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"