Upload a Contract Manifest to the Registry
You can use Blockchain App Builder to validate and publish deployment metadata from a selected Hardhat project to contract registry services.
The Upload Contract Manifest tool runs the project-owned hardhat-upload-contract-artefacts plug-in and passes registry endpoints as runtime values; it does not modify the project's Hardhat variables.
Manifest upload is available only for saved Oracle Blockchain Platform Besu environments.
Prerequisites
- Select an imported or composed Hardhat project that is deployed successfully.
- Confirm that the project includes the
hardhat-upload-contract-artefactspackage in thepackage.jsonfile, imports the plug-in inhardhat.config.tsorhardhat.config.js, and defines theuploadContractManifestconfiguration. - Create or select an Oracle Blockchain Platform Besu environment with the correct chain ID and RPC proxy authentication.
- Ensure that the required local deployment records exist for the upload mode that you choose.
The following upload modes are supported.
| Upload Mode | Required Local Records | Registry Destination |
|---|---|---|
| Both | OpenZeppelin manifest, ERC-7201 deployed-contracts JSON, and SOLC deployed-contracts JSON | Both registry endpoints |
| ERC-7201 / Upgradeable | OpenZeppelin manifest and ERC-7201 deployed-contracts JSON | ERC-7201 registry endpoint |
| Immutable / SOLC | SOLC deployed-contracts JSON | SOLC registry endpoint |
For a prepackaged imported project or digital assets contracts generated by Blockchain App Builder, typically ERC-7201 mode is sufficient.
For chain ID 1500, the default paths are as follows.
./.openzeppelin/unknown-1500.json
./.obp-da/.erc7201/deployedContracts-1500.json
./.obp-da/.solc/deployedContracts-1500.jsonAdjust the paths if the project stores deployment records elsewhere.- Open Developer Tools and then select Upload Contract Manifest.
- Select the Hardhat project and an Oracle Blockchain Platform Besu environment.
- Select the upload mode.
- Enter the required registry endpoint URL or URLs:
- ERC-7201 Manifest Upload Registry Endpoint for upgradeable records
- SOLC Manifest Upload Registry Endpoint for immutable records
- Confirm the OpenZeppelin and deployed-contract file paths. Optionally set timeout and verbose output.
- Select Validate. The plug-in runs and does not publish registry data.
- When validation succeeds, clear Validate and select Upload.
Troubleshooting
| Condition | Resolution |
|---|---|
| No environment is available | Create a saved Oracle Blockchain Platform Besu environment. EVMs and the Hardhat local node are not valid environments for uploading manifests. |
| Registry endpoint is invalid | Enter a complete HTTP or HTTPS registry URL for every endpoint required by the selected mode. |
| Required file not found | Compile and deploy the relevant contracts or correct the project-relative manifest and file path of the deployed contract. |
| Plug-in or configuration is missing | Install or import hardhat-upload-contract-artefacts and add the uploadContractManifest configuration that is shown in the tool’s preflight guidance.
|
| Upload fails after dry run succeeds | Review registry-service authentication, availability, endpoint policy, and the full plug-in output. The dry run validates local inputs but does not guarantee registry acceptance. |