chore: backport DeployMethod refactor (#22985) to v4-next#23029
Draft
AztecBot wants to merge 5 commits intobackport-to-v4-next-stagingfrom
Draft
chore: backport DeployMethod refactor (#22985) to v4-next#23029AztecBot wants to merge 5 commits intobackport-to-v4-next-stagingfrom
AztecBot wants to merge 5 commits intobackport-to-v4-next-stagingfrom
Conversation
Records the raw cherry-pick state (including conflict markers) so reviewers can see exactly what conflicted before resolution.
Resolve conflicts in #22985 cherry-pick: - Keep v4-next migration notes structure; add only the DeployMethod note (not unrelated entries from merge-train) - Drop unrelated formatting/refactor bleed-through (txe_oracles, constants*, contract.test fixture, factory helpers) - Adopt the new DeployInstantiationOptions API in factory and e2e tests - Preserve v4-next-specific DeployTxReceipt / DeployWaitOptions types - Drop deleted-by-us doc examples and the unrelated keystore-reload e2e test
v4-next-staging keeps DeployTxReceipt / DeployWaitOptions and the
'wait: { returnReceipt: true }' API. Restore DeployInteractionWaitOptions
(removed by upstream PR) and use it in DeployOptions/send so that
the existing returnReceipt callers keep type-checking.
Cherry-pick conflict resolution on commits 3befdc8/2ee3b06763 accidentally reverted 7 files to an older API. Upstream PR #22985 only touched 43 files; none of these 7 are among them. Restoring to origin/backport-to-v4-next-staging. - yarn-project/foundation/src/collection/array.ts (re-add uniqueBy) - yarn-project/foundation/src/collection/array.test.ts (re-add uniqueBy tests) - yarn-project/pxe/src/contract_function_simulator/oracle/utility_execution_oracle.ts - yarn-project/pxe/src/events/event_service.ts (batched validateAndStoreEvents) - yarn-project/pxe/src/events/event_service.test.ts - yarn-project/pxe/src/notes/note_service.ts (chunked nullifier batching) - yarn-project/pxe/src/notes/note_service.test.ts
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.
Summary
Backport of #22985 (
fix: better DeployMethod) tobackport-to-v4-next-staging.The original PR refactors
DeployMethodso that all address-affecting parameters (salt,deployer,universalDeploy,publicKeys) are locked in at construction time via a newDeployInstantiationOptionsargument, and removes the silent salt-cache poisoning bug where the address could change between calls. See the migration notes added under## TBDfor the full API change.Commits
This backport preserves the standard 3-commit history so reviewers can see exactly what conflicted and how it was resolved:
chore: cherry-pick #22985 ... with conflicts— rawgit cherry-pickresult with conflict markers in place. Does not compile.fix: resolve cherry-pick conflicts— resolution. Notable choices:migration_notes.md: only the new DeployMethod note was added. Other entries that came in via the cherry-pick (getBlock/getCheckpoint,feeAssetPriceModifier, Domain separators, aztec-up table reformatting) belong to PRs that have not been backported, so they were dropped to avoid bringing in unrelated changes.txe_oracles.nr,constants.nr,constants_tests.nr: dropped formatting-only diffs that depended on constants/types not present on v4-next (MAX_PRIVATE_LOGS_PER_TX,PRIVATE_LOG_SIZE_IN_FIELDS,DOM_SEP__HANDSHAKE_SECRET_HASH,DOM_SEP__MERKLE_HASH, etc.).bot/src/factory.ts: dropped the newsetupTokenWithOptionalEarlyRefuel/setupTokenContractWithOptionalEarlyRefuel/getTokenInstancehelpers (introduced by an unrelated PR) and applied the newDeployInstantiationOptionsAPI to the existingsetupTokenflow.e2e/composed/ha/e2e_ha_full.test.ts: dropped theshould reload keystore via admin API and keep building blocks after swapping attesterstest that does not exist on v4-next.docs/examples/ts/aave_bridge,docs/examples/ts/example_swap: kept deleted (modify/delete conflict — these examples don't exist on v4-next).docs/examples/ts/token_bridge/index.ts: keptnode.getProvenBlockNumber()— the newgetBlockNumber('proven')is from a different PR.aztec.js/src/api/contract.ts,bot, etc.: adopted the newDeployInstantiationOptionsAPI; kept v4-next-onlyDeployTxReceipt/DeployWaitOptionsexports.fix: restore DeployInteractionWaitOptions for v4-next returnReceipt API— v4-next still supportswait: { returnReceipt: true }(a feature added on v4-next that does not exist upstream). The upstream PR removedDeployInteractionWaitOptionsand tightenedDeployOptions<W extends InteractionWaitOptions>, which broke type-checking for the existingreturnReceiptcallers. This commit restoresDeployInteractionWaitOptions = NoWait | DeployWaitOptions | undefinedand rewiresDeployOptions/DeployReturn/sendto use it, so the v4-next-onlyreturnReceipt: truecallers keep type-checking.Test plan
ClaudeBox log: https://claudebox.work/s/2e03d384f1f73fd0?run=1