Skip to main content

Get Setup Upgrade Status

Compares each of a setup's contracts with the latest version the platform ships and reports whether an upgrade is available. It changes nothing; run the upgrade with Upgrade Setup Contracts.

Required permission: contract:deploy

Request​

GET /v2/admin/nodes/{node_id}/setups/{setup_id}/contracts/upgrade-status

Parameters​

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

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>

Example​

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

Response​

{
"contracts": {
"fee": {
"current_version": "2.2.0",
"new_version": "2.3.0",
"address": "0x1bD038546274fbE5656711d4E5371EE1bABCd126"
},
"burn": {
"current_version": "1.0.0",
"address": "0x222CB82947be52A91a88B1A2E116abf4D9bA6eed"
},
"listing": {
"current_version": "1.0.1",
"address": "0xb6627b1685d1199E3087D2247d5F432fb1721c34"
},
"rent": {
"current_version": "1.0.0",
"address": "0x57327F5C456B661Fc0D337473ec8F14a4ADccfb3"
},
"secondary": {
"current_version": "1.0.0",
"address": "0x8B3a9f9Ea0fA265f56D28AD9Ea0416E5b6a32011"
},
"otc": {
"current_version": "1.0.2",
"address": "0x80d60e8E2F2f0c19de948b8bc64c862119137924"
},
"diamond_cut": {
"current_version": "1.0.0",
"address": "0x07CE06EF88C5b104A3632371b6E07A360Bcdb168"
},
"diamond": {
"current_version": "1.0.0",
"address": "0x39247A80f1c0ddcEfb4986fA7A59E919E1F2Fa38"
},
"diamond_loupe": {
"current_version": "1.0.0",
"address": "0x709a52Dec3C716FBb4d7d8382EDD8F6e645D8b54"
},
"ownership": {
"current_version": "1.0.0",
"address": "0x0Fdf63aB85Ca5eb1404FCA1992b616D45AB34589"
}
},
"has_update": true,
"can_trigger_update": false
}

Response Fields​

FieldTypeDescription
contractsobjectOne entry per contract: fee, burn, listing, rent, secondary, otc, diamond_cut, diamond, diamond_loupe, ownership
contracts.<type>.current_versionstringDeployed version. Empty string when the contract is not deployed
contracts.<type>.new_versionstringLatest version, present only when it differs from current_version
contracts.<type>.addressstringDeployed address. Omitted when the contract is not deployed
has_updatebooleantrue when at least one contract has a new_version
can_trigger_updatebooleantrue when one of the setup's deployment records (the initial one or an upgrade) is not finished and not live yet. Upgrade Setup Contracts then continues that record instead of starting a new one

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.