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!
|
||||
nftOwner: User!
|
||||
|
||||
|
||||
# the fees will be updated from an event that will be created after (todo)
|
||||
publishingMarket: User
|
||||
publishingMarketToken: Token #
|
||||
@ -162,7 +161,6 @@ type Order @entity {
|
||||
consumerMarket: User
|
||||
consumerMarketToken: Token #
|
||||
consumerMarketAmmount: BigDecimal #call contract to get fee amount
|
||||
|
||||
reuses: [OrderReuse!] @derivedFrom(field: "order")
|
||||
|
||||
createdTimestamp: Int!
|
||||
@ -227,7 +225,6 @@ type FixedRateExchange @entity {
|
||||
|
||||
"fee amount. Fixed value"
|
||||
publishMarketSwapFee: BigDecimal
|
||||
|
||||
}
|
||||
|
||||
type FixedRateExchangeUpdate @entity {
|
||||
@ -262,7 +259,6 @@ type FixedRateExchangeSwap @entity {
|
||||
consumeMarketFeeAmount: BigDecimal!
|
||||
}
|
||||
|
||||
|
||||
type Dispenser @entity {
|
||||
"token address"
|
||||
id: ID!
|
||||
@ -281,7 +277,6 @@ type Dispenser @entity {
|
||||
"how many tokens are left"
|
||||
balance: BigDecimal!
|
||||
|
||||
|
||||
block: Int!
|
||||
createdTimestamp: Int!
|
||||
tx: String!
|
||||
@ -322,7 +317,8 @@ type GlobalStatistic @entity {
|
||||
id: ID!
|
||||
|
||||
"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"
|
||||
orderCount: Int!
|
||||
@ -359,9 +355,9 @@ type OPC @entity {
|
||||
}
|
||||
|
||||
enum NftUpdateType {
|
||||
METADATA_CREATED,
|
||||
METADATA_UPDATED,
|
||||
STATE_UPDATED,
|
||||
METADATA_CREATED
|
||||
METADATA_UPDATED
|
||||
STATE_UPDATED
|
||||
TOKENURI_UPDATED
|
||||
}
|
||||
|
||||
@ -444,7 +440,7 @@ type VeAllocation @entity {
|
||||
}
|
||||
|
||||
enum veAllocationUpdateType {
|
||||
SET,
|
||||
SET
|
||||
REMOVED
|
||||
}
|
||||
|
||||
@ -469,11 +465,10 @@ type VeDelegation @entity {
|
||||
tokenId: BigInt!
|
||||
amount: BigDecimal!
|
||||
lockedAmount: BigDecimal!
|
||||
timeLeft: Int!
|
||||
timeLeftUnlock: Int!
|
||||
cancelTime: BigInt!
|
||||
expireTime: BigInt!
|
||||
updates: [VeDelegationUpdate!] @derivedFrom(field: "veDelegation")
|
||||
|
||||
}
|
||||
|
||||
type VeDelegationUpdate @entity {
|
||||
@ -491,7 +486,6 @@ type VeDelegationUpdate @entity {
|
||||
veDelegation: VeDelegation!
|
||||
}
|
||||
|
||||
|
||||
type VeOCEAN @entity {
|
||||
"id = {user address}"
|
||||
id: ID!
|
||||
@ -527,14 +521,14 @@ type VeDeposit @entity {
|
||||
totalOceanLocked: BigDecimal!
|
||||
}
|
||||
|
||||
|
||||
type VeFeeDistributor @entity {
|
||||
"id = contract address"
|
||||
id: ID!
|
||||
"token used by FeeDistributor"
|
||||
token: Token!
|
||||
claims: [VeClaim!] @derivedFrom(field: "VeFeeDistributor")
|
||||
checkpoints: [VeFeeDistributorCheckPoint!] @derivedFrom(field: "VeFeeDistributor")
|
||||
checkpoints: [VeFeeDistributorCheckPoint!]
|
||||
@derivedFrom(field: "VeFeeDistributor")
|
||||
}
|
||||
|
||||
type VeFeeDistributorCheckPoint @entity {
|
||||
@ -567,7 +561,7 @@ type VeClaim @entity {
|
||||
}
|
||||
|
||||
enum DFHistoryType {
|
||||
Allocated,
|
||||
Allocated
|
||||
Claimed
|
||||
}
|
||||
|
||||
@ -579,7 +573,6 @@ type DFAvailableClaim @entity {
|
||||
token: Token!
|
||||
}
|
||||
|
||||
|
||||
type DFHistory @entity {
|
||||
"id = {user-id}-{txId}-{eventId}"
|
||||
id: ID!
|
||||
@ -592,7 +585,6 @@ type DFHistory @entity {
|
||||
tx: String!
|
||||
}
|
||||
|
||||
|
||||
type DFReward @entity {
|
||||
"id = {user address}"
|
||||
id: ID!
|
||||
|
@ -137,7 +137,7 @@ export function getveDelegation(
|
||||
veDelegation.receiver = ''
|
||||
veDelegation.delegator = ''
|
||||
veDelegation.lockedAmount = BigDecimal.zero()
|
||||
veDelegation.timeLeft = BigInt.zero()
|
||||
veDelegation.timeLeftUnlock = 0
|
||||
veDelegation.save()
|
||||
}
|
||||
return veDelegation
|
||||
|
@ -30,7 +30,7 @@ export function handleDelegation(event: DelegateBoost): void {
|
||||
BigInt.fromI32(18).toI32()
|
||||
)
|
||||
veDelegation.lockedAmount = delegator.lockedAmount
|
||||
veDelegation.timeLeft = delegator.unlockTime.toI32().minus(ts)
|
||||
veDelegation.timeLeftUnlock = delegator.unlockTime.toI32() - ts
|
||||
veDelegation.cancelTime = _cancelTime
|
||||
veDelegation.expireTime = _expireTime
|
||||
veDelegation.save()
|
||||
|
Loading…
Reference in New Issue
Block a user