Skip to main content

Check Update Contract

Returns the current and newly available versions for each contract deployed under the node. Use this endpoint to detect whether an upgrade is available before triggering Check and Update Contracts.

Request

GET /v2/admin/nodes/{nodeID}/check-update/contracts

Parameters

NameTypeInDescription
nodeIDstringpathRequired. The ID of the node

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication

Example

curl --request GET \
--url '\{\{baseUrl\}\}/v2/admin/nodes/67d6c447f47ff3adafda700d/check-update/contracts' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'

Response

{
"contracts": {
"diamond": {
"current_version": "v2.0.0",
"new_version": "v2.1.0"
},
"fee_contract": {
"current_version": "v1.3.0"
}
},
"has_update": true,
"can_trigger_update": true
}

Response Fields

FieldTypeDescription
contractsobjectMap of contract name to version information
contracts.{name}.current_versionstringCurrently deployed contract version
contracts.{name}.new_versionstring | omittedNew version when available, omitted otherwise
has_updatebooleantrue when at least one contract has a newer version
can_trigger_updatebooleantrue when the latest NodeContract is not yet activated (diamond cut has not executed)

Status Codes

Status CodeDescription
200Success
400Bad Request - Invalid nodeID
401Unauthorized - Invalid or missing authentication token
404Not Found - Node not found
500Internal Server Error