test: compact-deployer examples and integration suite#109
Draft
0xisk wants to merge 3 commits into
Draft
Conversation
Introduce the `@openzeppelin/compact-deployer` package: a programmatic and CLI deployer for Compact contracts. Covers config loading, artifact and constructor-arg resolution, wallet/keystore handling, network and proof-server providers, and deployment-record bookkeeping. Wire the deployer into `@openzeppelin/compact-cli` via the new `compact-deploy` command (runDeploy), with passphrase prompting and JSON/verbose output modes. * Add root resolutions for the midnight stack and a `coverage` turbo task so the new package can report coverage. Part 1 of 2 splitting the original deployer PR. Examples and the integration-test suite follow in a stacked PR that builds on this one. Refs: #86
Add the fungible-token deploy walkthrough under examples/ and the end-to-end integration suite under tests/integrations/, both built on the compact-deployer tool. * examples/fungible-token: a TokenExample contract wrapping the OZ Compact FungibleToken module, with deploy scripts exercising the common constructor-arg types and `compact-deploy` CLI invocations. * tests/integrations: vitest specs covering deploy flows, dry-run, history isolation/rotation, proof-server auto-start, wallet lifecycle, keystore and error paths, plus a docker local-stack harness driven by the top-level Makefile. * Re-add the `examples/*` workspace and the integration/env make shortcuts to the root package.json, and the root compact.toml used for real-network deploys. Part 2 of 2 splitting the original deployer PR. Stacked on the compact-deployer tool PR. Refs: #86
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
* integrations/walletPool: evict a wallet build from the cache if it rejects, so a failed `WalletHandler.build`/`provider.start` no longer poisons every later `signerFor(alias)` call with the same rejection. * integrations/local-env: pin proof-server and indexer-standalone by digest (resolved from `:latest`) for deterministic runs, matching the already-pinned node image. Both digests are multi-arch (amd64 + arm64) manifests and identical to the current `:latest`, so behaviour is unchanged. Refs: #86
475c4ac to
15619e6
Compare
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.
What
Part 2 of 2 splitting the original compact-deployer PR (#86).
Stacked on #86 (the
compact-deployertool). This PR adds everything that consumes the deployer:examples/fungible-token/— acompact-deploywalkthrough. ATokenExamplecontract wrapping the OZ CompactFungibleTokenmodule, with deploy scripts exercising the common constructor-arg types and thecompact-deployCLI (local/preview/preprod).tests/integrations/— end-to-end vitest suite over real deploy flows: deploy, dry-run, history isolation/rotation, proof-server auto-start, private-state, wallet lifecycle/pool, keystore passphrase, and error paths. Driven by a docker local-stack harness via the top-levelMakefile.examples/*workspace and thetest:integration/compile:fixtures/env:*make shortcuts topackage.json, plus the rootcompact.tomlfor real-network deploys.Why split
The original PR was 103 files / +16.7k. Splitting into the tool (#86) and its consumers (this PR) keeps each reviewable. This half has no value without the tool, hence the stacking.
Base
feat/compact-deployer(#86), notmain. Review/merge #86 first; this PR's diff resolves to just the examples + tests once #86 lands.Verification
yarn lint(126 files) andyarn typespass. Integration specs run viamake test-integration(docker local stack +compactc), out of scope for plain CI.Refs: #86