Skip to main content

Upgrade Setup Contracts

Upgrades a setup's contracts to the latest versions the platform ships. The server compares each contract with the latest version (as Get Setup Upgrade Status reports), records an update deployment for the ones that differ and deploys the first of them. If an earlier deployment record of this setup is still unfinished, the call continues that record instead of creating a new one. When every contract is already current, nothing happens.

The upgrade is asynchronous: each new facet is a node transaction stamped with the setup's setup_id, and the last step, UpdateDiamondCut (type 55), wires them into the diamond. Follow it with List Node Transactions filtered by the setup's wallet_id and types, and with Get Setup Contract History, whose newest update record gets activated_at once the upgrade is live.

There is no body.

Required permission: contract:deploy

Request​

POST /v2/admin/nodes/{node_id}/setups/{setup_id}/contracts/upgrade

Parameters​

NameTypeInDescription
node_idstringpathRequired. The node's id
setup_idstringpathRequired. The setup to upgrade

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>

Example​

curl --request POST \
--url '{{baseUrl}}/v2/admin/nodes/6a4bef2b1e781b11c22e9707/setups/6a552db09c6088e126a4be87/contracts/upgrade' \
--header 'Authorization: Bearer <access_token>'

Response​

200 OK with an empty body. It means the upgrade was queued (or that there was nothing to upgrade), not that the new versions are live.

Errors​

Every refusal from this endpoint is answered with HTTP 409, whatever its code.

StatusCodeDescription
40910016node_id or setup_id is not a valid id
40910001Node not found, or the setup does not exist or belongs to another node (node domain 2)
40910005The node is outside your part of the hierarchy (node domain 2)
40910000Unexpected server-side failure

See Errors for the error format and common codes.