Entities

There are two types of Entities tracked by DAOstack subgraph

  • Base Entity: Entity composed be indexing individual events emitted by multiple DAOstack core contracts
  • Domain Entity: High level complex Entity that infer information and consolidates Base Entities.

Domain Entity

Following is the list of all top level Domain Entities

DAO - id: ID!
- name: String!
- nativeToken: Token!
- nativeReputation: Rep!
- proposals: [Proposal!]
- reputationHolders: [ReputationHolder!]
- reputationHoldersCount: BigInt!
- rewards: [GPReward!]
- register: String!
- schemes: [ControllerScheme!]
- gpQueues: [GPQueue!]
- numberOfQueuedProposals: BigInt!
- numberOfPreBoostedProposals: BigInt!
- numberOfBoostedProposals: BigInt!
- numberOfExpiredInQueueProposals: BigInt!
GPQueue - id: ID!
- threshold: BigInt!
- scheme: ControllerScheme
- dao: DAO!
- votingMachine: Bytes!
Rep - id: ID!
- dao: DAO
- totalSupply: BigInt!
Token - id: ID!
- dao: DAO
- name: String!
- symbol: String!
- totalSupply: BigInt!
Proposal - id: ID!
- dao: DAO!
- proposer: Bytes!
- stage: String!
- createdAt: BigInt!
- preBoostedAt: BigInt
- boostedAt: BigInt
- quietEndingPeriodBeganAt: BigInt
- closingAt: BigInt
- executedAt: BigInt
- totalRepWhenExecuted: BigInt
- totalRepWhenCreated: BigInt
- votingMachine: Bytes!
- executionState: String!
- paramsHash: Bytes!
- organizationId: Bytes!
- confidenceThreshold: BigInt!

- descriptionHash: String!
- title: String
- description: String
- url: String
- fulltext: [String!]

- gpRewards: [GPReward!] @derivedFrom(field: "proposal")
- accountsWithUnclaimedRewards: [Bytes!]
- expiresInQueueAt: BigInt!

- votes: [ProposalVote!] @derivedFrom(field: "proposal")
- votesFor: BigInt!
- votesAgainst: BigInt!
- winningOutcome: Outcome!

- stakes: [ProposalStake!] @derivedFrom(field: "proposal")
- stakesFor: BigInt!
- stakesAgainst: BigInt!
- confidence: BigDecimal!

- gpQueue: GPQueue!

- scheme: ControllerScheme

- contributionReward: ContributionRewardProposal

- genericScheme : GenericSchemeProposal

- schemeRegistrar : SchemeRegistrarProposal

- genesisProtocolParams : GenesisProtocolParam!
Tag
ProposalStake - id: ID!
- createdAt: BigInt!
- staker: Bytes!
- proposal: Proposal!
- dao: DAO!
- outcome: Outcome!
- amount: BigInt!
ProposalVote - id: ID!
- createdAt: BigInt!
- voter: Bytes!
- proposal: Proposal!
- dao: DAO!
- outcome: Outcome!
- reputation: BigInt!
GPRewardsHelper - id: ID!
- gpRewards: [PreGPReward!]
PreGPReward - id: ID!
- beneficiary: Bytes!
GPReward - id: ID!
- createdAt: BigInt!
- dao: DAO!
- beneficiary: Bytes!
- proposal: Proposal!
- reputationForVoter: BigInt
- tokensForStaker: BigInt
- daoBountyForStaker: BigInt
- reputationForProposer: BigInt
- tokenAddress: Bytes
- # timestamps of the redeem events
- reputationForVoterRedeemedAt: BigInt!
- tokensForStakerRedeemedAt: BigInt!
- reputationForProposerRedeemedAt: BigInt!
- daoBountyForStakerRedeemedAt: BigInt!
FirstRegisterSchemeFlag - id: ID!
ContractInfo - id: ID!
- name: String!
- alias: String!
- version: String!
- address: Bytes!

Base Entity

Following is the list of base entities

Avatar

AvatarContract - id: ID!
- address: Bytes!
- name: String!
- nativeToken: Bytes!
- nativeReputation: Bytes!
- balance: BigInt!
- owner: Bytes!

ContributionReward

