Comment on page
📎
GraphQL API
Fetch the list of proposals
Parameters:
- status : string
- active : string
- type : string
- orderBy : string
- orderDirection : asc or desc
- memberAddress : address
Query:
proposals(status: $status?, active: $active?, type: type?, orderBy: $orderBy?, orderDirection: $orderDirection?) {
id
status
active
type
title
link
timeRemaining
submittedAt
submittedBy
votingPeriodEndingAt
gracePeriodEndingAt
approvedToProcessAt
rejectedToProcessAt
approvedAt
rejectedAt
majority
quorum
memberDidVote (memberAddress: $memberAddress?)
memberCanVote (memberAddress: $memberAddress?)
yesVoters
noVoters
sumYesVotes
sumNoVotes
currentMajority
currentQuorum
applicantAdress
shares
loots
tributeOffered
tributeAddress
tokenAddress
tokenName
memberAddress
paymentRequested
paymentAddress
}
Item | Content |
---|---|
id | (Int) Read |
status | |
active | (Boolean) True if status is Voting Period OR Grace Period OR Approved - ready to process OR Rejected - ready to process.False if status is Approved OR Rejected |
type | (String) Read |
title | (String) Read |
link | (String) Read |
timeRemaining | (Date) If status is "Voting period" votingPeriodEndingAt - now(), If status is "Grace period" gracePeriodEndingAt - now() |
submittedAt | (Date) Read |
submittedBy | (Address) Read |
votingPeriodEndingAt | (Date) Read |
gracePeriodEndingAt | (Date) Read |
approvedToProcessAt | (Date) Read |
rejectedToProcessAt | (Date) Read |
approvedAt | (Date) Read |
rejectedAt | (Date) Read |
majority | (Int) Read |
quorum | (Int) Read |
memberCanVote | |
memberDidVote | (Boolean) the member has voted/has not voted |
sumYesVotes | (Int) Sum of yes votes |
sumNoVotes | (Int) Sum of no votes |
yesVoters | (List of Addresses) Read |
noVoters | (List of Addresses) Read |
currentMajority | |
currentQuorum | |
applicantAdress | (Address) Read (only for Onboard proposal) |
shares | (Int) Read (only for Onboard proposal) |
loots | (Int) Read (only for Onboard proposal) |
tributeOffered | (Int) Read (only for Onboard proposal or OTC Swap proposal) |
tributeAddress | (Address) Read (only for Onboard proposal or OTC Swap proposal) |
tokenAddress | (Address) Read (only for Whitelist proposal or Unwhitelist proposal) |
tokenName | (String) Read (only for Whitelist proposal or Unwhitelist proposal) |
memberAddress | (Address) Read (only for Guildkick proposal) |
paymentRequested | (Int) Read (only for OTC Swap proposal) |
paymentAddress | (Address) Read (only for OTC Swap proposal) |
Fetch a single proposal
Parameters:
- id : int
Query:
proposals(id: $id?) {
id
status
active
type
title
link
timeRemaining
submittedAt
submittedBy
votingPeriodEndingAt
gracePeriodEndingAt
approvedToProcessAt
rejectedToProcessAt
approvedAt
rejectedAt
majority
quorum
yesVoters
noVoters
sumYesVotes
sumNoVotes
currentMajority
currentQuorum
applicantAdress
shares
loots
tributeOffered
tributeAddress
tokenAddress
tokenName
memberAddress
paymentRequested
paymentAddress
}
Item | Content |
---|---|
proposalId | (Int) Read |
memberId | (Int) Read |
status | |
active | (Boolean) True if status is Voting Period OR Grace Period OR Approved - ready to process OR Rejected - ready to process.False if status is Approved OR Rejected |
type | (String) Read |
title | (String) Read |
link | (String) Read |
timeRemaining | (Date) If status is "Voting period" votingPeriodEndingAt - now(), If status is "Grace period" gracePeriodEndingAt - now() |
submittedAt | (Date) Read |
submittedBy | (Address) Read |
votingPeriodEndingAt | (Date) Read |
gracePeriodEndingAt | (Date) Read |
approvedToProcessAt | (Date) Read |
rejectedToProcessAt | (Date) Read |
approvedAt | (Date) Read |
rejectedAt | (Date) Read |
majority | (Int) Read |
quorum | (Int) Read |
sumYesVotes | (Int) Sum of yes votes |
sumNoVotes | (Int) Sum of no votes |
yesVoters | (List of Addresses) Read |
noVoters | (List of Addresses) Read |
currentMajority | |
currentQuorum | |
applicantAdress | (Address) Read (only for Onboard proposal) |
shares | (Int) Read (only for Onboard proposal) |
loots | (Int) Read (only for Onboard proposal) |
tributeOffered | (Int) Read (only for Onboard proposal or OTC Swap proposal) |
tributeAddress | (Address) Read (only for Onboard proposal or OTC Swap proposal) |
tokenAddress | (Address) Read (only for Whitelist proposal or Unwhitelist proposal) |
tokenName | (String) Read (only for Whitelist proposal or Unwhitelist proposal) |
memberAddress | (Address) Read (only for Guildkick proposal) |
paymentRequested | (Int) Read (only for OTC Swap proposal) |
paymentAddress | (Address) Read (only for OTC Swap proposal) |
Fetch the list of members
Parameters:
none
Query:
members {
address
roles
}
Item | Content |
---|---|
address | (Address) Read |
roles | (List of strings) Read |
Fetch the total number of shares & loots
Parameters:
none
Query:
bank {
totalShares
totalLoots
}
Item | Content |
---|---|
totalShares | (Int) Sum of member's Shares |
totalLoots | (Int) Sum of member's Loots |
Fetch the token balances in the Treasury
Parameters:
none
Query:
bank {
balances {
name
amount
price
value
}
}
Item | Content |
---|---|
name | (String) Read |
amount | (Int) Read |
price | (Float) Fetched by external API |
value | (Float) amount * price |
Fetch the whitelisted tokens in the Treasury
Parameters:
none
Query:
whitelistedTokens {
{
name
address
Item | Content |
---|---|
name | (String) Read |
address | (Address) Whitelisted addresses - unWhitelisted Addresses |
Fetch the token balances of a single member
Parameters:
address : address
Query:
member(address: $address) {
balances {
name
amount
price
value
}
}
Item | Content |
---|---|
name | (String) Read |
amount | (Int) Read |
price | (Float) fetched by external API |
value | (Float) amount * price |
Fetch information on a single member
Parameters:
address : address
Query:
member(address: $address) {
address
roles
delegateAddress
shares
loots
percentageOfTreasury
votingWeight
onboardedAt
exitedAt
jailedAt
}
Item | Content |
---|---|
address | (Address) Read |
roles | (List of strings) Read |
delegateAddress | (Address) Read |
shares | (Int) Read |
loots | (Int) Read |
percentageOfTreasury | (Float) (shares + loots) / (totalShares + totalLoots) |
votingWeight | (Float) shares / totalShares |
onboardedAt | (Date) Read |
exitedAt | (Date) Read |
jailedAt | (Date) Read |