mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
schema update
This commit is contained in:
parent
2e0f4b9e12
commit
bcc520f38d
@ -108,66 +108,25 @@ type Pool @entity {
|
|||||||
transactionsTokenValues: [PoolTransactionTokenValues!] @derivedFrom(field: "poolAddress")
|
transactionsTokenValues: [PoolTransactionTokenValues!] @derivedFrom(field: "poolAddress")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//PoolToken - all good as it is
|
//PoolToken - all good as it is
|
||||||
|
|
||||||
type PoolToken @entity {
|
type PoolToken @entity {
|
||||||
id: ID! # poolId + token address
|
id: ID! # poolId + token address
|
||||||
// can be on multiple pools, should remove
|
pool: Pool! #
|
||||||
poolId: Pool!
|
isDatatoken: Boolean! # if the token is a datatoken , not sure if this makes sense since it is duplicate information found on token
|
||||||
isDatatoken: Boolean!
|
token: Token!
|
||||||
address: String
|
balance: BigDecimal! # balance of the token in this pool
|
||||||
tokenId: Datatoken
|
|
||||||
tokenAddress: String
|
|
||||||
balance: BigDecimal!
|
|
||||||
denormWeight: BigDecimal!
|
denormWeight: BigDecimal!
|
||||||
symbol: String
|
symbol: String # should we keep this, it is found on token?
|
||||||
name: String
|
name: String # should we keep this, it is found on token?
|
||||||
decimals: Int
|
decimals: Int # should we keep this, it is found on token?
|
||||||
}
|
}
|
||||||
|
|
||||||
// not sure if we should keep both PoolToken and Datatoken
|
|
||||||
type Datatoken @entity {
|
|
||||||
id: ID! # token address
|
|
||||||
factoryID: DatatokenFactory!
|
|
||||||
|
|
||||||
symbol: String
|
|
||||||
name: String
|
|
||||||
decimals: Int!
|
|
||||||
address: String!
|
|
||||||
cap: BigDecimal!
|
|
||||||
supply: BigDecimal!
|
|
||||||
minter: String!
|
|
||||||
publisher: String!
|
|
||||||
|
|
||||||
// do we care about this?
|
|
||||||
holderCount: BigInt! # Number of addresses holding a balance of datatoken
|
|
||||||
orderCount: BigInt! # Number of orders executed for this dataset
|
|
||||||
|
|
||||||
// remove, doesn't make any sense, especially in v4
|
|
||||||
metadataUpdateCount: BigInt!
|
|
||||||
|
|
||||||
// array
|
|
||||||
orderVolume: BigDecimal
|
|
||||||
createTime: Int! # Block time datatoken was created
|
|
||||||
tx: Bytes # Datatoken creation transaction id
|
|
||||||
|
|
||||||
balances: [TokenBalance!] @derivedFrom(field: "datatokenId")
|
|
||||||
orders: [TokenOrder!] @derivedFrom(field: "datatokenId")
|
|
||||||
updates: [MetadataUpdate!] @derivedFrom(field: "datatokenId") # list of MetadataUpdate objects
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we have 2 ,we can check if union works
|
|
||||||
union Token = PoolToken | Datatoken
|
|
||||||
|
|
||||||
|
|
||||||
type PoolShare @entity {
|
type PoolShare @entity {
|
||||||
id: ID! # poolId + userAddress
|
id: ID! # poolId + userAddress
|
||||||
userAddress -> user: User!
|
user: User!
|
||||||
poolId --> pool: Pool!
|
pool: Pool!
|
||||||
balance: BigDecimal!
|
balance: BigDecimal!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user