Publish contract sources
Submit a deployment's original compiler sources to Sourcify and recheck its public verification. This is separate from hosting CAM files or publishing their on-chain reference.
- Run on
- The operator workstation with the retained private instance and matching source/dependency history.
- Requires
- Original deployment artifacts, Forge compiler output including
rawMetadata, and a chain supported by Sourcify. - Changes
- Public source-verification submissions and local request/job records. No contract creation, binding change or signed transaction.
- Success
- The selected contract's public bytecode matches and original compiler metadata satisfy the publisher's checks.
1. Select contracts from retained evidence
make pay-to-play/release/source/publish \
DOCKER_CONTEXT=your-local-context \
INSTANCE=/absolute/private/pay-to-play-instanceUse escrow or bike-nft instead for those instances. The menu lists contracts across saved records, deduplicated by chain and address. Check the network, address, recorded source revision and creation transaction before selecting.
Enter selects all contracts in the deployment selected by instance.json. Numbers or comma-separated numbers can select individual contracts, including an old projection that has since been replaced. Membership comes from saved CAM evidence, not today's live bindings. An unavailable service lookup is reported as unknown, not as verified.
2. Keep original compiler identity
The publisher uses the deployment's retained compiler artifacts and Git revision, not today's source files. Installed dependency sources must match the compiler metadata hashes. Restore matching source history, artifacts or dependencies when absent; do not substitute a fresh build and call it the original deployment.
Only metadata-listed source files and compiler settings are sent to Sourcify. The submission does not use the private signing RPC or a signing key. Completed instance deployments also attempt source publication after their deployment cleanup; a service failure does not undo the deployed contracts. Rehearsals do not submit public sources.
3. Inspect the result
Output distinguishes exact matches from bytecode matches with differing compiler metadata. After selecting an already verified address, the publisher compares the public compiler metadata with the original metadata. An HTTP 409 response takes that same address-based verification path; it is not silently accepted as success.
Creation and runtime matches must satisfy the publisher's exact-match requirements. For its own completed jobs, public matches must also be at least as strong as the saved job receipt. A successful explorer badge alone is not the retained evidence.
| Retained location | Purpose |
|---|---|
source-publication/<artifact-sha256>/ | Prepared requests tied to one deployment artifact. |
source-publication/state/ | Shared per-chain/address jobs for manual and automatic publication. |
state/<chain>-<address>.public-check.json | Latest public lookup, including a mismatch reason and response when verification disagrees. |
Retry without redeploying
Repeat the same command with the same instance. Pending jobs resume; failed attempts and historical receipts remain. Older per-operation job records are imported against their retained requests rather than discarded.
Service unavailable: retain the records and retry later. Metadata differs: inspect the recorded difference and original artifact before resubmitting. History or dependencies missing: restore those inputs. None of these failures is a reason to create a new business contract.
release/verify checks deployment evidence against the chain and submits nothing to Sourcify. Public source verification does not prove current ownership, service behavior, wallet decoding or an ERC-7730 description. See release recovery for incomplete transaction/artifact work.
Implementation: public rechecks, metadata comparison and job resumption.