ContributionRewardRedeemReputation - id: ID!
- txHash: Bytes!
- contract: Bytes!
- avatar: Bytes!
- beneficiary: Bytes!
- proposalId: Bytes!
- amount: BigInt!
ContributionRewardRedeemNativeToken - id: ID!
- txHash: Bytes!
- contract: Bytes!
- avatar: Bytes!
- beneficiary: Bytes!
- proposalId: Bytes!
- amount: BigInt!
ContributionRewardRedeemExternalToken - id: ID!
- txHash: Bytes!
- contract: Bytes!
- avatar: Bytes!
- beneficiary: Bytes!
- proposalId: Bytes!
- amount: BigInt!
ContributionRewardRedeemEther - id: ID!
- txHash: Bytes!
- contract: Bytes!
- avatar: Bytes!
- beneficiary: Bytes!
- proposalId: Bytes!
- amount: BigInt!
ContributionRewardProposalResolved - id: ID!
- txHash: Bytes!
- contract: Bytes!
- avatar: Bytes!
- proposalId: Bytes!
- passed: Boolean
ContributionRewardNewContributionProposal - id: ID!
- txHash: Bytes!
- contract: Bytes!
- avatar: Bytes!
- beneficiary: Bytes!
- descriptionHash: String!
- externalToken: Bytes!
- votingMachine: Bytes!
- proposalId: Bytes!
- reputationReward: BigInt!
- nativeTokenReward: BigInt!
- ethReward: BigInt!
- externalTokenReward: BigInt!
- periods: BigInt!
- periodLength: BigInt!
ContributionRewardProposal - id: ID!
- proposalId: Bytes!
- contract: Bytes!
- avatar: Bytes!
- beneficiary: Bytes!
- descriptionHash: String!
- externalToken: Bytes!
- votingMachine: Bytes!
- reputationReward: BigInt!
- nativeTokenReward: BigInt!
- ethReward: BigInt!
- externalTokenReward: BigInt!
- periods: BigInt!
- periodLength: BigInt!
- executedAt: BigInt
- alreadyRedeemedReputationPeriods: BigInt
- alreadyRedeemedNativeTokenPeriods: BigInt
- alreadyRedeemedEthPeriods: BigInt
- alreadyRedeemedExternalTokenPeriods: BigInt

Controller

ControllerOrganization - id: ID!
- avatarAddress: Bytes!
- nativeToken: TokenContract!
- nativeReputation: ReputationContract!
- controller: Bytes!
ControllerScheme - id: ID!
- dao: DAO!
- paramsHash: Bytes!
- canRegisterSchemes: Boolean
- canManageGlobalConstraints: Boolean
- canUpgradeController: Boolean
- canDelegateCall: Boolean
- gpQueue: GPQueue
- address: Bytes!
- name: String
- version: String
- alias: String
- contributionRewardParams: ContributionRewardParam
- schemeRegistrarParams: SchemeRegistrarParam
- uGenericSchemeParams: UGenericSchemeParam
- genericSchemeParams: GenericSchemeParam
- numberOfQueuedProposals: BigInt!
- numberOfPreBoostedProposals: BigInt!
- numberOfBoostedProposals: BigInt!
- numberOfExpiredInQueueProposals: BigInt!
ControllerGlobalConstraint - id: ID!
- address: Bytes!
- paramsHash: Bytes!
- type: String!
ControllerRegisterScheme - id: ID!
- txHash: Bytes!
- controller: Bytes!
- contract: Bytes!
- scheme: Bytes!
ControllerUnregisterScheme - id: ID!
- txHash: Bytes!
- controller: Bytes!
- contract: Bytes!
- scheme: Bytes!
ControllerUpgradeController - id: ID!
- txHash: Bytes!
- controller: Bytes!
- newController: Bytes!
ControllerAddGlobalConstraint - id: ID!
- txHash: Bytes!
- controller: Bytes!
- globalConstraint: Bytes!
- paramsHash: Bytes!
- type: String!
ControllerRemoveGlobalConstraint - id: ID!
- txHash: Bytes!
- controller: Bytes!
- globalConstraint: Bytes!
- isPre: Boolean
ContributionRewardParam - id: ID!
- votingMachine : Bytes!
- voteParams: GenesisProtocolParam!
SchemeRegistrarParam - id: ID!
- votingMachine : Bytes!
- voteRegisterParams : GenesisProtocolParam!
- voteRemoveParams : GenesisProtocolParam!
UGenericSchemeParam - id: ID!
- votingMachine : Bytes!
- voteParams: GenesisProtocolParam!
- contractToCall: Bytes!
GenericSchemeParam - id: ID!
- votingMachine : Bytes!
- voteParams: GenesisProtocolParam!
- contractToCall: Bytes!
GenesisProtocolParam - id: ID!
- queuedVoteRequiredPercentage: BigInt!
- queuedVotePeriodLimit: BigInt!
- boostedVotePeriodLimit: BigInt!
- preBoostedVotePeriodLimit: BigInt!
- thresholdConst: BigInt!
- limitExponentValue: BigInt!
- quietEndingPeriod: BigInt!
- proposingRepReward: BigInt!
- votersReputationLossRatio: BigInt!
- minimumDaoBounty: BigInt!
- daoBountyConst: BigInt!
- activationTime: BigInt!
- voteOnBehalf: Bytes!
FirstRegisterScheme - id: ID!

DAORegistry

DAORegistryContract - id: ID!
- address: Bytes!
- owner: Bytes!

DAOToken

TokenContract - id: ID!
- address: Bytes!
- totalSupply: BigInt!
- owner: Bytes!
- tokenHolders: [String!]
TokenHolder - id: ID!
- contract: Bytes!
- address: Bytes!
- balance: BigInt!
Allowance - id: ID!
- token: Bytes!
- owner: Bytes!
- spender: Bytes!
- amount: BigInt!
TokenTransfer - id: ID!
- txHash: Bytes!
- contract: Bytes!
- from: Bytes!
- to: Bytes!
- value: BigInt!
TokenApproval - id: ID!
- txHash: Bytes!
- contract: Bytes!
- owner: Bytes!
- spender: Bytes!
- value: BigInt!

