Skip to main content

Check and Update Contracts

Checks each contract deployed for the node against the latest version and, when a new version exists, creates a NodeContract record to trigger an update. The actual upgrade is executed asynchronously via the diamond cut mechanism.

Request

POST /v2/admin/nodes/{nodeID}/check-and-update/contracts

Parameters

NameTypeInDescription
nodeIDstringpathRequired. The ID of the node

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication
Content-TypeRequired. Must be application/json

Example

curl --request POST \
--url '\{\{baseUrl\}\}/v2/admin/nodes/67d6c447f47ff3adafda700d/check-and-update/contracts' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json'

Response

A successful request returns an HTTP 200 status code with an empty response body. The 200 means a NodeContract update record was created and a DeployDiamondCutFacet / ExecuteDiamondCut chain was queued — not that the new facets are live. Poll Get Node Transactions for the most-recent ExecuteDiamondCut (type 33) transaction until its status reaches Done (3).

Status Codes

Status CodeDescription
200Success
400Bad Request - Invalid nodeID
401Unauthorized - Invalid or missing authentication token
404Not Found - Node not found
409Conflict - Update cannot be performed in the current node state
500Internal Server Error