Skip to content
CCPEDIAby Unity Nodes
App Development

Get Migration ID programmatically?

3 posts83 views2 likesLast activity Oct 2026

  1. WallaceKellyOP

    How can I programmatically get the Migration ID from my validator node?

  2. WallaceKelly 2

    The Migration ID is included in the GET response of /v0/scan-proxy/dso of the Scan Proxy API:

    curl --silent \
      http://wallet.localhost:2000/api/validator/v0/scan-proxy/dso \
      --header 'Authorization: Bearer eyJhbGciOi...' \
      | jq --raw-output '.sv_node_states[0].contract.payload.state.synchronizerNodes[0][1].sequencer.migrationId'
    
  3. mitesh.mistry

    Since major upgrades now happen through Logical Synchronizer Upgrades (LSUs) instead of hard migrations, the migration ID won’t change again. On MainNet it’s 4 and will stay 4, so the simplest and most stable approach is to hard-code it.

    The value differs by network:

    • MainNet: 4, permanently (MainNet is never reset).

    • DevNet and TestNet: currently 1. It could go back to 0 if those networks are ever reset, but that hasn’t been decided.