SNS aggregator release

,

The GIX team will be submitting an upgrade proposal for the SNS aggregator today.

Update: The proposal is number 124250

Context: What is the SNS aggregator?

The aggregator collects information on all deployed SNS and re-publishes aggregate values as certified query calls. This data is intended for use by any canister that wishes to provide dashboards. The data will typically be updated about once per minute. Collecting the data from this aggregator will typically be much faster than collecting the same data directly from the SNSs.

Change Log

  • Ensure that the last paginated entry is incomplete, as requested by the nns-dapp front end developers.
  • Update the index.html when it has changed.

Preview

The release candidate can be previewed here: https://otgyv-wyaaa-aaaak-qcgba-cai.icp0.io/

6 Likes

What does “lifecycle” refer to in the returned json? How do I interpret values 2,3,4,5?

There you go: nns-dapp/rs/sns_aggregator/src/index.html at 79073e9ed9958509e3d3ede90bfffd9481b539cb · dfinity/nns-dapp · GitHub

 const lifecycleText = (lifeCycle) => {
        switch (lifeCycle) {
          case 1:
            return "Pending";
          case 2:
            return "Open";
          case 3:
            return "Committed";
          case 4:
            return "Aborted";
          case 5:
            return "Adopted";
          default:
            return "Unspecified";
        }
      };

PS.: The above switch renders the badges on the landing page of the aggregator

The lifecycle values are defined here:
ic/rs/sns/swap/src/gen/ic_sns_swap.pb.v1.rs at master · dfinity/ic · GitHub (link changed to the specific line of code)

#[repr(i32)]
pub enum Lifecycle {
    /// The canister is incorrectly configured. Not a real lifecycle state.
    Unspecified = 0,
    ...

As far as I know they are not provided in a .did file anywhere. The NNS team has however generally been very helpful when it comes to adding such information to .did files on request. We should probably ask them kindly to do so, please! :slight_smile: