@@ -7,21 +7,21 @@ enum TransferType {
77type Transfer @index (fields : ["token" , ["blockTimestamp" , " DESC" ]]) {
88 id : ID ! # ${chainId}_${token}_${blockNumber}_${logIndex}
99 chainId : Int !
10- token : String ! @index
10+ token : String !
1111 blockNumber : Int !
1212 blockTimestamp : Int !
1313 logIndex : Int !
1414 txHash : String ! @index
15- from : String ! @index
16- to : String ! @index
15+ from : String !
16+ to : String !
1717 value : BigInt !
1818 transferType : TransferType !
1919}
2020
2121type Account @index (fields : ["token" , ["balance" , " DESC" ]]) {
2222 id : ID ! # ${chainId}-${token}-${address}
23- chainId : Int ! @index
24- token : String ! @index
23+ chainId : Int !
24+ token : String !
2525 address : String ! @index
2626 balance : BigInt !
2727 totalVolumeIn : BigInt !
@@ -32,25 +32,12 @@ type Account @index(fields: ["token", ["balance", "DESC"]]) {
3232 firstSeenTimestamp : Int !
3333 lastActiveBlock : Int !
3434 lastActiveTimestamp : Int !
35- approvalsGiven : [Approval ! ]! @derivedFrom (field : " owner" )
36- approvalsReceived : [Approval ! ]! @derivedFrom (field : " spender" )
37- }
38-
39- type Approval @index (fields : ["token" , " chainId" ]) {
40- id : ID ! # ${chainId}-${token}-${owner}-${spender}
41- chainId : Int ! @index
42- token : String ! @index
43- amount : BigInt !
44- owner : Account !
45- spender : Account !
46- lastUpdatedBlock : Int !
47- lastUpdatedTimestamp : Int !
4835}
4936
5037type TokenSupply @index (fields : ["chainId" , " token" ]) {
5138 id : ID ! # ${chainId}-${token}-supply
5239 chainId : Int !
53- token : String ! @index
40+ token : String !
5441 totalSupply : BigInt !
5542 totalMinted : BigInt !
5643 totalBurned : BigInt !
@@ -65,9 +52,9 @@ type TokenSupply @index(fields: ["chainId", "token"]) {
6552
6653type HourlySnapshot @index (fields : ["token" , ["hourId" , " DESC" ]]) {
6754 id : ID ! # ${chainId}-${token}-${hourId}
68- chainId : Int ! @index
69- token : String ! @index
70- hourId : Int ! @index
55+ chainId : Int !
56+ token : String !
57+ hourId : Int !
7158 hourStartTimestamp : Int !
7259 volume : BigInt !
7360 transferCount : Int !
@@ -83,9 +70,9 @@ type HourlySnapshot @index(fields: ["token", ["hourId", "DESC"]]) {
8370
8471type DailySnapshot @index (fields : ["token" , ["dayId" , " DESC" ]]) {
8572 id : ID ! # ${chainId}-${token}-${dayId}
86- chainId : Int ! @index
87- token : String ! @index
88- dayId : Int ! @index
73+ chainId : Int !
74+ token : String !
75+ dayId : Int !
8976 dayStartTimestamp : Int !
9077 dailyVolume : BigInt !
9178 dailyTransferCount : Int !
@@ -104,9 +91,9 @@ type DailySnapshot @index(fields: ["token", ["dayId", "DESC"]]) {
10491
10592type WeeklySnapshot @index (fields : ["token" , ["weekId" , " DESC" ]]) {
10693 id : ID ! # ${chainId}-${token}-${weekId}
107- chainId : Int ! @index
108- token : String ! @index
109- weekId : Int ! @index
94+ chainId : Int !
95+ token : String !
96+ weekId : Int !
11097 weekStartTimestamp : Int !
11198 weeklyVolume : BigInt !
11299 weeklyTransferCount : Int !
@@ -124,8 +111,8 @@ type WeeklySnapshot @index(fields: ["token", ["weekId", "DESC"]]) {
124111
125112type CrossTokenDailySnapshot @index (fields : ["chainId" , ["dayId" , " DESC" ]]) {
126113 id : ID ! # ${chainId}-${dayId}
127- chainId : Int ! @index
128- dayId : Int ! @index
114+ chainId : Int !
115+ dayId : Int !
129116 dayStartTimestamp : Int !
130117 totalVolume : BigInt !
131118 totalTransferCount : Int !
@@ -137,21 +124,21 @@ type CrossTokenDailySnapshot @index(fields: ["chainId", ["dayId", "DESC"]]) {
137124type AccountBalanceSnapshot @index (fields : ["account" , " token" , ["blockTimestamp" , " DESC" ]]) {
138125 id : ID ! # ${chainId}-${token}-${address}-${blockNumber}-${logIndex}
139126 chainId : Int !
140- token : String ! @index
141- account : String ! @index
127+ token : String !
128+ account : String !
142129 blockNumber : Int !
143- blockTimestamp : Int ! @index
130+ blockTimestamp : Int !
144131 balance : BigInt !
145132 balanceChange : BigInt !
146133 txHash : String !
147134}
148135
149136type AccountDailyActivity @index (fields : ["account" , " token" , ["dayId" , " DESC" ]]) {
150137 id : ID ! # ${chainId}-${token}-${address}-${dayId}
151- chainId : Int ! @index
152- token : String ! @index
153- account : String ! @index
154- dayId : Int ! @index
138+ chainId : Int !
139+ token : String !
140+ account : String !
141+ dayId : Int !
155142 transferCount : Int !
156143 volumeIn : BigInt !
157144 volumeOut : BigInt !
0 commit comments