Skip to content

Commit

Permalink
Add has_script field to proposal_votes
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed Aug 24, 2024
1 parent 41bcff5 commit ce60276
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 20 deletions.
2 changes: 2 additions & 0 deletions files/grest/rpc/governance/proposal_votes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CREATE OR REPLACE FUNCTION grest.proposal_votes(_proposal_tx_hash text, _proposa
RETURNS TABLE (
block_time integer,
voter_role text,
has_script boolean,
voter text,
voter_hex text,
vote text,
Expand All @@ -16,6 +17,7 @@ AS $$
distinct on (COALESCE(ENCODE(ch.raw, 'hex'), dh.view, ph.view))
EXTRACT(EPOCH FROM vote_block.time)::integer AS block_time,
vp.voter_role,
COALESCE(dh.has_script, COALESCE(ch.has_script), false) AS has_script,
COALESCE(ENCODE(ch.raw, 'hex'), dh.view, ph.view) as voter,
COALESCE(ENCODE(ch.raw, 'hex'), ENCODE(dh.raw, 'hex'), ENCODE(ph.hash_raw, 'hex')) as voter_hex,
vp.vote,
Expand Down
10 changes: 6 additions & 4 deletions specs/results/koiosapi-guild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.2.0a
version: v1.2.0b
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 Expand Up @@ -5151,7 +5151,7 @@ components:
example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0
has_script:
type: boolean
description: Flag which shows if this DRep credentials are a script hash
description: Flag which shows if this credential is a script hash
example: false
registered:
type: boolean
Expand Down Expand Up @@ -5449,6 +5449,8 @@ components:
description: The role of the voter
enum: ["ConstitutionalCommittee", "DRep", "SPO"]
example: DRep
has_script:
$ref: "#/components/schemas/drep_info/items/properties/has_script"
voter:
type: string
description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format)
Expand Down Expand Up @@ -5494,7 +5496,7 @@ components:
example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf
cc_cold_has_script:
type: boolean
description: Flag which shows if this committee member cold credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
cc_hot_hex:
type:
Expand All @@ -5506,7 +5508,7 @@ components:
type:
- boolean
- 'null'
description: Flag which shows if this committee member hot credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
expiration_epoch:
type: number
Expand Down
10 changes: 6 additions & 4 deletions specs/results/koiosapi-mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.2.0a
version: v1.2.0b
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 Expand Up @@ -5151,7 +5151,7 @@ components:
example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0
has_script:
type: boolean
description: Flag which shows if this DRep credentials are a script hash
description: Flag which shows if this credential is a script hash
example: false
registered:
type: boolean
Expand Down Expand Up @@ -5449,6 +5449,8 @@ components:
description: The role of the voter
enum: ["ConstitutionalCommittee", "DRep", "SPO"]
example: DRep
has_script:
$ref: "#/components/schemas/drep_info/items/properties/has_script"
voter:
type: string
description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format)
Expand Down Expand Up @@ -5494,7 +5496,7 @@ components:
example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf
cc_cold_has_script:
type: boolean
description: Flag which shows if this committee member cold credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
cc_hot_hex:
type:
Expand All @@ -5506,7 +5508,7 @@ components:
type:
- boolean
- 'null'
description: Flag which shows if this committee member hot credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
expiration_epoch:
type: number
Expand Down
10 changes: 6 additions & 4 deletions specs/results/koiosapi-preprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.2.0a
version: v1.2.0b
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 Expand Up @@ -5151,7 +5151,7 @@ components:
example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0
has_script:
type: boolean
description: Flag which shows if this DRep credentials are a script hash
description: Flag which shows if this credential is a script hash
example: false
registered:
type: boolean
Expand Down Expand Up @@ -5449,6 +5449,8 @@ components:
description: The role of the voter
enum: ["ConstitutionalCommittee", "DRep", "SPO"]
example: DRep
has_script:
$ref: "#/components/schemas/drep_info/items/properties/has_script"
voter:
type: string
description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format)
Expand Down Expand Up @@ -5494,7 +5496,7 @@ components:
example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf
cc_cold_has_script:
type: boolean
description: Flag which shows if this committee member cold credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
cc_hot_hex:
type:
Expand All @@ -5506,7 +5508,7 @@ components:
type:
- boolean
- 'null'
description: Flag which shows if this committee member hot credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
expiration_epoch:
type: number
Expand Down
10 changes: 6 additions & 4 deletions specs/results/koiosapi-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Creative Commons Attribution 4.0 International
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
version: v1.2.0a
version: v1.2.0b
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 Expand Up @@ -5151,7 +5151,7 @@ components:
example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0
has_script:
type: boolean
description: Flag which shows if this DRep credentials are a script hash
description: Flag which shows if this credential is a script hash
example: false
registered:
type: boolean
Expand Down Expand Up @@ -5449,6 +5449,8 @@ components:
description: The role of the voter
enum: ["ConstitutionalCommittee", "DRep", "SPO"]
example: DRep
has_script:
$ref: "#/components/schemas/drep_info/items/properties/has_script"
voter:
type: string
description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format)
Expand Down Expand Up @@ -5494,7 +5496,7 @@ components:
example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf
cc_cold_has_script:
type: boolean
description: Flag which shows if this committee member cold credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
cc_hot_hex:
type:
Expand All @@ -5506,7 +5508,7 @@ components:
type:
- boolean
- 'null'
description: Flag which shows if this committee member hot credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
expiration_epoch:
type: number
Expand Down
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.2.0a
version: v1.2.0b
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: 5 additions & 3 deletions specs/templates/4-api-schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2328,7 +2328,7 @@ schemas:
example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0
has_script:
type: boolean
description: Flag which shows if this DRep credentials are a script hash
description: Flag which shows if this credential is a script hash
example: false
registered:
type: boolean
Expand Down Expand Up @@ -2626,6 +2626,8 @@ schemas:
description: The role of the voter
enum: ["ConstitutionalCommittee", "DRep", "SPO"]
example: DRep
has_script:
$ref: "#/components/schemas/drep_info/items/properties/has_script"
voter:
type: string
description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format)
Expand Down Expand Up @@ -2671,7 +2673,7 @@ schemas:
example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf
cc_cold_has_script:
type: boolean
description: Flag which shows if this committee member cold credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
cc_hot_hex:
type:
Expand All @@ -2683,7 +2685,7 @@ schemas:
type:
- boolean
- 'null'
description: Flag which shows if this committee member hot credential is a script hash
description: Flag which shows if this credential is a script hash
example: false
expiration_epoch:
type: number
Expand Down

0 comments on commit ce60276

Please sign in to comment.