DefiantLabs / cosmos-upgrades

a tool to search for scheduled cosmos upgrades
MIT License
4 stars 2 forks source link

Feat/plan info in response #17

Closed pharr117 closed 1 year ago

pharr117 commented 1 year ago

This PR adds the plan info (if it exists) pulled from the current_plan endpoint into the response. If the plan info is not set found, then the result will be null in the response:

[
  {
    "type": "mainnet",
    "network": "secretnetwork",
    "rpc_server": "https://rpc.secret.express",
    "rest_server": "https://1rpc.io/scrt-lcd",
    "latest_block_height": 10574131,
    "upgrade_found": true,
    "upgrade_name": "v1.11",
    "source": "active_upgrade_proposals",
    "upgrade_block_height": 10615300,
    "estimated_upgrade_time": "2023-09-12T13:52:07.646690",
    "upgrade_plan": null,
    "version": "v0.45.16",
    "error": null
  },
  {
    "type": "mainnet",
    "network": "cosmoshub",
    "rpc_server": "https://cosmos-rpc.onivalidator.com",
    "rest_server": "https://api-cosmoshub.pupmos.network",
    "latest_block_height": 16933886,
    "upgrade_found": true,
    "upgrade_name": "v12",
    "source": "current_upgrade_plan",
    "upgrade_block_height": 16985500,
    "estimated_upgrade_time": "2023-09-13T12:11:01.108037",
    "upgrade_plan": {
      "height": "16985500",
      "binaries": {
        "darwin/amd64": "https://github.com/cosmos/gaia/releases/download/v12.0.0/gaiad-v12.0.0-darwin-amd64?checksum=sha256:1b76a7b2ee9bd739cd28de6e380248f276c678d8f9cab1fc2fe17fce07389693",
        "darwin/arm64": "https://github.com/cosmos/gaia/releases/download/v12.0.0/gaiad-v12.0.0-darwin-arm64?checksum=sha256:20e81d813f942ed3114c6953016b9e24f0946b08e34f0da9c13bcb7276719130",
        "linux/amd64": "https://github.com/cosmos/gaia/releases/download/v12.0.0/gaiad-v12.0.0-linux-amd64?checksum=sha256:d67e91bda37c94f2efacba0f97bcbdb8931e9dbc457d1ce3f1e60a71d1b1b7dd",
        "linux/arm64": "https://github.com/cosmos/gaia/releases/download/v12.0.0/gaiad-v12.0.0-linux-arm64?checksum=sha256:aee279a6aedf8e83e59487c2006e72e496f73c36a882c44b3cc20969c3d237fb",
        "windows/amd64": "https://github.com/cosmos/gaia/releases/download/v12.0.0/gaiad-v12.0.0-windows-amd64.exe?checksum=sha256:7d970cd3f138b5ce8fe78a8209a5907fcfec6fb717434244010381cdd6b4cd32",
        "windows/arm64": "https://github.com/cosmos/gaia/releases/download/v12.0.0/gaiad-v12.0.0-windows-arm64.exe?checksum=sha256:b54c9c7e1c7bb36fc78cac294d86f8836e2dc02d747abc84d68062615a0512df"
      },
      "name": "v12",
      "time": null,
      "upgraded_client_state": null
    },
    "version": "v12.0.0",
    "error": null
  },
  {
    "type": "mainnet",
    "network": "umee",
    "rpc_server": "https://rpc-umee.cosmos-spaces.cloud",
    "rest_server": "https://umee-mainnet-lcd.autostake.com:443",
    "latest_block_height": 8268791,
    "upgrade_found": false,
    "upgrade_name": "",
    "source": "",
    "upgrade_block_height": null,
    "estimated_upgrade_time": null,
    "upgrade_plan": null,
    "version": "",
    "error": null
  }
]