refactor: rename IS_TEST_DEPLOYMENT to DETERMINISTIC_DEPLOYMENT#523
Open
jonaprieto wants to merge 1 commit intomainfrom
Open
refactor: rename IS_TEST_DEPLOYMENT to DETERMINISTIC_DEPLOYMENT#523jonaprieto wants to merge 1 commit intomainfrom
jonaprieto wants to merge 1 commit intomainfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The old name
IS_TEST_DEPLOYMENT(and Solidity paramisTestDeployment) 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/deterministicand flips the boolean sotruemeans deterministic (CREATE2). Updated across the deploy script, tests, justfile, README, and release checklist.Other smart contract projects that adopted the same
IS_TEST_DEPLOYMENTconvention should apply equivalent updates.