Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#This query allows to find out which address is delegating votes to which DREP at what epoch.
query Delegation_Vote (
$addr: String
$epoch: Int
) {
delegationVotes (where: {address:{_eq:$addr}
, transaction:{block:{epoch:{number:{_eq:$epoch}}}}
} ) {
address
drep {
view
}
transaction {
block {
epochNo
}

}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#Look up descriptive information about DREP based on DREP Name
query dRep_Offchain(
$drep_name: String
){
offChainVoteDrepData ( limit: 1, where:{given_name:{_eq:$drep_name}}){
motivations
objectives
qualifications

}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This query is used to find all stake addresses that are delegating to a stake pool (PoolID) at a given EpochNo
query active_delegators_to_SPO (
$poolID: StakePoolID
$epochNo: Int
) {
activeStake (
where: {
stakePoolId: {_eq: $poolID},
epoch: {number: {_eq: $epochNo} }
}
) {
address
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Calculate the total number of active stakes in a stake pool at a given epoch
query stakePool_activeStake(
$poolID: StakePoolID
$epochNo: Int
) {
activeStake_aggregate (where:{
epochNo:{_eq:$epochNo},
stakePoolId:{_eq:$poolID}})
{
aggregate {
sum {
amount
}
}
}
}
Loading