|
1 | 1 | type PoolFactory @entity {
|
2 |
| - id: ID! |
| 2 | + id: ID! |
| 3 | + |
| 4 | + totalValueLocked: BigDecimal # total value from all pools expressed in OCEAN |
| 5 | + |
| 6 | + totalOceanLiquidity: BigDecimal! # Total of OCEAN liquidity from all pools |
| 7 | + totalSwapVolume: BigDecimal! # All the swap volume in Ocean |
| 8 | + totalSwapFee: BigDecimal! # All the swap fee in Ocean |
| 9 | + totalOrderVolume: BigDecimal |
3 | 10 |
|
4 |
| - totalValueLocked: BigDecimal # total value from all pools expressed in OCEAN |
5 |
| - totalOceanLiquidity: BigDecimal! # Total of OCEAN liquidity from all pools |
6 |
| - totalSwapVolume: BigDecimal! # All the swap volume in Ocean |
7 |
| - totalSwapFee: BigDecimal! # All the swap fee in Ocean |
8 |
| - poolCount: Int! # Number of pools |
9 |
| - finalizedPoolCount: Int! # Number of finalized pools |
10 |
| - pools: [Pool!] @derivedFrom(field: "factoryID") |
| 11 | + poolCount: Int! # Number of pools |
| 12 | + finalizedPoolCount: Int! # Number of finalized pools |
| 13 | + orderCount: BigInt # Number of total consumes |
| 14 | + pools: [Pool!] @derivedFrom(field: "factoryID") |
11 | 15 | }
|
12 | 16 |
|
13 |
| -type Pool @entity { |
14 |
| - id: ID! # Pool address |
15 |
| - factoryID: PoolFactory! |
16 |
| - controller: Bytes! # Controller address |
17 |
| - publicSwap: Boolean! # isPublicSwap |
18 |
| - finalized: Boolean! # isFinalized |
19 |
| - symbol: String # Pool token symbol |
20 |
| - name: String # Pool token name |
21 |
| - cap: BigInt # Maximum supply if any |
22 |
| - active: Boolean! # isActive |
23 |
| - swapFee: BigDecimal! # Swap Fees |
24 |
| - totalWeight: BigDecimal! |
25 |
| - totalShares: BigDecimal! # Total pool token shares |
26 |
| - totalSwapVolume: BigDecimal! # Total swap volume in OCEAN |
27 |
| - totalSwapFee: BigDecimal! # Total swap fee in OCEAN |
28 |
| - valueLocked: BigDecimal! # value locked in pool expressed in OCEAN (captures both Ocean and Datatoken) |
29 |
| - datatokenReserve: BigDecimal! # Total pool reserve of Datatoken |
30 |
| - oceanReserve: BigDecimal! # Total pool reserve of OCEAN |
31 |
| - spotPrice: BigDecimal! |
32 |
| - consumePrice: BigDecimal! |
| 17 | +type Global @entity { |
| 18 | + id: ID! |
| 19 | + totalValueLocked: BigDecimal # total value from all pools expressed in OCEAN |
| 20 | + totalOceanLiquidity: BigDecimal! # Total of OCEAN liquidity from all pools |
| 21 | + totalSwapVolume: BigDecimal! # All the swap volume in Ocean |
| 22 | + totalOrderVolume: BigDecimal |
| 23 | + orderCount: BigInt |
| 24 | + poolCount: Int! |
| 25 | +} |
33 | 26 |
|
34 |
| - tokenCount: BigInt! # Number of tokens in the pool |
35 |
| - holderCount: BigInt! # Number of addresses holding a positive balance of pool shares |
36 |
| - joinCount: BigInt! # liquidity has been added |
37 |
| - exitCount: BigInt! # liquidity has been removed |
38 |
| - swapCount: BigInt! |
39 |
| - transactionCount: BigInt! # Number of transactions in this pool involving liquidity changes |
40 |
| - datatokenAddress: String! |
41 |
| - createTime: Int! # Block time pool was created |
42 |
| - tx: Bytes # Pool creation transaction id |
43 |
| - tokens: [PoolToken!] @derivedFrom(field: "poolId") |
44 |
| - shares: [PoolShare!] @derivedFrom(field: "poolId") |
45 |
| - transactions: [PoolTransaction!] @derivedFrom(field: "poolAddress") |
46 |
| - transactionsTokenValues: [PoolTransactionTokenValues!] |
47 |
| - @derivedFrom(field: "poolAddress") |
| 27 | +type Pool @entity { |
| 28 | + id: ID! # Pool address |
| 29 | + factoryID: PoolFactory! |
| 30 | + controller: Bytes! # Controller address |
| 31 | + publicSwap: Boolean! # isPublicSwap |
| 32 | + finalized: Boolean! # isFinalized |
| 33 | + symbol: String # Pool token symbol |
| 34 | + name: String # Pool token name |
| 35 | + cap: BigInt # Maximum supply if any |
| 36 | + active: Boolean! # isActive |
| 37 | + swapFee: BigDecimal! # Swap Fees |
| 38 | + |
| 39 | + totalWeight: BigDecimal! |
| 40 | + totalShares: BigDecimal! # Total pool token shares |
| 41 | + totalSwapVolume: BigDecimal! # Total swap volume in OCEAN |
| 42 | + totalSwapFee: BigDecimal! # Total swap fee in OCEAN |
| 43 | + |
| 44 | + valueLocked: BigDecimal! # value locked in pool expressed in OCEAN (captures both Ocean and Datatoken) |
| 45 | + datatokenReserve: BigDecimal! # Total pool reserve of Datatoken |
| 46 | + oceanReserve: BigDecimal! # Total pool reserve of OCEAN |
| 47 | + spotPrice: BigDecimal! |
| 48 | + consumePrice: BigDecimal! |
| 49 | + |
| 50 | + tokenCount: BigInt! # Number of tokens in the pool |
| 51 | + holderCount: BigInt! # Number of addresses holding a positive balance of pool shares |
| 52 | + joinCount: BigInt! # liquidity has been added |
| 53 | + exitCount: BigInt! # liquidity has been removed |
| 54 | + swapCount: BigInt! |
| 55 | + transactionCount: BigInt! # Number of transactions in this pool involving liquidity changes |
| 56 | + |
| 57 | + datatokenAddress: String! |
| 58 | + createTime: Int! # Block time pool was created |
| 59 | + tx: Bytes # Pool creation transaction id |
| 60 | + |
| 61 | + tokens: [PoolToken!] @derivedFrom(field: "poolId") |
| 62 | + shares: [PoolShare!] @derivedFrom(field: "poolId") |
| 63 | + transactions: [PoolTransaction!] @derivedFrom(field: "poolAddress") |
| 64 | + transactionsTokenValues: [PoolTransactionTokenValues!] @derivedFrom(field: "poolAddress") |
48 | 65 | }
|
49 | 66 |
|
50 | 67 |
|
@@ -118,27 +135,29 @@ type DatatokenFactory @entity {
|
118 | 135 | }
|
119 | 136 |
|
120 | 137 | type Datatoken @entity {
|
121 |
| - id: ID! # token address |
122 |
| - factoryID: DatatokenFactory! |
123 |
| - |
124 |
| - symbol: String |
125 |
| - name: String |
126 |
| - decimals: Int! |
127 |
| - address: String! |
128 |
| - cap: BigDecimal! |
129 |
| - supply: BigDecimal! |
130 |
| - minter: User! |
131 |
| - publisher: String! |
132 |
| - |
133 |
| - holderCount: BigInt! # Number of addresses holding a balance of datatoken |
134 |
| - orderCount: BigInt! # Number of orders executed for this dataset |
135 |
| - metadataUpdateCount: BigInt! |
136 |
| - |
137 |
| - createTime: Int! # Block time datatoken was created |
138 |
| - tx: Bytes # Datatoken creation transaction id |
139 |
| - balances: [TokenBalance!] @derivedFrom(field: "datatokenId") |
140 |
| - orders: [TokenOrder!] @derivedFrom(field: "datatokenId") |
141 |
| - updates: [MetadataUpdate!] @derivedFrom(field: "datatokenId") # list of MetadataUpdate objects |
| 138 | + id: ID! # token address |
| 139 | + factoryID: DatatokenFactory! |
| 140 | + |
| 141 | + symbol: String |
| 142 | + name: String |
| 143 | + decimals: Int! |
| 144 | + address: String! |
| 145 | + cap: BigDecimal! |
| 146 | + supply: BigDecimal! |
| 147 | + minter: User! |
| 148 | + publisher: String! |
| 149 | + |
| 150 | + holderCount: BigInt! # Number of addresses holding a balance of datatoken |
| 151 | + orderCount: BigInt! # Number of orders executed for this dataset |
| 152 | + metadataUpdateCount: BigInt! |
| 153 | + |
| 154 | + orderVolume: BigDecimal |
| 155 | + createTime: Int! # Block time datatoken was created |
| 156 | + tx: Bytes # Datatoken creation transaction id |
| 157 | + |
| 158 | + balances: [TokenBalance!] @derivedFrom(field: "datatokenId") |
| 159 | + orders: [TokenOrder!] @derivedFrom(field: "datatokenId") |
| 160 | + updates: [MetadataUpdate!] @derivedFrom(field: "datatokenId") # list of MetadataUpdate objects |
142 | 161 | }
|
143 | 162 |
|
144 | 163 | type MetadataUpdate @entity {
|
|
0 commit comments