Skip to content

Commit

Permalink
fix: Zero out salts to get Docker Compose helper working
Browse files Browse the repository at this point in the history
When using this for local developing, the use of salts seems to
interfere with running the `l2-deployer` container. Fix by zeroing out
the hashes.
  • Loading branch information
sds committed Sep 3, 2023
1 parent bfbd487 commit 2c05855
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,38 @@ jobs:
command: '[ "$(cast balance 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)" = 10000000000000000000000 ]' # Default address
on_retry_command: docker compose logs

- name: Wait for contract to be deployed
uses: nick-fields/retry@v2
with:
timeout_seconds: 5
retry_wait_seconds: 5
max_attempts: 10
shell: bash
command: docker compose logs | grep Bundler | awk '{ print $5 }'
on_retry_comand: docker compose logs

- name: Get address
run: docker compose logs | grep Bundler | awk '{ print $5 }'
shell: bash

- name: Get address of Bundler contract
run: echo "BUNDLER_CONTRACT_ADDRESS=$(docker compose logs | grep Bundler | awk '{ print $5 }')" >> $GITHUB_ENV
shell: bash

- name: Show environment
run: env
shell: bash

- name: Check that L2 contract was deployed
uses: nick-fields/retry@v2
with:
timeout_seconds: 5
retry_wait_seconds: 5
max_attempts: 3
shell: bash
command: '[ $(cast call $BUNDLER_CONTRACT_ADDRESS "trustedCaller()") = 0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266 ]' # Default address
on_retry_command: docker compose logs

test:
strategy:
fail-fast: true
Expand Down
12 changes: 6 additions & 6 deletions script/DeployL2.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ contract DeployL2 is ImmutableCreate2Deployer {
uint24 public constant KEY_REGISTRY_MIGRATION_GRACE_PERIOD = 1 days;

bytes32 internal constant STORAGE_RENT_CREATE2_SALT =
bytes32(0x6d2b70e39c6bc63763098e336323591eb77cd0c65360d99ba6ea4e0161f2b96c);
bytes32(0);
bytes32 internal constant ID_REGISTRY_CREATE2_SALT =
bytes32(0x6d2b70e39c6bc63763098e336323591eb77cd0c63e0688f6d95afa008febf4d7);
bytes32(0);
bytes32 internal constant KEY_REGISTRY_CREATE2_SALT =
bytes32(0x6d2b70e39c6bc63763098e336323591eb77cd0c62af4de6e1f0355029f357f47);
bytes32(0);
bytes32 internal constant SIGNED_KEY_REQUEST_VALIDATOR_CREATE2_SALT =
bytes32(0x6d2b70e39c6bc63763098e336323591eb77cd0c6610c0841333604016684800c);
bytes32(0);
bytes32 internal constant BUNDLER_CREATE2_SALT =
bytes32(0x6d2b70e39c6bc63763098e336323591eb77cd0c6e451fc0a34ec4c008c9a31fa);
bytes32(0);
bytes32 internal constant RECOVERY_PROXY_CREATE2_SALT =
bytes32(0x6d2b70e39c6bc63763098e336323591eb77cd0c6110eaaca06f77900dac1cad3);
bytes32(0);

struct DeploymentParams {
address initialIdRegistryOwner;
Expand Down

0 comments on commit 2c05855

Please sign in to comment.