-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
90 lines (69 loc) · 3.23 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Enum for Marketplaces that the CryptoCoven contract interacted with(likely a Trade)
enum Marketplace {
OpenSeaV1 # Represents when a CryptoCoven NFT is traded on the marketplace
OpenSeaV2 # Represents when a CryptoCoven NFT is traded on the OpenSeaV2 marketplace
SeaPort # Represents when a CryptoCoven NFT is traded on the SeaPort marketplace
LooksRare # Represents when a CryptoCoven NFT is traded on the LookRare marketplace
OxProtocol # Represents when a CryptoCoven NFT is traded on the OxProtocol marketplace
OxProtocolV2 # Represents when a CryptoCoven NFT is traded on the OxProtocol marketplace
Blur # Represents when a CryptoCoven NFT is traded on the Blur marketplace
Rarible # Represents when a CryptoCoven NFT is traded on the Rarible marketplace
X2Y2 # Represents when a CryptoCoven NFT is traded on the X2Y2 marketplace
NFTX # Represents when a CryptoCoven NFT is traded on the NFTX marketplace
GenieSwap # Represents when a CryptoCoven NFT is traded on the NFTX marketplace
CryptoCoven # Represents when a CryptoCoven NFT is transferred from the crypto coven contract.
Unknown # Represents when a CryptoCoven NFT is transferred from an unknown marketplace likely not a sale event
}
# Account entity representing a user account
type Account @entity {
"Unique identifier for the account, typically the address"
id: ID!
"Array of CryptoCoven transfers sent by the account"
sent: [CovenTransfer!]! @derivedFrom(field: "from")
"Array of CryptoCoven transfers received by the account"
received: [CovenTransfer!]! @derivedFrom(field: "to")
"Total value of tokens purchased by the account for Covens"
totalSpent: BigInt!
"Number of coven transfer events sent by the account"
sendCount: BigInt!
"Number of coven transfer events received by the account"
receiveCount: BigInt!
"Count of unique NFTs owned by the account"
nftCount: BigInt!
"Field to track thenumber of unique marketplaces interacted with"
uniqueMarketplacesCount: BigInt!
"Array of marketplace interactions for the account"
marketplaces: [MarketplaceInteraction!]! @derivedFrom(field: "account")
"Hash of the transaction"
txHash: Bytes!
}
# Transfer entity representing the transfer of the CryptoCoven NFT
type CovenTransfer @entity {
"Unique identifier for the transfer event"
id: ID!
"Reference to the Account entity sending the Coven NFT"
from: Account!
"Reference to the Account entity receiving the Coven NFT"
to: Account!
"The unique token ID for the CryptoCoven NFT"
tokenId: BigInt!
"The marketplace the nft contract interacted with, likely a trade or mint"
marketplace: Marketplace!
"The transaction value, if applicable"
value: BigInt!
"Index of the log within the transaction for tracking"
logIndex: BigInt!
"Hash of the transaction"
txHash: Bytes!
}
# "Entity to track the number of unique marketplaces Accounts interacted with
type MarketplaceInteraction @entity {
"This can be a combination of account ID and marketplace ID"
id: ID! # This can be a combination of account ID and marketplace ID
"Relationship to the Account"
account: Account!
"The name of the marketplace"
marketplace: String!
"The count of transactions the account has on this marketplace"
transactionCount: BigInt!
}