GenesisProtocol

GenesisProtocolProposal - id: ID!
- proposalId: Bytes!
- submittedTime: BigInt!
- proposer: Bytes!
- daoAvatarAddress: Bytes!
- numOfChoices: BigInt
- executionState: Int
- state: Int
- decision: BigInt
- executionTime: BigInt
- totalReputation: BigInt
- paramsHash: Bytes!
- address: Bytes!
GenesisProtocolVote - id: ID!
- avatarAddress: Bytes!
- voterAddress: Bytes!
- reputation: BigInt!
- voteOption: BigInt!
- proposalId: GenesisProtocolProposal!
GenesisProtocolStake - id: ID!
- avatarAddress: Bytes!
- stakerAddress: Bytes!
- prediction: BigInt!
- stakeAmount: BigInt!
- proposalId: GenesisProtocolProposal!
GenesisProtocolRedemption - id: ID!
- rewardId: GenesisProtocolReward!
- proposalId: ID!
- redeemer: Bytes!
GenesisProtocolReward - id: ID!
- type: GenesisProtocolRewardType
- amount: BigInt!
GenesisProtocolExecuteProposal - id: ID!
- txHash: Bytes!
- contract: Bytes!
- proposalId: Bytes!
- organization: Bytes!
- decision: BigInt!
- totalReputation: BigInt!
GenesisProtocolGPExecuteProposal - id: ID!
- txHash: Bytes!
- contract: Bytes!
- proposalId: Bytes!
- executionState: Int

Reputation

ReputationContract - id: ID!
- address: Bytes!
- totalSupply: BigInt!
- reputationHolders: [String!]
ReputationHolder - id: ID!
- contract: Bytes!
- address: Bytes!
- balance: BigInt!
- dao: DAO
- createdAt: BigInt!
ReputationMint - id: ID!
- txHash: Bytes!
- contract: Bytes!
- address: Bytes!
- amount: BigInt!
ReputationBurn - id: ID!
- txHash: Bytes!
- contract: Bytes!
- address: Bytes!
- amount: BigInt!

SchemeRegistrar

SchemeRegistrarNewSchemeProposal - id: ID!
- txHash: Bytes!
- contract: Bytes!
- avatar: Bytes!
- proposalId: Bytes!
- votingMachine: Bytes!
- scheme: Bytes!
- paramsHash: Bytes!
- permission: Bytes!
- descriptionHash: String!
SchemeRegistrarRemoveSchemeProposal - id: ID!
- txHash: Bytes!
- contract: Bytes!
- avatar: Bytes!
- proposalId: Bytes!
- votingMachine: Bytes!
- scheme: Bytes!
- descriptionHash: String!
SchemeRegistrarProposalExecuted - id: ID!
- txHash: Bytes!
- contract: Bytes!
- avatar: Bytes!
- proposalId: Bytes!
- decision : BigInt!
SchemeRegistrarProposal - id: ID!
- dao: DAO!
- schemeToRegister: Bytes
- schemeToRegisterParamsHash: Bytes
- schemeToRegisterPermission: Bytes
- schemeToRemove: Bytes
- decision: BigInt
- schemeRegistered: Boolean
- schemeRemoved: Boolean

UController

UControllerOrganization - id: ID!
- avatarAddress: Bytes!
- nativeToken: TokenContract!
- nativeReputation: ReputationContract!
- controller: Bytes!
UControllerGlobalConstraint - id: ID!
- avatarAddress: Bytes!
- address: Bytes!
- paramsHash: Bytes!
- type: String!
UControllerRegisterScheme - id: ID!
- txHash: Bytes!
- controller: Bytes!
- contract: Bytes!
- avatarAddress: Bytes!
- scheme: Bytes!
UControllerUnregisterScheme - id: ID! - txHash: Bytes! - controller: Bytes! - contract: Bytes! - avatarAddress: Bytes! - scheme: Bytes!
UControllerUpgradeController - id: ID!
- txHash: Bytes!
- controller: Bytes!
- avatarAddress: Bytes!
- newController: Bytes!
UControllerAddGlobalConstraint - id: ID!
- txHash: Bytes!
- controller: Bytes!
- avatarAddress: Bytes!
- globalConstraint: Bytes!
- paramsHash: Bytes!
- type: String!
UControllerRemoveGlobalConstraint - id: ID!
- txHash: Bytes!
- controller: Bytes!
- avatarAddress: Bytes!
- globalConstraint: Bytes!
- isPre: Boolean

UGenericScheme

GenericSchemeProposal - id: ID!
- dao: DAO!
- contractToCall: Bytes!
- callData: Bytes!
- value: BigInt!
- executed: Boolean!
- returnValue: Bytes