Skip to content

refactor: rename IS_TEST_DEPLOYMENT to DETERMINISTIC_DEPLOYMENT#523

Open
jonaprieto wants to merge 1 commit intomainfrom
refactor/rename-is-test-deployment
Open

refactor: rename IS_TEST_DEPLOYMENT to DETERMINISTIC_DEPLOYMENT#523
jonaprieto wants to merge 1 commit intomainfrom
refactor/rename-is-test-deployment

Conversation

@jonaprieto
Copy link
Copy Markdown
Contributor

The old name IS_TEST_DEPLOYMENT (and Solidity param isTestDeployment) was misleading — it implied a test vs. production environment distinction, but the flag actually controls whether the contract is deployed deterministically via CREATE2 with a version-derived salt.

This renames it to DETERMINISTIC_DEPLOYMENT / deterministic and flips the boolean so true means deterministic (CREATE2). Updated across the deploy script, tests, justfile, README, and release checklist.

Other smart contract projects that adopted the same IS_TEST_DEPLOYMENT convention should apply equivalent updates.

…lip semantics

The old name `IS_TEST_DEPLOYMENT` (and Solidity param `isTestDeployment`) was
misleading — it implied a test vs. production environment distinction, but the
flag actually controls whether the contract is deployed deterministically via
CREATE2 with a version-derived salt.

Changes:
- contracts/script/DeployProtocolAdapter.s.sol: rename param `isTestDeployment`
  → `deterministic`, swap if/else branches so `if (deterministic)` performs the
  CREATE2 deploy, update NatSpec accordingly.
- contracts/test/DeployProtocolAdapter.t.sol: update named arguments at all call
  sites (`isTestDeployment: true` → `deterministic: false`, `isTestDeployment:
  false` → `deterministic: true`); rename test functions to reflect the new
  semantics (`test_deployment` → `regular_deployment`, `prod_deployment` →
  `deterministic_deployment`).
- contracts/README.md: replace `<IS_TEST_DEPLOYMENT>` placeholder with
  `<DETERMINISTIC_DEPLOYMENT>`.
- justfile: replace `$IS_TEST_DEPLOYMENT` with `$DETERMINISTIC_DEPLOYMENT` in
  the `contracts-simulate` and `contracts-deploy` recipes.
- RELEASE_CHECKLIST.md: replace both occurrences of
  `export IS_TEST_DEPLOYMENT=false` with `export DETERMINISTIC_DEPLOYMENT=true`
  and update the surrounding description text.

Note: other smart contract projects that adopted the same `IS_TEST_DEPLOYMENT`
convention should apply equivalent updates — rename the env var to
`DETERMINISTIC_DEPLOYMENT`, flip its boolean value, and update the deployment
script so `if (deterministic)` triggers the CREATE2 path.
@jonaprieto jonaprieto added maintenance Code maintenance and improvements justfile Changes to justfile recipes labels Apr 16, 2026
@jonaprieto jonaprieto self-assigned this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

justfile Changes to justfile recipes maintenance Code maintenance and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant