Skip to main content

Subgraph Entities

See The Graph Docs for more on defining entities.

Entities

Notes:

  • Events used for both Juicebox v1 and Juicebox v2 contracts include a cv (contracts version) property, which allows querying events for a specific contracts version.
  • project.id is string concatenated from multiple properties. projectId represents an integer id of the project.
  • Familiarize yourself with sample records of the various entities on GraphLooker.

ProtocolLog

Description: High level view of the Juicebox Protocol
Applicable Versions: v1.0, v1.1, v2

FieldTypeDescription
idID!Entity ID (currently "1")
v1ProtocolV1Log @derivedFrom(field: "log")Sub-entity for v1 logs
v2ProtocolV2Log @derivedFrom(field: "log")Sub-entity for v2 logs
projectsCountBigInt!Total Project Count for Juicebox
volumeRedeemedBigInt!Total Volume Redeemed across all projects
paymentsCountInt!Total Payment Count across all projects
redeemCountInt!Total Redeem Count across all projects
erc20CountInt!Total ERC20's deployed from JBX projects
oldestTrendingPayEventPayEvent

ProjectCreateEvent

Description: Entity detailing info about the creation of a project
Applicable Versions: v1.0, v1.1, v2

FieldTypeDescription
idID!Contract Version - Project ID - Transaction Hash
projectProject!Sub-entity linking to a project
projectIdInt!projectId expressed as integer
cvString!Contract Version of the project
timestampInt!Unix timestamp for when the project was created
txHashBytes!Transaction hash for when the project was created
callerBytes!The wallet address that created the project

Project

Description:
Applicable Versions: v1.0, v1.1, v2

