-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
29 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
SELECT encode(tx.hash, 'hex') AS "tx_hash", | ||
ga.index AS "cert_index", | ||
gap.index AS "cert_index", | ||
( | ||
LOWER( | ||
regexp_replace(type::TEXT, '(?<=.{1})([A-Z])', '_\1', 'g') | ||
) | ||
) AS "governance_type", | ||
-- type HardForkInitiation, NewCommittee, NewConstitution, InfoAction, NoConfidence, ParameterChange, TreasuryWithdrawals | ||
ga.description AS "governance_description", | ||
ga.deposit::TEXT AS "deposit", | ||
gap.description AS "governance_description", | ||
gap.deposit::TEXT AS "deposit", | ||
sa.view AS "return_address", | ||
ga.ratified_epoch AS "ratified_epoch", | ||
ga.enacted_epoch AS "enacted_epoch", | ||
ga.dropped_epoch AS "dropped_epoch", | ||
ga.expired_epoch AS "expired_epoch", | ||
ga.expiration AS "expiration", | ||
gap.ratified_epoch AS "ratified_epoch", | ||
gap.enacted_epoch AS "enacted_epoch", | ||
gap.dropped_epoch AS "dropped_epoch", | ||
gap.expired_epoch AS "expired_epoch", | ||
gap.expiration AS "expiration", | ||
va.url AS "anchor_url", | ||
encode(va.data_hash, 'hex') AS "anchor_hash" | ||
FROM governance_action ga | ||
JOIN tx ON (ga.tx_id = tx.id) | ||
JOIN stake_address sa ON (ga.return_address = sa.id) | ||
LEFT JOIN voting_anchor va ON (va.id = ga.voting_anchor_id) | ||
FROM gov_action_proposal gap | ||
JOIN tx ON (gap.tx_id = tx.id) | ||
JOIN stake_address sa ON (gap.return_address = sa.id) | ||
LEFT JOIN voting_anchor va ON (va.id = gap.voting_anchor_id) | ||
WHERE encode(tx.hash, 'hex') = $1 | ||
AND ga.index = $2 | ||
AND gap.index = $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters