📎GraphQL API

Proposals

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
    }
ItemContent

id

(Int) Read

status

(String) See Proposals

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

(Boolean) the role of the member allows him/her to vote AND he/she has voting weight

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

(Float) See Proposals

currentQuorum

(Float) See Proposals

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)

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
    }
ItemContent

proposalId

(Int) Read

memberId

(Int) Read

status

(String) See Proposals

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

(Float) See Proposals

currentQuorum

(Float) See Proposals

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)

Members

Fetch the list of members

Parameters:

none

Query:

members {
    address
    roles
}
ItemContent

address

(Address) Read

roles

(List of strings) Read

Shares

Fetch the total number of shares & loots

Parameters:

none

Query:

bank {
    totalShares
    totalLoots
  }
ItemContent

totalShares

(Int) Sum of member's Shares

totalLoots

(Int) Sum of member's Loots

Balances

Fetch the token balances in the Treasury

Parameters:

none

Query:

bank {
balances {
    name
    amount
    price
    value
  }
}
ItemContent

name

(String) Read

amount

(Int) Read

price

(Float) Fetched by external API

value

(Float) amount * price

Whitelisted Tokens

Fetch the whitelisted tokens in the Treasury

Parameters:

none

Query:

whitelistedTokens {
  {
    name
    address
 
ItemContent

name

(String) Read

address

(Address) Whitelisted addresses - unWhitelisted Addresses

Member balances

Fetch the token balances of a single member

Parameters:

address : address

Query:

member(address: $address) {
  balances {
     name
     amount
     price
     value
  }
}
ItemContent

name

(String) Read

amount

(Int) Read

price

(Float) fetched by external API

value

(Float) amount * price

Member infos

Fetch information on a single member

Parameters:

address : address

Query:

member(address: $address) {
    address
    roles
    delegateAddress
    shares
    loots
    percentageOfTreasury
    votingWeight
    onboardedAt
    exitedAt
    jailedAt
}
ItemContent

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

Last updated