Skip to content

Commit

Permalink
Revert drep_info to use null value for expires_epoch_no and deposit i…
Browse files Browse the repository at this point in the history
…f unregistered.
  • Loading branch information
Scitz0 authored and rdlrt committed Jul 30, 2024
1 parent f33b5e9 commit 00ad5da
Show file tree
Hide file tree
Showing 7 changed files with 21,613 additions and 21,593 deletions.
4 changes: 2 additions & 2 deletions files/grest/rpc/governance/drep_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ BEGIN
ENCODE(dh.raw, 'hex')::text AS hex,
dh.has_script AS has_script,
(CASE WHEN starts_with(dh.view,'drep_') OR (COALESCE(dr.deposit, 0) >= 0 AND dr.drep_hash_id IS NOT NULL) THEN TRUE ELSE FALSE END) AS registered,
(CASE WHEN (dr.deposit < 0) OR starts_with(dh.view,'drep_') THEN 0 ELSE COALESCE(ds.deposit, 0) END)::text AS deposit,
(CASE WHEN (dr.deposit < 0) OR starts_with(dh.view,'drep_') THEN NULL ELSE ds.deposit END)::text AS deposit,
(CASE WHEN starts_with(dh.view,'drep_') THEN TRUE ELSE COALESCE(dr.deposit, 0) >= 0 AND ds.active END) AS active,
(CASE WHEN COALESCE(dr.deposit, 0) >= 0 THEN COALESCE(ds.expires_epoch_no, 0) ELSE 0 END) AS expires_epoch_no,
(CASE WHEN COALESCE(dr.deposit, 0) >= 0 THEN ds.expires_epoch_no ELSE NULL END) AS expires_epoch_no,
COALESCE(dd.amount, 0)::text AS amount
FROM public.drep_hash AS dh
LEFT JOIN public.drep_registration AS dr ON dh.id = dr.drep_hash_id
Expand Down
10,798 changes: 5,401 additions & 5,397 deletions specs/results/koiosapi-guild.yaml

Large diffs are not rendered by default.

10,798 changes: 5,401 additions & 5,397 deletions specs/results/koiosapi-mainnet.yaml

Large diffs are not rendered by default.

10,798 changes: 5,401 additions & 5,397 deletions specs/results/koiosapi-preprod.yaml

Large diffs are not rendered by default.

10,798 changes: 5,401 additions & 5,397 deletions specs/results/koiosapi-preview.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion specs/templates/1-api-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.1.3
version: v1.2.0a
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down
8 changes: 6 additions & 2 deletions specs/templates/4-api-schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2273,15 +2273,19 @@ schemas:
description: Flag to show if the DRep is currently registered
example: false
deposit:
type: string
type:
- string
- null
description: DRep's registration deposit in lovelace
example: 500000000
active:
type: boolean
description: Flag to show if the DRep is (i.e. not expired)
example: true
expires_epoch_no:
type: number
type:
- number
- null
description: After which epoch DRep is considered inactive.
example: 410
amount:
Expand Down

0 comments on commit 00ad5da

Please sign in to comment.