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")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//PoolToken - all good as it is
|
||||
|
||||
type PoolToken @entity {
|
||||
id: ID! # poolId + token address
|
||||
// can be on multiple pools, should remove
|
||||
poolId: Pool!
|
||||
isDatatoken: Boolean!
|
||||
address: String
|
||||
tokenId: Datatoken
|
||||
tokenAddress: String
|
||||
balance: BigDecimal!
|
||||
pool: Pool! #
|
||||
isDatatoken: Boolean! # if the token is a datatoken , not sure if this makes sense since it is duplicate information found on token
|
||||
token: Token!
|
||||
balance: BigDecimal! # balance of the token in this pool
|
||||
denormWeight: BigDecimal!
|
||||
symbol: String
|
||||
name: String
|
||||
decimals: Int
|
||||
symbol: String # should we keep this, it is found on token?
|
||||
name: String # should we keep this, it is found on token?
|
||||
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 {
|
||||
id: ID! # poolId + userAddress
|
||||
userAddress -> user: User!
|
||||
poolId --> pool: Pool!
|
||||
user: User!
|
||||
pool: Pool!
|
||||
balance: BigDecimal!
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user