Import Contract Manifest and Metadata
post
/v1/contracts/manifests/import
Imports a manifest and contract-version metadata for the addresses in `contracts`.
To update an existing manifest, set `update=true` and provide `manifestLayoutId`.
For updates, `contracts` entries can include an address and metadata for versions associated with that manifest.
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
Root Schema : schema
Match One Schema
Show Source
-
object
ManifestAppendImportRequest
Title:
ManifestAppendImportRequest -
object
ManifestUpdateImportRequest
Title:
ManifestUpdateImportRequest
Nested Schema : ManifestAppendImportRequest
Type:
objectTitle:
Show Source
ManifestAppendImportRequest-
contracts(required): array
contracts
Minimum Number of Items:
1Contract addresses with ABI, creation bytecode, and exactly one block reference. -
manifest(required): object
manifest
OpenZeppelin/Hardhat manifest JSON
-
update: boolean
Default Value:
falseOmit or set to `false` to import contract-version metadata.
Nested Schema : ManifestUpdateImportRequest
Type:
objectTitle:
Show Source
ManifestUpdateImportRequest-
contracts: array
contracts
Optional metadata updates for versions associated with `manifestLayoutId`. Omitted metadata leaves existing metadata unchanged, `null` clears it, and an object replaces it.
-
manifest(required): object
manifest
OpenZeppelin/Hardhat manifest JSON
-
manifestLayoutId(required): integer
(int64)
Identifier of the existing manifest layout to update.
-
update(required): boolean
Set true to update an existing manifest layout.
Nested Schema : contracts
Type:
arrayMinimum Number of Items:
1Contract addresses with ABI, creation bytecode, and exactly one block reference.
Show Source
Nested Schema : manifest
Type:
objectOpenZeppelin/Hardhat manifest JSON
Nested Schema : items
Type:
Show Source
object-
abi(required): array
abi
Standard JSON ABI entries.
-
address(required): string
20-byte address in 0x-prefixed hexadecimal format.
-
blockNum: string
Block number in 0x-prefixed hexadecimal or decimal format.
-
bytecode(required): string
Creation bytecode in 0x-prefixed hexadecimal format.
-
metadata:
Optional user-facing metadata stored with this contract version.
-
role: [
"string",
"null"
]
Optional contract classification. Supported values are `regular`, `proxy`, `implementation`, and `library`; other values are treated as `regular`.
-
txHash: string
32-byte transaction hash in 0x-prefixed hexadecimal format.
Match One Schema
Show Source
Nested Schema : items
Type:
objectNested Schema : contracts
Type:
arrayOptional metadata updates for versions associated with `manifestLayoutId`. Omitted metadata leaves existing metadata unchanged, `null` clears it, and an object replaces it.
Show Source
Nested Schema : manifest
Type:
objectOpenZeppelin/Hardhat manifest JSON
Nested Schema : items
Type:
Show Source
object-
address(required): string
20-byte 0x-prefixed address
-
metadata:
Optional user-facing metadata patch for this contract version.
-
role: [
"string",
"null"
]
Optional contract classification update. Supported values are `regular`, `proxy`, `implementation`, and `library`; other values are treated as `regular`.
Examples
Back to Top
Response
Supported Media Types
- application/json
202 Response
Returns the accepted manifest import request.
Root Schema : ManifestImportResult
Type:
objectResult of an asynchronous contract manifest import request.
Show Source
-
affectedContractVersions: integer
Number of contract versions created or updated by the import.
-
manifestLayoutId: integer
(int64)
Identifier of the manifest layout affected by the import operation.
-
update: boolean
Indicates whether the operation updated an existing manifest record.
400 Response
Validation failed.
Root Schema : ErrorResponse
Type:
objectError response returned by the service.
Show Source
-
decodedError:
Returned only when `decode.errors=true` and decodable revert bytes are present.
-
error: string
Short error summary suitable for display.
-
hint: [
"string",
"null"
]
Optional guidance for resolving the error.
-
message: [
"string",
"null"
]
Additional error details, when available.
-
policy:
Present for policy warnings or denials such as preflight failure.
-
preflight:
Present for preflight-gated transaction submission errors.
-
requestId: [
"string",
"null"
]
Client-provided correlation ID echoed in the response.
-
upstreamCode: [
"integer",
"null"
]
Besu node error code, when provided by the RPC endpoint.
-
upstreamData: [
"string",
"null"
]
Error data returned by the Besu node in 0x-prefixed hexadecimal or JSON format, when available.
-
upstreamError: [
"object",
"null"
]
upstreamError
Additional Properties Allowed:
trueComplete error object returned by the Besu node, including code, message, and data fields, when available.
Nested Schema : upstreamError
Type:
objectAdditional Properties Allowed:
trueComplete error object returned by the Besu node, including code, message, and data fields, when available.
500 Response
Unexpected service error.
Root Schema : ErrorResponse
Type:
objectError response returned by the service.
Show Source
-
decodedError:
Returned only when `decode.errors=true` and decodable revert bytes are present.
-
error: string
Short error summary suitable for display.
-
hint: [
"string",
"null"
]
Optional guidance for resolving the error.
-
message: [
"string",
"null"
]
Additional error details, when available.
-
policy:
Present for policy warnings or denials such as preflight failure.
-
preflight:
Present for preflight-gated transaction submission errors.
-
requestId: [
"string",
"null"
]
Client-provided correlation ID echoed in the response.
-
upstreamCode: [
"integer",
"null"
]
Besu node error code, when provided by the RPC endpoint.
-
upstreamData: [
"string",
"null"
]
Error data returned by the Besu node in 0x-prefixed hexadecimal or JSON format, when available.
-
upstreamError: [
"object",
"null"
]
upstreamError
Additional Properties Allowed:
trueComplete error object returned by the Besu node, including code, message, and data fields, when available.
Nested Schema : upstreamError
Type:
objectAdditional Properties Allowed:
trueComplete error object returned by the Besu node, including code, message, and data fields, when available.