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
| Name | Type | In | Description |
|---|---|---|---|
nodeID | string | path | Required. The ID of the node |
Headers
| Name | Description |
|---|---|
Authorization | Required. 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
| Field | Type | Description |
|---|---|---|
contracts | object | Map of contract name to version information |
contracts.{name}.current_version | string | Currently deployed contract version |
contracts.{name}.new_version | string | omitted | New version when available, omitted otherwise |
has_update | boolean | true when at least one contract has a newer version |
can_trigger_update | boolean | true when the latest NodeContract is not yet activated (diamond cut has not executed) |
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid nodeID |
| 401 | Unauthorized - Invalid or missing authentication token |
| 404 | Not Found - Node not found |
| 500 | Internal Server Error |