2021-09-02 11:08:47 +02:00
|
|
|
type Token @entity {
|
2021-11-15 13:04:26 +01:00
|
|
|
id: ID!
|
|
|
|
symbol: String
|
|
|
|
name: String
|
|
|
|
decimals: Int!
|
|
|
|
address: String!
|
|
|
|
cap: BigDecimal
|
|
|
|
supply: BigDecimal
|
|
|
|
isDatatoken: Boolean!
|
|
|
|
|
|
|
|
"address of ERC721 that owns the token, valid only for datatokens"
|
2022-01-13 17:24:57 +01:00
|
|
|
nft: Nft
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"array of addresses with minter role, can be user wallet address, dispenser etc."
|
|
|
|
minter: [User!]
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"TODO: maybe we change name , depends on audit results . It's the address that collects the payments (NOT fees)"
|
2021-11-23 08:59:59 +01:00
|
|
|
feeManager: String
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"address of the market where the datatoken was created. This address collects market fees."
|
2021-11-23 08:59:59 +01:00
|
|
|
publishMarketFeeAddress: String
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"adreess of fee token (can be Ocean, ETH, etc.)"
|
2021-11-23 08:59:59 +01:00
|
|
|
publishMarketFeeToken: String
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"fee amount. Fixed value, expressed in wei in contracts, needs conversion in decimals."
|
2021-11-23 08:59:59 +01:00
|
|
|
publishMarketFeeAmmount: BigDecimal
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"template ID of the datatoken"
|
|
|
|
templateId: Int
|
|
|
|
|
|
|
|
"number of addresses holding a balance of datatoken , TODO: can we actually calculate this? what happens when users trade the dts"
|
2021-12-02 13:10:23 +01:00
|
|
|
holderCount: BigInt!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"number of orders executed for this datatoken"
|
2021-12-02 13:10:23 +01:00
|
|
|
orderCount: BigInt!
|
2021-11-15 13:04:26 +01:00
|
|
|
|
|
|
|
"block time datatoken was created"
|
2021-12-02 13:10:23 +01:00
|
|
|
createdTimestamp: Int!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"datatoken creation transaction id"
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"block number when it was created"
|
2021-12-02 13:10:23 +01:00
|
|
|
block: Int!
|
2021-07-30 09:36:44 +02:00
|
|
|
}
|
2021-05-13 08:19:21 +02:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"utility type"
|
2021-11-04 16:00:43 +01:00
|
|
|
type TokenValuePair @entity {
|
|
|
|
id : ID!
|
2021-10-28 18:48:53 +02:00
|
|
|
token : Token!
|
|
|
|
value : BigDecimal!
|
|
|
|
}
|
|
|
|
|
2021-11-04 16:00:43 +01:00
|
|
|
type Nft @entity{
|
2021-11-15 13:04:26 +01:00
|
|
|
"nft address"
|
|
|
|
id: ID!
|
|
|
|
symbol: String!
|
|
|
|
name: String!
|
|
|
|
tokenUri: String!
|
2021-11-29 13:11:58 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"address of the owner of the nft"
|
|
|
|
owner: String!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"same as id, it's just for easy discoverability"
|
|
|
|
address: String!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"provider url that can decrypt the ddo"
|
|
|
|
providerUrl: String
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"state of the asset (described in docs)"
|
|
|
|
assetState: Int!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-11-04 16:00:43 +01:00
|
|
|
managerRole: [String!]
|
|
|
|
erc20DeployerRole: [String!]
|
|
|
|
storeUpdateRole: [String!]
|
2021-11-15 13:04:26 +01:00
|
|
|
"addresses that can update the metadata"
|
|
|
|
metadataRole: [String!]
|
|
|
|
|
|
|
|
"template address"
|
|
|
|
template: String!
|
|
|
|
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"block time nft was created"
|
|
|
|
createdTimestamp: Int!
|
|
|
|
"nft creation transaction id"
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-11-15 13:04:26 +01:00
|
|
|
"block number when it was created"
|
|
|
|
block: Int
|
2021-10-28 18:48:53 +02:00
|
|
|
}
|
|
|
|
|
2021-07-30 09:36:44 +02:00
|
|
|
type Pool @entity {
|
2021-11-15 13:04:26 +01:00
|
|
|
"pool address"
|
2021-11-23 08:59:59 +01:00
|
|
|
id: ID!
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"owner address, pool controller"
|
2022-01-14 15:51:23 +01:00
|
|
|
controller: String!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"only finalized pools are relevant to us"
|
|
|
|
isFinalized: Boolean!
|
2021-09-02 11:08:47 +02:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"pool token symbol"
|
|
|
|
symbol: String
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"pool token name"
|
|
|
|
name: String
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"maximum supply if any, converted from wei"
|
2021-11-19 15:42:17 +01:00
|
|
|
cap: BigDecimal
|
2021-11-15 13:04:26 +01:00
|
|
|
|
2021-11-23 13:59:34 +01:00
|
|
|
baseToken: Token!
|
|
|
|
baseTokenLiquidity: BigDecimal!
|
|
|
|
baseTokenWeight: BigDecimal!
|
|
|
|
|
|
|
|
datatoken: Token!
|
|
|
|
datatokenLiquidity: BigDecimal!
|
|
|
|
datatokenWeight: BigDecimal!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"pool Fee percent, fee goes to all liquidity providers : SWAP, JOIN , EXIT"
|
|
|
|
poolFee: BigDecimal!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"OPF Fee percent, fee that goes to Ocean Protocol Foundation : SWAP"
|
|
|
|
opfFee: BigDecimal!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"market fee percent, fee that goes to the market where the pool was created : SWAP"
|
|
|
|
marketFee: BigDecimal!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"actual value of fee collected in both tokens"
|
|
|
|
totalPoolFee: [TokenValuePair!]!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"actual value of fee collected in both tokens"
|
|
|
|
totalOpfFee: [TokenValuePair!]!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"actual value of fee collected in both tokens"
|
|
|
|
totalMarketFee: [TokenValuePair!]!
|
|
|
|
|
|
|
|
"fee after collection = totalFee - colectedFee"
|
2021-11-23 08:59:59 +01:00
|
|
|
availableOpfFee: [TokenValuePair!]!
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"fee after collection totalFee - colectedFee"
|
2021-11-23 08:59:59 +01:00
|
|
|
availableMarketFee: [TokenValuePair!]!
|
2021-11-15 13:04:26 +01:00
|
|
|
|
|
|
|
"total pool token shares"
|
|
|
|
totalShares: BigDecimal!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"total tokens that were swaped"
|
|
|
|
totalSwapVolume: [TokenValuePair!]!
|
|
|
|
|
|
|
|
spotPrice: BigDecimal!
|
|
|
|
|
|
|
|
"count for when liquidity has been added"
|
2021-11-23 08:59:59 +01:00
|
|
|
joinCount: BigInt!
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"count for when liquidity has been removed"
|
2021-11-23 08:59:59 +01:00
|
|
|
exitCount: BigInt!
|
|
|
|
|
|
|
|
"count for when tokens were swapped"
|
2021-07-30 09:36:44 +02:00
|
|
|
swapCount: BigInt!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"number of transactions in this pool involving liquidity changes"
|
|
|
|
transactionCount: BigInt!
|
2021-09-02 11:08:47 +02:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"block time when pool was created"
|
|
|
|
createdTimestamp: Int!
|
|
|
|
"pool creation transaction id"
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-11-15 13:04:26 +01:00
|
|
|
"block number when it was created"
|
|
|
|
block: Int
|
2021-07-30 09:36:44 +02:00
|
|
|
|
2022-01-18 15:20:02 +01:00
|
|
|
shares: [PoolShare!] @derivedFrom(field: "pool")
|
2021-09-10 12:49:37 +02:00
|
|
|
transactions: [PoolTransaction!] @derivedFrom(field: "pool")
|
2020-11-20 13:12:02 +01:00
|
|
|
}
|
|
|
|
|
2021-10-28 18:48:53 +02:00
|
|
|
# we will need to track pool share tx between users - bpool transfer tx event
|
2022-01-18 15:20:02 +01:00
|
|
|
type PoolShare @entity {
|
2021-11-15 13:04:26 +01:00
|
|
|
"poolAddress + userAddress"
|
|
|
|
id: ID!
|
2021-09-08 13:34:33 +02:00
|
|
|
user: User!
|
|
|
|
pool: Pool!
|
2021-11-19 15:42:17 +01:00
|
|
|
shares: BigDecimal!
|
2020-11-20 13:12:02 +01:00
|
|
|
}
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
enum PoolTransactionType {
|
|
|
|
JOIN,
|
|
|
|
EXIT,
|
|
|
|
SWAP,
|
|
|
|
SETUP
|
|
|
|
}
|
2021-11-12 14:22:35 +01:00
|
|
|
|
2021-09-10 12:49:37 +02:00
|
|
|
type PoolTransaction @entity {
|
2021-11-15 13:04:26 +01:00
|
|
|
"tx address + caller address"
|
|
|
|
id: ID!
|
|
|
|
"pool related to this tx"
|
|
|
|
pool: Pool!
|
|
|
|
"user that initiates the tx"
|
|
|
|
user: User!
|
2021-12-02 13:10:23 +01:00
|
|
|
type: PoolTransactionType!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"number of shares transfered"
|
2022-01-18 15:20:02 +01:00
|
|
|
sharesTransferAmount: BigDecimal!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-11-26 09:04:14 +01:00
|
|
|
"pool fee value, fee goes to all liquidity providers : SWAP, JOIN , EXIT"
|
2021-11-15 13:04:26 +01:00
|
|
|
poolFee: BigDecimal!
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2021-11-26 09:04:14 +01:00
|
|
|
"OPF Fee value, fee that goes to Ocean Protocol Foundation : SWAP"
|
2021-11-23 08:59:59 +01:00
|
|
|
opfFee: BigDecimal!
|
|
|
|
|
2021-11-26 09:04:14 +01:00
|
|
|
"market fee value, fee that goes to the publishing market"
|
2021-10-28 18:48:53 +02:00
|
|
|
marketFee: BigDecimal!
|
2021-11-12 14:22:35 +01:00
|
|
|
|
2021-11-23 08:59:59 +01:00
|
|
|
"block time when pool was created"
|
2021-11-23 13:59:34 +01:00
|
|
|
timestamp: Int!
|
2021-11-23 08:59:59 +01:00
|
|
|
"pool creation transaction id"
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-11-23 08:59:59 +01:00
|
|
|
"block number when it was created"
|
|
|
|
block: Int
|
2021-11-12 14:22:35 +01:00
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
gasLimit: BigDecimal!
|
|
|
|
"price expressed in eth"
|
|
|
|
gasPrice: BigDecimal!
|
2021-05-13 08:19:21 +02:00
|
|
|
|
2021-11-19 15:42:17 +01:00
|
|
|
"base tokens transfered"
|
2022-01-18 15:20:02 +01:00
|
|
|
baseToken: Token
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2022-01-18 15:20:02 +01:00
|
|
|
"number of base tokens transfered, if value is negative it means it was removed"
|
2021-11-19 15:42:17 +01:00
|
|
|
baseTokenValue: BigDecimal
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2022-01-18 15:20:02 +01:00
|
|
|
"datatokens transfered"
|
|
|
|
datatoken: Token
|
2021-11-23 08:59:59 +01:00
|
|
|
|
2022-01-18 15:20:02 +01:00
|
|
|
"number of datatokens transfered, if value is negative it means it was removed"
|
2021-11-19 15:42:17 +01:00
|
|
|
datatokenValue: BigDecimal
|
2020-11-20 13:12:02 +01:00
|
|
|
}
|
|
|
|
|
2021-11-26 09:04:14 +01:00
|
|
|
type Order @entity {
|
|
|
|
"transaction hash - token address - from address"
|
|
|
|
id: ID!
|
2021-09-13 15:20:29 +02:00
|
|
|
token: Token!
|
2021-05-13 08:19:21 +02:00
|
|
|
|
|
|
|
consumer: User!
|
|
|
|
payer: User!
|
|
|
|
amount: BigDecimal!
|
|
|
|
serviceId: Int!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
# the fees will be updated from an event that will be created after (todo)
|
2021-11-26 09:04:14 +01:00
|
|
|
publishingMarket: User
|
2021-10-28 18:48:53 +02:00
|
|
|
publishingMarketToken: Token #
|
|
|
|
publishingMarketAmmount: BigDecimal #call contract to get fee ammount
|
|
|
|
|
2021-11-26 09:04:14 +01:00
|
|
|
consumerMarket: User
|
2021-10-28 18:48:53 +02:00
|
|
|
consumerMarketToken: Token #
|
|
|
|
consumerMarketAmmount: BigDecimal #call contract to get fee ammount
|
2021-05-13 08:19:21 +02:00
|
|
|
|
2021-11-10 13:47:44 +01:00
|
|
|
createdTimestamp: Int!
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-05-13 08:19:21 +02:00
|
|
|
block: Int!
|
2020-11-26 12:10:45 +01:00
|
|
|
}
|
|
|
|
|
2021-10-28 18:48:53 +02:00
|
|
|
# to be removed, mabye for pool shares only
|
2020-11-26 07:38:08 +01:00
|
|
|
type TokenTransaction @entity {
|
2021-05-13 08:19:21 +02:00
|
|
|
id: ID! # Log ID
|
|
|
|
event: String
|
2021-09-13 15:20:29 +02:00
|
|
|
token: Token
|
|
|
|
user: User
|
2021-05-13 08:19:21 +02:00
|
|
|
|
|
|
|
block: Int!
|
|
|
|
gasUsed: BigDecimal!
|
|
|
|
gasPrice: BigDecimal!
|
2021-11-10 13:47:44 +01:00
|
|
|
createdTimestamp: Int!
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2020-11-26 07:38:08 +01:00
|
|
|
}
|
|
|
|
|
2020-12-02 11:07:09 +01:00
|
|
|
type User @entity {
|
2021-05-13 08:19:21 +02:00
|
|
|
id: ID!
|
2022-01-18 15:20:02 +01:00
|
|
|
sharesOwned: [PoolShare!] @derivedFrom(field: "user")
|
2021-11-04 16:00:43 +01:00
|
|
|
tokenBalancesOwned: [TokenValuePair!]
|
2021-09-13 15:20:29 +02:00
|
|
|
tokensOwned: [Token!] @derivedFrom(field: "minter")
|
|
|
|
poolTransactions: [PoolTransaction!] @derivedFrom(field: "user")
|
|
|
|
orders: [Order!] @derivedFrom(field: "payer")
|
2021-05-13 08:19:21 +02:00
|
|
|
freSwaps: [FixedRateExchangeSwap!] @derivedFrom(field: "by")
|
2020-12-02 11:07:09 +01:00
|
|
|
}
|
2021-03-10 22:36:51 +01:00
|
|
|
|
|
|
|
type FixedRateExchange @entity {
|
2021-11-15 13:04:26 +01:00
|
|
|
"fixed rate exchange id"
|
|
|
|
id: ID!
|
2021-11-04 16:00:43 +01:00
|
|
|
owner: User!
|
2021-09-13 15:20:29 +02:00
|
|
|
datatoken: Token!
|
|
|
|
baseToken: Token!
|
2021-10-28 18:48:53 +02:00
|
|
|
price: BigDecimal!
|
2021-05-13 08:19:21 +02:00
|
|
|
active: Boolean!
|
2021-11-15 13:04:26 +01:00
|
|
|
"amount of total basetokens spent"
|
|
|
|
totalSwapValue: BigDecimal!
|
|
|
|
"address that is allowed to swap tokens"
|
|
|
|
allowedSwapper: String
|
|
|
|
"if the owner allowes the fre to mint"
|
|
|
|
withMint: Boolean
|
|
|
|
"if the fre has the minter role on the datatoken"
|
|
|
|
isMinter: Boolean
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-05-13 08:19:21 +02:00
|
|
|
updates: [FixedRateExchangeUpdate!] @derivedFrom(field: "exchangeId")
|
|
|
|
swaps: [FixedRateExchangeSwap!] @derivedFrom(field: "exchangeId")
|
2021-11-10 13:47:44 +01:00
|
|
|
|
|
|
|
createdTimestamp: Int!
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-11-10 13:47:44 +01:00
|
|
|
block: Int!
|
2021-03-10 22:36:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type FixedRateExchangeUpdate @entity {
|
2021-05-13 08:19:21 +02:00
|
|
|
id: ID!
|
|
|
|
exchangeId: FixedRateExchange!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-11-10 13:47:44 +01:00
|
|
|
oldPrice: BigDecimal
|
|
|
|
newPrice: BigDecimal
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-11-10 13:47:44 +01:00
|
|
|
oldActive: Boolean
|
|
|
|
newActive: Boolean
|
2021-10-28 18:48:53 +02:00
|
|
|
|
|
|
|
oldAllowedSwapper: String
|
|
|
|
newAllowedSwapper: String
|
|
|
|
|
2021-05-13 08:19:21 +02:00
|
|
|
block: Int!
|
2021-11-10 13:47:44 +01:00
|
|
|
createdTimestamp: Int!
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-03-10 22:36:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type FixedRateExchangeSwap @entity {
|
2021-05-13 08:19:21 +02:00
|
|
|
id: ID!
|
|
|
|
exchangeId: FixedRateExchange!
|
|
|
|
by: User!
|
|
|
|
baseTokenAmount: BigDecimal!
|
|
|
|
dataTokenAmount: BigDecimal!
|
|
|
|
block: Int!
|
2021-11-10 13:47:44 +01:00
|
|
|
createdTimestamp: Int!
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-05-13 08:19:21 +02:00
|
|
|
}
|
|
|
|
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-05-13 08:19:21 +02:00
|
|
|
type Dispenser @entity {
|
2022-01-13 17:24:57 +01:00
|
|
|
"token address"
|
2021-11-15 13:04:26 +01:00
|
|
|
id: ID!
|
2022-01-13 17:24:57 +01:00
|
|
|
active: Boolean!
|
|
|
|
"if using the enterprise template the owner will always be the erc721 factory, for normal template it will a user"
|
|
|
|
owner: String
|
|
|
|
token: Token!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-11-10 13:47:44 +01:00
|
|
|
allowedSwapper: String
|
2021-11-15 13:04:26 +01:00
|
|
|
isMinter: Boolean
|
|
|
|
"max tokens that can be dispensed"
|
|
|
|
maxTokens: BigDecimal!
|
|
|
|
"max balance of requester. If the balance is higher, the dispense is rejected"
|
|
|
|
maxBalance: BigDecimal!
|
|
|
|
"how many tokens are left"
|
2022-01-13 17:24:57 +01:00
|
|
|
balance: BigDecimal!
|
|
|
|
|
|
|
|
|
|
|
|
block: Int!
|
|
|
|
createdTimestamp: Int!
|
|
|
|
tx: String!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-11-04 16:00:43 +01:00
|
|
|
dispenses: [DispenserTransaction!] @derivedFrom(field: "dispenser")
|
2021-05-13 08:19:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type DispenserTransaction @entity {
|
2021-11-10 13:47:44 +01:00
|
|
|
id: ID!
|
2021-10-28 18:48:53 +02:00
|
|
|
dispenser: Dispenser!
|
2021-05-13 08:19:21 +02:00
|
|
|
user: User!
|
|
|
|
amount: BigDecimal!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-05-13 08:19:21 +02:00
|
|
|
block: Int!
|
2021-11-10 13:47:44 +01:00
|
|
|
createdTimestamp: Int!
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-09-02 16:57:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type PoolSnapshot @entity {
|
|
|
|
id: ID!
|
|
|
|
pool: Pool!
|
2021-11-23 10:54:40 +01:00
|
|
|
"total pool shares at the end of the 24h interval"
|
2021-09-02 16:57:14 +02:00
|
|
|
totalShares: BigDecimal!
|
2021-11-15 13:04:26 +01:00
|
|
|
"swap value 24h"
|
|
|
|
swapVolume: BigDecimal!
|
|
|
|
"swap fee value 24h"
|
|
|
|
swapFees: BigDecimal!
|
|
|
|
"date without time"
|
2021-11-23 13:59:34 +01:00
|
|
|
date: Int!
|
2021-11-23 10:54:40 +01:00
|
|
|
"last spot price in the 24h interval"
|
|
|
|
spotPrice: BigDecimal!
|
|
|
|
|
|
|
|
baseToken: Token!
|
|
|
|
baseTokenLiquidity: BigDecimal!
|
2021-09-02 16:57:14 +02:00
|
|
|
|
2021-11-23 10:54:40 +01:00
|
|
|
datatoken: Token!
|
|
|
|
datatokenLiquidity: BigDecimal!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-11-23 10:54:40 +01:00
|
|
|
}
|
2021-11-19 15:42:17 +01:00
|
|
|
type GlobalStats @entity {
|
2021-10-28 18:48:53 +02:00
|
|
|
id: ID!
|
|
|
|
|
2021-11-15 13:04:26 +01:00
|
|
|
"total liquidity for each base token"
|
2021-12-07 10:47:58 +01:00
|
|
|
totalLiquidity: [TokenValuePair!]!
|
2021-11-15 13:04:26 +01:00
|
|
|
"total swap volume for each base token. pools and fre"
|
2021-12-07 10:47:58 +01:00
|
|
|
totalSwapVolume: [TokenValuePair!]!
|
2021-10-28 18:48:53 +02:00
|
|
|
|
2021-12-07 10:47:58 +01:00
|
|
|
"number of total consumes, pools + fre+ free"
|
|
|
|
orderCount: BigInt!
|
|
|
|
|
|
|
|
"total nfts created"
|
|
|
|
nftCount: BigInt!
|
|
|
|
"total datatokens created"
|
|
|
|
datatokenCount:BigInt!
|
|
|
|
"number of pools"
|
|
|
|
poolCount: Int!
|
2021-10-28 18:48:53 +02:00
|
|
|
}
|
|
|
|
|
2021-09-13 15:20:29 +02:00
|
|
|
|
2021-12-02 12:08:47 +01:00
|
|
|
enum NftUpdateType {
|
|
|
|
METADATA_CREATED,
|
|
|
|
METADATA_UPDATED,
|
|
|
|
STATE_UPDATED,
|
|
|
|
TOKENURI_UPDATED
|
|
|
|
}
|
|
|
|
|
2021-11-29 13:11:58 +01:00
|
|
|
type NftUpdate @entity {
|
|
|
|
id: ID! # update tx + nft address
|
2022-01-28 12:05:04 +01:00
|
|
|
tokenUri: String!
|
2021-12-02 12:08:47 +01:00
|
|
|
nft: Nft!
|
2021-09-13 15:20:29 +02:00
|
|
|
|
2022-01-28 12:05:04 +01:00
|
|
|
"provider url that can decrypt the ddo"
|
|
|
|
providerUrl: String
|
|
|
|
|
2021-11-29 13:11:58 +01:00
|
|
|
"user that made the update"
|
2021-09-13 15:20:29 +02:00
|
|
|
userAddress: String!
|
|
|
|
|
2021-12-02 12:08:47 +01:00
|
|
|
"state of the asset in this update"
|
2021-11-29 13:11:58 +01:00
|
|
|
assetState: Int!
|
|
|
|
|
2021-12-02 12:08:47 +01:00
|
|
|
"type of the update: metadata created, metadata update, state update, token uri update"
|
|
|
|
type: NftUpdateType!
|
|
|
|
|
2021-09-13 15:20:29 +02:00
|
|
|
block: Int!
|
2021-11-29 13:11:58 +01:00
|
|
|
timestamp: Int!
|
2021-12-02 12:08:47 +01:00
|
|
|
tx: String!
|
2021-09-13 15:20:29 +02:00
|
|
|
}
|