FieldTypeDescription
idID!Concatenation of CV - projectId
projectIdInt!Project id as an Integer
cvString!Contract Version of the project
handleStringProject Name
metadataUriStringURI for Project Metadata
metadataDomainBigInt
terminalBytes
ownerBytes!Address that owns the project
createdAtInt!Timestamp for when the
totalPaidBigInt!Total amount paid to the project
totalRedeemedBigInt!Total amount redeemed by the project
currentBalanceBigInt!Current total balance for the project
participants[Participant!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
payEvents[PayEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
mintTokensEvents[MintTokensEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
tapEvents[TapEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
redeemEvents[RedeemEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
printReservesEvents[PrintReservesEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
distributeToPayoutModEvents[DistributeToPayoutModEvent!]!@derivedFrom(field: "project")Derived field to lead to sub-entity
distributeToTicketModEvents[DistributeToTicketModEvent!]!@derivedFrom(field: "project")Derived field to lead to sub-entity
deployedERC20s[DeployedERC20Event!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
distributePayoutsEvents[DistributePayoutsEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
distributeToPayoutSplitEvents[DistributeToPayoutSplitEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
distributeReservedTokensEvents[DistributeReservedTokensEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
distributeToReservedTokenSplitEvents[DistributeToReservedTokenSplitEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
deployedERC20Events[DeployedERC20Event!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
useAllowanceEvents[UseAllowanceEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
projectEvents[ProjectEvent!]! @derivedFrom(field: "project")Derived field to lead to sub-entity
ethErc20ProjectPayers[ETHERC20ProjectPayer!]! @derivedFrom(field: "project")Derived field to lead to sub-entity

ENSNode

Description:
Applicable Versions: v2

FieldTypeDescription
idID!
projectIdInt

Participant

Description: A users participation with a project. This is the M:M link between users:projects
Applicable Versions: v1.0, v1.1, v2

FieldTypeDescription
idID!Concatenated string of CV - projectId - walletAddress
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
cvString!Contract Version of the project
walletBytes!Wallet address
totalPaidBigInt!Total paid to the project
lastPaidTimestampInt!Time stamp for the most recent payment to the project
balanceBigInt!Balance of the ERC20 in the users wallet (staked and unstaked)
stakedBalanceBigInt!Balance of the ERC20 staked in juicebox
unstakedBalanceBigInt!Balance of the ERC20 that is not staked in juicebox

ProjectEvent

Description:
Applicable Versions: v1.0, v1.1, v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
cvString!Contract Version of the project
timestampInt!timestamp of the event
payEventPayEventSub-entity to query "project events"
mintTokensEventMintTokensEventSub-entity to query "mint tokens events"
tapEventTapEventSub-entity to query "tap events"
redeemEventRedeemEventSub-entity to query "redeem events"
printReservesEventPrintReservesEventSub-entity to query "print reserves events"
distributeToPayoutModEventDistributeToPayoutModEventSub-entity to query "distribute to payout mod events"
distributeToTicketModEventDistributeToTicketModEventSub-entity to query "distribute to ticket mod events"
deployedERC20EventDeployedERC20EventSub-entity to query "deployed ERC20 events"
projectCreateEventProjectCreateEventSub-entity to query "project creation events"
distributePayoutsEventDistributePayoutsEventSub-entity to query "distribute payout events"
distributeReservedTokensEventDistributeReservedTokensEventSub-entity to query "distribute reserved tokens events"
distributeToReservedTokenSplitEventDistributeToReservedTokenSplitEventSub-entity to query "distribute to reserved token split events"
distributeToPayoutSplitEventDistributeToPayoutSplitEventSub-entity to query "distribute to payout split events"
useAllowanceEventUseAllowanceEventSub-entity to query "allowance use events"
deployETHERC20ProjectPayerEventDeployETHERC20ProjectPayerEventSub-entity to query "deploy ETH ERC20 project payer events"

PayEvent

Description:
Applicable Versions: v1.0, v1.1, v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
cvString!Contract Version of the project
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
callerBytes!The wallet address that paid the project
beneficiaryBytes!Recipient of the funds from the pay event
amountBigInt!Amount of the pay event
noteString!Note for the pay event
feeFromV2ProjectIntIndicates payment is a fee from project with this ID

MintTokensEvent

Description:
Applicable Versions: v1.0, v1.1, v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
cvString!Contract Version of the project
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
beneficiaryBytes!Recipient of the funds from the mint event
amountBigInt!Amount of the mint event
memoString!Note for the mint event
callerBytes!The wallet address that minted tokens

RedeemEvent

Description:
Applicable Versions: v1.0, v1.1, v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
cvString!Contract Version of the project
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
holderBytes!
beneficiaryBytes!Recipient of the funds from the redeem event
amountBigInt!Amount of the redeem event
returnAmountBigInt!Note for the redeem event
callerBytes!The wallet address that initiated the redemption

DeployedERC20Event

Description:
Applicable Versions: v1.0, v1.1, v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
cvString!Contract Version of the project
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
symbolString!symbol of the ERC20
addressByteswill be empty for v1.x events

ProtocolV1Log

Description:
Applicable Versions: v1.0, v1.1

FieldTypeDescription
idID!
logProtocolLog!
projectsCountInt!Total V1.X projects
volumePaidBigInt!Total volume paid to V1.X projects
volumeRedeemedBigInt!Total volume redeemed to V1.X projects
paymentsCountInt!Total number of payments to V1.X projects
redeemCountInt!Total number of redemptions to V1.X projects
erc20CountInt!Total ERC20 deployed by V1.X projects

PrintReservesEvent

Description:
Applicable Versions: v1.0, v1.1

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
fundingCycleIdBigInt!
beneficiaryBytes!
countBigInt!
beneficiaryTicketAmountBigInt!
callerBytes!The wallet address that initiated the event
distributions[DistributeToTicketModEvent!]!@derivedFrom(field: "printReservesEvent")

DistributeToPayoutModEvent

Description:
Applicable Versions: v1.0, v1.1

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
fundingCycleIdBigInt!
modProjectIdInt!
modAllocatorBytes!
modBeneficiaryBytes!
modPreferUnstakedBoolean!
modCutBigInt!
callerBytes!The wallet address that initiated the distribution
tapEventTapEvent!Sub-entity leading to tap events

TapEvent

Description:
Applicable Versions: v1.0, v1.1

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
fundingCycleIdBigInt!
beneficiaryBytes!Recipient of the tap event
amountBigInt!Amount of the tap event
currencyBigInt!Currency address of the token in the tap event
netTransferAmountBigInt!Net amount transfered in all tap events
beneficiaryTransferAmountBigInt!Amount sent to the beneficiary
govFeeAmountBigInt!Tax amount on the tap event
callerBytes!The wallet address that initiated the tap
distributions[DistributeToPayoutModEvent!]! @derivedFrom(field: "tapEvent")

DistributeToTicketModEvent

Description:
Applicable Versions: v1.0, v1.1

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
fundingCycleIdBigInt!
modBeneficiaryBytes!
modPreferUnstakedBoolean!
modCutBigInt!
callerBytes!The wallet address that initiated the distribution
printReservesEventPrintReservesEvent!Sub-entity leading to the print reserve events

ProtocolV2Log

Description:
Applicable Versions: v2

FieldTypeDescription
idID!
logProtocolLog!
projectsCountInt!
volumePaidBigInt!Total volume paid to V2 projects
volumeRedeemedBigInt!Total volume redeemed to V2 projects
paymentsCountInt!Total number of payments to V2 projects
redeemCountInt!Total number of redemptions to V2 projects
erc20CountInt!Total ERC20's deployed by V2 projects

DistributePayoutsEvent

Description:
Applicable Versions: v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
fundingCycleConfigurationBigInt!
fundingCycleNumberInt!
beneficiaryBytes!Beneficiary of the distribution
amountBigInt!Amount of the distribution event
distributedAmountBigInt!Total amount distributed as of this event
feeBigInt!Fee on this distribution
beneficiaryDistributionAmountBigInt!Net amount sent to the beneficiary
memoString!Note on the disribution
callerBytes!The wallet address that initiated the distribution
splitDistributions[DistributeToPayoutSplitEvent!]!@derivedFrom(field: "distributePayoutsEvent")Sub-entity leading to split distributions

DistributeToPayoutSplitEvent

Description:
Applicable Versions: v2

FieldTypeDescription
id:ID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
domainBigInt!
groupBigInt!
amountBigInt!
callerBytes!The wallet address that initiated the distribution split
distributePayoutsEventDistributePayoutsEvent!
preferClaimedBoolean!
preferAddToBalanceBoolean!
percentInt!
splitProjectIdInt!
beneficiaryBytes!
lockedUntilInt!
allocatorBytes!

DistributeReservedTokensEvent

Description:
Applicable Versions: v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
fundingCycleNumberInt!
beneficiaryBytes!
tokenCountBigInt!
beneficiaryTokenCountBigInt!
memoString!
callerBytes!The wallet address that initiated the reserve distribution
splitDistributions[DistributeToReservedTokenSplitEvent!]!@derivedFrom(field"distributeReservedTokensEvent")

DistributeToReservedTokenSplitEvent

Description:
Applicable Versions: v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
tokenCountBigInt!
callerBytes!
distributeReservedTokensEventDistributeReservedTokensEvent!
preferClaimed:Boolean!Split struct properties
percentInt!Split struct properties
splitProjectIdInt!Split struct properties
beneficiaryBytes!Split struct properties
lockedUntilInt!Split struct properties
allocatorBytes!Split struct properties

UseAllowanceEvent

Description:
Applicable Versions: v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
fundingCycleConfigurationBigInt!
fundingCycleNumberInt!
beneficiaryBytes!Beneficiary of the allowance
amountBigInt!Amountof the allowance
distributedAmountBigInt!
netDistributedamountBigInt!Total amount distributed by the project
memoString!Note for the distribution
callerBytes!The wallet address that initiated the allowance

DeployETHERC20ProjectPayerEvent

Description:
Applicable Versions: v2

FieldTypeDescription
idID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
timestampInt!Timestamp of the transaction
txHashBytes!Transaction hash
addressBytes!
beneficiaryBytes!
preferClaimedTokensBoolean!
preferAddToBalanceBoolean!
directoryBytes!
ownerBytes!
memoString
metadataBytes
callerBytes!The wallet address that deployed the ERC20

ETHERC20ProjectPayer

Description:
Applicable Versions: v2

FieldTypeDescription
id:ID!
projectProject!Sub entity leading to the project
projectIdInt!Project id as an Integer
addressBytes!
beneficiaryBytes!
preferClaimedTokensBoolean!
preferAddToBalanceBoolean!
directoryBytes!
ownerBytes!
memoString
metadataBytes

VeNftToken

Description:
Applicable Versions: v2

FieldTypeDescription
idID!
tokenIdInt!Token identifier
tokenUriString!Token URI
createdAtInt!timestamp for when the token was created
redeemedAtInttimestamp for when the token was redeemed
ownerBytes!owner of the NFT
participantParticipant!
lockAmountBigInt!
lockEndInt!
lockDurationInt!
lockUseJbTokenBoolean!
lockAllowPublicExtensionBoolean!
unlockedAtInt!