mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
Fix and rename
This commit is contained in:
parent
c0fe3cd6b4
commit
70846eafe2
@ -151,7 +151,6 @@ type Order @entity {
|
|||||||
serviceIndex: Int!
|
serviceIndex: Int!
|
||||||
nftOwner: User!
|
nftOwner: User!
|
||||||
|
|
||||||
|
|
||||||
# the fees will be updated from an event that will be created after (todo)
|
# the fees will be updated from an event that will be created after (todo)
|
||||||
publishingMarket: User
|
publishingMarket: User
|
||||||
publishingMarketToken: Token #
|
publishingMarketToken: Token #
|
||||||
@ -162,7 +161,6 @@ type Order @entity {
|
|||||||
consumerMarket: User
|
consumerMarket: User
|
||||||
consumerMarketToken: Token #
|
consumerMarketToken: Token #
|
||||||
consumerMarketAmmount: BigDecimal #call contract to get fee amount
|
consumerMarketAmmount: BigDecimal #call contract to get fee amount
|
||||||
|
|
||||||
reuses: [OrderReuse!] @derivedFrom(field: "order")
|
reuses: [OrderReuse!] @derivedFrom(field: "order")
|
||||||
|
|
||||||
createdTimestamp: Int!
|
createdTimestamp: Int!
|
||||||
@ -227,7 +225,6 @@ type FixedRateExchange @entity {
|
|||||||
|
|
||||||
"fee amount. Fixed value"
|
"fee amount. Fixed value"
|
||||||
publishMarketSwapFee: BigDecimal
|
publishMarketSwapFee: BigDecimal
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type FixedRateExchangeUpdate @entity {
|
type FixedRateExchangeUpdate @entity {
|
||||||
@ -262,7 +259,6 @@ type FixedRateExchangeSwap @entity {
|
|||||||
consumeMarketFeeAmount: BigDecimal!
|
consumeMarketFeeAmount: BigDecimal!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type Dispenser @entity {
|
type Dispenser @entity {
|
||||||
"token address"
|
"token address"
|
||||||
id: ID!
|
id: ID!
|
||||||
@ -281,7 +277,6 @@ type Dispenser @entity {
|
|||||||
"how many tokens are left"
|
"how many tokens are left"
|
||||||
balance: BigDecimal!
|
balance: BigDecimal!
|
||||||
|
|
||||||
|
|
||||||
block: Int!
|
block: Int!
|
||||||
createdTimestamp: Int!
|
createdTimestamp: Int!
|
||||||
tx: String!
|
tx: String!
|
||||||
@ -322,7 +317,8 @@ type GlobalStatistic @entity {
|
|||||||
id: ID!
|
id: ID!
|
||||||
|
|
||||||
"total swap volume for each base token in fixed rate exchanges"
|
"total swap volume for each base token in fixed rate exchanges"
|
||||||
totalFixedSwapVolume: [GlobalTotalFixedSwapPair!] @derivedFrom(field: "globalStatistic")
|
totalFixedSwapVolume: [GlobalTotalFixedSwapPair!]
|
||||||
|
@derivedFrom(field: "globalStatistic")
|
||||||
|
|
||||||
"number of total orders. fixed rate exchange orders + dispenser orders"
|
"number of total orders. fixed rate exchange orders + dispenser orders"
|
||||||
orderCount: Int!
|
orderCount: Int!
|
||||||
@ -359,9 +355,9 @@ type OPC @entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum NftUpdateType {
|
enum NftUpdateType {
|
||||||
METADATA_CREATED,
|
METADATA_CREATED
|
||||||
METADATA_UPDATED,
|
METADATA_UPDATED
|
||||||
STATE_UPDATED,
|
STATE_UPDATED
|
||||||
TOKENURI_UPDATED
|
TOKENURI_UPDATED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,7 +440,7 @@ type VeAllocation @entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum veAllocationUpdateType {
|
enum veAllocationUpdateType {
|
||||||
SET,
|
SET
|
||||||
REMOVED
|
REMOVED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -469,11 +465,10 @@ type VeDelegation @entity {
|
|||||||
tokenId: BigInt!
|
tokenId: BigInt!
|
||||||
amount: BigDecimal!
|
amount: BigDecimal!
|
||||||
lockedAmount: BigDecimal!
|
lockedAmount: BigDecimal!
|
||||||
timeLeft: Int!
|
timeLeftUnlock: Int!
|
||||||
cancelTime: BigInt!
|
cancelTime: BigInt!
|
||||||
expireTime: BigInt!
|
expireTime: BigInt!
|
||||||
updates: [VeDelegationUpdate!] @derivedFrom(field: "veDelegation")
|
updates: [VeDelegationUpdate!] @derivedFrom(field: "veDelegation")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type VeDelegationUpdate @entity {
|
type VeDelegationUpdate @entity {
|
||||||
@ -491,7 +486,6 @@ type VeDelegationUpdate @entity {
|
|||||||
veDelegation: VeDelegation!
|
veDelegation: VeDelegation!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type VeOCEAN @entity {
|
type VeOCEAN @entity {
|
||||||
"id = {user address}"
|
"id = {user address}"
|
||||||
id: ID!
|
id: ID!
|
||||||
@ -527,14 +521,14 @@ type VeDeposit @entity {
|
|||||||
totalOceanLocked: BigDecimal!
|
totalOceanLocked: BigDecimal!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type VeFeeDistributor @entity {
|
type VeFeeDistributor @entity {
|
||||||
"id = contract address"
|
"id = contract address"
|
||||||
id: ID!
|
id: ID!
|
||||||
"token used by FeeDistributor"
|
"token used by FeeDistributor"
|
||||||
token: Token!
|
token: Token!
|
||||||
claims: [VeClaim!] @derivedFrom(field: "VeFeeDistributor")
|
claims: [VeClaim!] @derivedFrom(field: "VeFeeDistributor")
|
||||||
checkpoints: [VeFeeDistributorCheckPoint!] @derivedFrom(field: "VeFeeDistributor")
|
checkpoints: [VeFeeDistributorCheckPoint!]
|
||||||
|
@derivedFrom(field: "VeFeeDistributor")
|
||||||
}
|
}
|
||||||
|
|
||||||
type VeFeeDistributorCheckPoint @entity {
|
type VeFeeDistributorCheckPoint @entity {
|
||||||
@ -567,7 +561,7 @@ type VeClaim @entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum DFHistoryType {
|
enum DFHistoryType {
|
||||||
Allocated,
|
Allocated
|
||||||
Claimed
|
Claimed
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -579,7 +573,6 @@ type DFAvailableClaim @entity {
|
|||||||
token: Token!
|
token: Token!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type DFHistory @entity {
|
type DFHistory @entity {
|
||||||
"id = {user-id}-{txId}-{eventId}"
|
"id = {user-id}-{txId}-{eventId}"
|
||||||
id: ID!
|
id: ID!
|
||||||
@ -592,7 +585,6 @@ type DFHistory @entity {
|
|||||||
tx: String!
|
tx: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type DFReward @entity {
|
type DFReward @entity {
|
||||||
"id = {user address}"
|
"id = {user address}"
|
||||||
id: ID!
|
id: ID!
|
||||||
|
@ -137,7 +137,7 @@ export function getveDelegation(
|
|||||||
veDelegation.receiver = ''
|
veDelegation.receiver = ''
|
||||||
veDelegation.delegator = ''
|
veDelegation.delegator = ''
|
||||||
veDelegation.lockedAmount = BigDecimal.zero()
|
veDelegation.lockedAmount = BigDecimal.zero()
|
||||||
veDelegation.timeLeft = BigInt.zero()
|
veDelegation.timeLeftUnlock = 0
|
||||||
veDelegation.save()
|
veDelegation.save()
|
||||||
}
|
}
|
||||||
return veDelegation
|
return veDelegation
|
||||||
|
@ -30,7 +30,7 @@ export function handleDelegation(event: DelegateBoost): void {
|
|||||||
BigInt.fromI32(18).toI32()
|
BigInt.fromI32(18).toI32()
|
||||||
)
|
)
|
||||||
veDelegation.lockedAmount = delegator.lockedAmount
|
veDelegation.lockedAmount = delegator.lockedAmount
|
||||||
veDelegation.timeLeft = delegator.unlockTime.toI32().minus(ts)
|
veDelegation.timeLeftUnlock = delegator.unlockTime.toI32() - ts
|
||||||
veDelegation.cancelTime = _cancelTime
|
veDelegation.cancelTime = _cancelTime
|
||||||
veDelegation.expireTime = _expireTime
|
veDelegation.expireTime = _expireTime
|
||||||
veDelegation.save()
|
veDelegation.save()
|
||||||
|
Loading…
Reference in New Issue
Block a user