Skip to content

feat(aztec.js): cheatcode helpers for contract overrides#22899

Closed
dbanks12 wants to merge 1 commit into
graphite-base/22899from
db/contract-overrides-helpers
Closed

feat(aztec.js): cheatcode helpers for contract overrides#22899
dbanks12 wants to merge 1 commit into
graphite-base/22899from
db/contract-overrides-helpers

Conversation

@dbanks12

@dbanks12 dbanks12 commented May 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds two low-level cheatcode primitives for building ContractStateOverrides blobs:

  • spoofContractClassPublish(class)publishContractClass
  • spoofContractInstancePublish(instance)publishInstance

spoofContractInstancePublish validates that the instance's current and original class IDs match. Divergence requires a coherent registry-storage override; use fastForwardContractUpdate (#22905) for that case.

Earlier-draft helpers spoofContractDeployment, spoofContractUpdate, and spoofContractUpdateWithClassId are dropped: deployment needs nullifier overrides which aren't plumbed yet, and the update helpers are fully subsumed by fastForwardContractUpdate in #22905.

Stacks above #22833.

@dbanks12 dbanks12 force-pushed the db/contract-overrides branch from f3e666c to 1c5e1ff Compare May 1, 2026 15:38
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch from 34b5ec8 to d657406 Compare May 1, 2026 15:38
@dbanks12 dbanks12 force-pushed the db/contract-overrides branch from 1c5e1ff to 4587e4a Compare May 1, 2026 15:40
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch from d657406 to 2a51638 Compare May 1, 2026 15:40

dbanks12 commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@dbanks12 dbanks12 force-pushed the db/contract-overrides branch from 4587e4a to e19009b Compare May 1, 2026 15:49
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch 2 times, most recently from 57da1ed to 4f657a1 Compare May 1, 2026 16:11
@dbanks12 dbanks12 force-pushed the db/contract-overrides branch from e19009b to 8fb3a6f Compare May 1, 2026 16:11
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch from 4f657a1 to 94a9bd7 Compare May 1, 2026 16:48
@dbanks12 dbanks12 force-pushed the db/contract-overrides branch from 8fb3a6f to b16c77b Compare May 1, 2026 16:48
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch from 94a9bd7 to ea6fc89 Compare May 1, 2026 17:31
@dbanks12 dbanks12 force-pushed the db/contract-overrides branch from b16c77b to d590ce8 Compare May 1, 2026 17:31
@dbanks12 dbanks12 marked this pull request as draft May 1, 2026 17:52
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch from ea6fc89 to 6a9de00 Compare May 1, 2026 18:10
@dbanks12 dbanks12 force-pushed the db/contract-overrides branch 2 times, most recently from 053b77a to f22f962 Compare May 1, 2026 18:18
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch from 6a9de00 to 1842612 Compare May 1, 2026 18:18
@dbanks12 dbanks12 force-pushed the db/contract-overrides branch from f22f962 to a850ebc Compare May 1, 2026 19:17
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch from 1842612 to 74689e5 Compare May 1, 2026 19:18
@dbanks12 dbanks12 force-pushed the db/contract-overrides branch from a850ebc to f5b39b0 Compare May 1, 2026 20:12
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch from 74689e5 to 6fe5c42 Compare May 1, 2026 20:14
@dbanks12 dbanks12 changed the base branch from db/contract-overrides to graphite-base/22899 May 1, 2026 20:19
@dbanks12 dbanks12 force-pushed the graphite-base/22899 branch from f5b39b0 to fa5f0a0 Compare May 2, 2026 00:27
@dbanks12 dbanks12 force-pushed the db/contract-overrides-helpers branch from 6fe5c42 to 875cc17 Compare May 2, 2026 00:27
Adds two low-level helpers for building `ContractStateOverrides` blobs:

  spoofContractClassPublish(class)      ↔ publishContractClass
  spoofContractInstancePublish(instance) ↔ publishInstance

`spoofContractInstancePublish` validates that the instance's current and
original class IDs match. Divergence requires a coherent registry-storage
override - use `fastForwardContractUpdate` (downstack) for that case.

The other helpers from the original draft (`spoofContractDeployment`,
`spoofContractUpdate`, `spoofContractUpdateWithClassId`) are dropped:
deployment requires nullifier overrides not yet plumbed, and the update
helpers are subsumed by `fastForwardContractUpdate`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant