This subgraph schema defines the entities and fields used in Grateful system.
Profile is an entity type that represents a user profile. It has the following fields:
id: A required field of typeBytesthat serves as the unique identifier for eachProfileentity. (profileIdfrom contracts)owner: A required field of typeBytesthat represents the owner of the profile.address: A required field of typeBytesthat represents the Ethereum address associated with the profile NFT.tokenId: A required field of typeBigIntthat represents the unique identifier of a token associated with the profile.subscriptions: A required field of typeBigIntthat represents the number of subscriptions associated with the profile.subscribers: A required field of typeBigIntthat represents the number of subscribers associated with the profile.
Vault is an entity type that represents a ERC4626 vault. It has the following fields:
id: A required field of typeBytesthat serves as the unique identifier for eachVaultentity. (It is the vault name)address: A required field of typeBytesthat represents the Ethereum address associated with the vault.minRate: A required field of typeBigIntthat represents the minimum subscription rate for the vault.maxRate: A required field of typeBigIntthat represents the maximum subscription rate for the vault.paused: A required field of typeBooleanthat indicates whether the vault is currently paused.
Balance is an entity type that represents the balance of a profile within a vault. It has the following fields:
id: A required field of typeBytesthat serves as the unique identifier for eachBalanceentity.vault: A required field of typeVaultthat represents the ERC4626 vault associated with the balance.profile: A required field of typeProfilethat represents the user profile associated with the balance.amount: A required field of typeBigIntthat represents the amount of funds currently held in the balance.flow: A required field of typeBigIntthat represents the flow of funds in and out of the balance.inflow: A required field of typeBigIntthat represents the total inflow of funds into the balance.outflow: A required field of typeBigIntthat represents the total outflow of funds from the balance.lastUpdate: A required field of typeBigIntthat represents the timestamp of the last update to the balance.liquidationTime: An optional field of typeBigIntthat represents the timestamp of the liquidation time for the balance.
GratefulSubscription is an entity type that represents a subscription to a creator by a giver. It has the following fields:
id: A required field of typeIDthat serves as the unique identifier for eachGratefulSubscriptionentity. (The token ID from the Subscription NFT)giver: A required field of typeProfilethat represents the user profile of the giver.creator: A required field of typeProfilethat represents the user profile of the creator.vault: A required field of typeVaultthat represents the ERC4626 vault associated with the subscription.rate: A required field of typeBigIntthat represents the rate associated with the subscription.feeRate: A required field of typeBigIntthat represents the fee rate associated with the subscription.lastUpdate: A required field of typeBigIntthat represents the timestamp of the last update to the subscription.