revert.
This commit is contained in:
parent
ec88556879
commit
6cda426bb5
|
@ -58,7 +58,6 @@ type Token @entity {
|
|||
|
||||
lastPriceToken: Token
|
||||
lastPriceValue: BigDecimal!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
"utility type"
|
||||
|
@ -117,7 +116,6 @@ type Nft @entity{
|
|||
|
||||
nftData: [NftData!] @derivedFrom(field: "nft")
|
||||
transferHistory: [NftTransferHistory!] @derivedFrom(field: "nft")
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type NftData @entity{
|
||||
|
@ -140,7 +138,6 @@ type OrderReuse @entity {
|
|||
"gas price in Wei"
|
||||
gasPrice: BigInt
|
||||
gasUsed: BigDecimal
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type Order @entity {
|
||||
|
@ -178,7 +175,6 @@ type Order @entity {
|
|||
gasUsed: BigDecimal
|
||||
"gas price in Wei"
|
||||
gasPrice: BigInt
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type User @entity {
|
||||
|
@ -230,8 +226,8 @@ type FixedRateExchange @entity {
|
|||
publishMarketFeeAddress: String
|
||||
|
||||
"fee amount. Fixed value"
|
||||
publishMarketSwapFee: BigDecimal
|
||||
eventIndex: BigInt!
|
||||
publishMarketSwapFee: BigDecimal
|
||||
|
||||
}
|
||||
|
||||
type FixedRateExchangeUpdate @entity {
|
||||
|
@ -250,7 +246,6 @@ type FixedRateExchangeUpdate @entity {
|
|||
block: Int!
|
||||
createdTimestamp: Int!
|
||||
tx: String!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type FixedRateExchangeSwap @entity {
|
||||
|
@ -265,7 +260,6 @@ type FixedRateExchangeSwap @entity {
|
|||
oceanFeeAmount: BigDecimal!
|
||||
marketFeeAmount: BigDecimal!
|
||||
consumeMarketFeeAmount: BigDecimal!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
|
||||
|
@ -293,7 +287,6 @@ type Dispenser @entity {
|
|||
tx: String!
|
||||
|
||||
dispenses: [DispenserTransaction!] @derivedFrom(field: "dispenser")
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type DispenserTransaction @entity {
|
||||
|
@ -305,7 +298,6 @@ type DispenserTransaction @entity {
|
|||
block: Int!
|
||||
createdTimestamp: Int!
|
||||
tx: String!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
"utility type"
|
||||
|
@ -361,7 +353,6 @@ type OPC @entity {
|
|||
"fee in percent taken by OPC from providerFees"
|
||||
providerFee: BigDecimal
|
||||
approvedTokens: [Token!]
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
enum NftUpdateType {
|
||||
|
@ -391,7 +382,6 @@ type NftUpdate @entity {
|
|||
block: Int!
|
||||
timestamp: Int!
|
||||
tx: String!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type Template @entity{
|
||||
|
@ -399,7 +389,6 @@ type Template @entity{
|
|||
fixedRateTemplates: [String!]
|
||||
dispenserTemplates: [String!]
|
||||
ssTemplates: [String!]
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
# Not tracking allocationToId or idToAllocation
|
||||
|
@ -415,7 +404,6 @@ type VeAllocateUser @entity{
|
|||
lastContact: Int!
|
||||
tx: String!
|
||||
veOcean: VeOCEAN!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type VeAllocateId @entity{
|
||||
|
@ -431,7 +419,6 @@ type VeAllocateId @entity{
|
|||
firstContact: Int!
|
||||
lastContact: Int!
|
||||
tx: String!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
# we need to track allocation of user to id
|
||||
|
@ -451,7 +438,6 @@ type VeAllocation @entity {
|
|||
firstContact: Int!
|
||||
lastContact: Int!
|
||||
tx: String!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
enum veAllocationUpdateType {
|
||||
|
@ -470,7 +456,6 @@ type VeAllocationUpdate @entity {
|
|||
block: Int!
|
||||
timestamp: Int!
|
||||
tx: String!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type VeDelegation @entity {
|
||||
|
@ -483,7 +468,6 @@ type VeDelegation @entity {
|
|||
cancelTime: BigInt!
|
||||
expireTime: BigInt!
|
||||
block: Int!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type VeOCEAN @entity {
|
||||
|
@ -502,7 +486,7 @@ type VeOCEAN @entity {
|
|||
}
|
||||
|
||||
type VeDeposit @entity {
|
||||
"id = {user address}-{tx}-{eventIndex: BigDecimal!}"
|
||||
"id = {user address}-{tx}-{eventIndex}"
|
||||
id: ID!
|
||||
"veOcean holder"
|
||||
provider:String!
|
||||
|
@ -518,7 +502,6 @@ type VeDeposit @entity {
|
|||
block: Int!
|
||||
tx: String!
|
||||
veOcean: VeOCEAN!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
|
||||
|
@ -542,7 +525,6 @@ type VeFeeDistributorCheckPoint @entity {
|
|||
timestamp: BigInt!
|
||||
block: Int!
|
||||
tx: String!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
type VeClaim @entity {
|
||||
|
@ -559,7 +541,6 @@ type VeClaim @entity {
|
|||
tx: String!
|
||||
veOcean: VeOCEAN!
|
||||
VeFeeDistributor: VeFeeDistributor!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
enum DFHistoryType {
|
||||
|
@ -586,7 +567,6 @@ type DFHistory @entity {
|
|||
timestamp: BigInt!
|
||||
block: Int!
|
||||
tx: String!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
|
||||
|
@ -607,6 +587,5 @@ type NftTransferHistory @entity {
|
|||
txId: String
|
||||
timestamp: Int!
|
||||
block: Int!
|
||||
eventIndex: BigInt!
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ export function handleAllocated(event: Allocated): void {
|
|||
const token = getToken(event.params.tokenAddress, false)
|
||||
for (let i = 0; i < event.params.tos.length; i++) {
|
||||
const reward = getDFReward(event.params.tos[i])
|
||||
|
||||
const history = new DFHistory(
|
||||
event.params.tos[i].toHexString() +
|
||||
'-' +
|
||||
|
@ -28,7 +27,6 @@ export function handleAllocated(event: Allocated): void {
|
|||
history.timestamp = event.block.timestamp
|
||||
history.tx = event.transaction.hash.toHex()
|
||||
history.block = event.block.number.toI32()
|
||||
history.eventIndex = event.logIndex
|
||||
history.save()
|
||||
|
||||
// update available claims
|
||||
|
@ -58,7 +56,6 @@ export function handleClaimed(event: Claimed): void {
|
|||
history.timestamp = event.block.timestamp
|
||||
history.tx = event.transaction.hash.toHex()
|
||||
history.block = event.block.number.toI32()
|
||||
history.eventIndex = event.logIndex
|
||||
history.save()
|
||||
|
||||
// update available claims
|
||||
|
|
|
@ -44,7 +44,6 @@ export function handleNewDispenser(event: DispenserCreated): void {
|
|||
dispenser.createdTimestamp = event.block.timestamp.toI32()
|
||||
dispenser.tx = event.transaction.hash.toHex()
|
||||
dispenser.block = event.block.number.toI32()
|
||||
dispenser.eventIndex = event.logIndex
|
||||
dispenser.save()
|
||||
|
||||
addDispenser()
|
||||
|
@ -58,7 +57,6 @@ export function handleActivate(event: DispenserActivated): void {
|
|||
)
|
||||
const dispenser = getDispenser(dispenserID)
|
||||
dispenser.active = true
|
||||
dispenser.eventIndex = event.logIndex
|
||||
dispenser.save()
|
||||
}
|
||||
|
||||
|
@ -69,7 +67,6 @@ export function handleDeactivate(event: DispenserDeactivated): void {
|
|||
)
|
||||
const dispenser = getDispenser(dispenserID)
|
||||
dispenser.active = false
|
||||
dispenser.eventIndex = event.logIndex
|
||||
dispenser.save()
|
||||
}
|
||||
|
||||
|
@ -79,7 +76,6 @@ export function handleAllowedSwapperChanged(
|
|||
const dispenserID = getDispenserGraphID(event.address, event.params.datatoken)
|
||||
const dispenser = getDispenser(dispenserID)
|
||||
dispenser.allowedSwapper = event.params.newAllowedSwapper.toHex()
|
||||
dispenser.eventIndex = event.logIndex
|
||||
dispenser.save()
|
||||
}
|
||||
|
||||
|
@ -103,7 +99,6 @@ export function handleTokensDispensed(event: TokensDispensed): void {
|
|||
dispenserTransaction.createdTimestamp = event.block.timestamp.toI32()
|
||||
dispenserTransaction.tx = event.transaction.hash.toHex()
|
||||
dispenserTransaction.block = event.block.number.toI32()
|
||||
dispenserTransaction.eventIndex = event.logIndex
|
||||
const token = getToken(event.params.datatokenAddress, true)
|
||||
dispenserTransaction.amount = weiToDecimal(
|
||||
event.params.amount.toBigDecimal(),
|
||||
|
@ -116,6 +111,5 @@ export function handleOwnerWinthdraw(event: OwnerWithdrawed): void {
|
|||
const dispenserID = getDispenserGraphID(event.address, event.params.datatoken)
|
||||
const dispenser = getDispenser(dispenserID)
|
||||
dispenser.balance = decimal.ZERO
|
||||
dispenser.eventIndex = event.logIndex
|
||||
dispenser.save()
|
||||
}
|
||||
|
|
|
@ -87,8 +87,6 @@ export function handleOrderStarted(event: OrderStarted): void {
|
|||
} else {
|
||||
order.gasPrice = BigInt.zero()
|
||||
}
|
||||
order.eventIndex = event.logIndex
|
||||
token.eventIndex = event.logIndex
|
||||
order.save()
|
||||
token.save()
|
||||
addOrder()
|
||||
|
@ -126,7 +124,6 @@ export function handlerOrderReused(event: OrderReused): void {
|
|||
reuseOrder.createdTimestamp = event.params.timestamp.toI32()
|
||||
reuseOrder.tx = event.transaction.hash.toHex()
|
||||
reuseOrder.block = event.params.number.toI32()
|
||||
reuseOrder.eventIndex = event.logIndex
|
||||
|
||||
reuseOrder.save()
|
||||
}
|
||||
|
@ -152,7 +149,6 @@ export function handlePublishMarketFeeChanged(
|
|||
event.params.PublishMarketFeeAmount.toBigDecimal(),
|
||||
decimals
|
||||
)
|
||||
token.eventIndex = event.logIndex
|
||||
token.save()
|
||||
// TODO - shold we have a history
|
||||
}
|
||||
|
@ -167,7 +163,6 @@ export function handleAddedMinter(event: AddedMinter): void {
|
|||
if (!existingRoles.includes(event.params.user.toHexString()))
|
||||
existingRoles.push(event.params.user.toHexString())
|
||||
token.minter = existingRoles
|
||||
token.eventIndex = event.logIndex
|
||||
token.save()
|
||||
}
|
||||
|
||||
|
@ -184,7 +179,6 @@ export function handleRemovedMinter(event: RemovedMinter): void {
|
|||
if (role !== event.params.user.toHexString()) newList.push(role)
|
||||
}
|
||||
token.minter = newList
|
||||
token.eventIndex = event.logIndex
|
||||
token.save()
|
||||
}
|
||||
|
||||
|
@ -196,7 +190,6 @@ export function handleAddedPaymentManager(event: AddedPaymentManager): void {
|
|||
if (!existingRoles.includes(event.params.user.toHexString()))
|
||||
existingRoles.push(event.params.user.toHexString())
|
||||
token.paymentManager = existingRoles
|
||||
token.eventIndex = event.logIndex
|
||||
token.save()
|
||||
}
|
||||
export function handleRemovedPaymentManager(
|
||||
|
@ -224,14 +217,12 @@ export function handleCleanedPermissions(event: CleanedPermissions): void {
|
|||
const nft = Nft.load(token.nft as string)
|
||||
if (nft) token.paymentCollector = nft.owner
|
||||
else token.paymentCollector = '0x0000000000000000000000000000000000000000'
|
||||
token.eventIndex = event.logIndex
|
||||
token.save()
|
||||
}
|
||||
|
||||
export function handleNewPaymentCollector(event: NewPaymentCollector): void {
|
||||
const token = getToken(event.address, true)
|
||||
token.paymentCollector = event.params._newPaymentCollector.toHexString()
|
||||
token.eventIndex = event.logIndex
|
||||
token.save()
|
||||
}
|
||||
|
||||
|
@ -254,7 +245,6 @@ export function handleProviderFee(event: ProviderFee): void {
|
|||
if (order) {
|
||||
order.providerFee = providerFee
|
||||
order.providerFeeValidUntil = event.params.validUntil
|
||||
order.eventIndex = event.logIndex
|
||||
order.save()
|
||||
return
|
||||
}
|
||||
|
@ -263,7 +253,6 @@ export function handleProviderFee(event: ProviderFee): void {
|
|||
if (orderReuse) {
|
||||
orderReuse.providerFee = providerFee
|
||||
orderReuse.providerFeeValidUntil = event.params.validUntil
|
||||
orderReuse.eventIndex = event.logIndex
|
||||
orderReuse.save()
|
||||
} else {
|
||||
orderReuse = new OrderReuse(event.transaction.hash.toHex())
|
||||
|
@ -280,7 +269,6 @@ export function handleProviderFee(event: ProviderFee): void {
|
|||
if (event.receipt !== null && event.receipt!.gasUsed) {
|
||||
orderReuse.gasUsed = event.receipt!.gasUsed.toBigDecimal()
|
||||
} else orderReuse.gasUsed = BigDecimal.zero()
|
||||
orderReuse.eventIndex = event.logIndex
|
||||
orderReuse.save()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ export function handleNftCreated(event: NFTCreated): void {
|
|||
nft.tx = event.transaction.hash.toHex()
|
||||
nft.block = event.block.number.toI32()
|
||||
nft.transferable = event.params.transferable
|
||||
nft.eventIndex = event.logIndex
|
||||
|
||||
nft.save()
|
||||
}
|
||||
|
@ -66,7 +65,7 @@ export function handleNewToken(event: TokenCreated): void {
|
|||
token.templateId = 1 + i
|
||||
}
|
||||
}
|
||||
token.eventIndex = event.logIndex
|
||||
|
||||
token.save()
|
||||
addDatatoken()
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ export function handleOPCFeeChanged(event: OPCFeeChanged): void {
|
|||
event.params.newProviderFee.toBigDecimal(),
|
||||
decimals
|
||||
)
|
||||
opc.eventIndex = event.logIndex
|
||||
opc.save()
|
||||
}
|
||||
|
||||
|
@ -74,7 +73,6 @@ export function handleTokenAdded(event: TokenAdded): void {
|
|||
|
||||
opc.approvedTokens = existingTokens
|
||||
|
||||
opc.eventIndex = event.logIndex
|
||||
opc.save()
|
||||
}
|
||||
|
||||
|
@ -91,7 +89,6 @@ export function handleTokenRemoved(event: TokenRemoved): void {
|
|||
if (role != event.params.token.toHexString()) newList.push(role)
|
||||
}
|
||||
opc.approvedTokens = newList
|
||||
opc.eventIndex = event.logIndex
|
||||
opc.save()
|
||||
}
|
||||
export function handleSSContractAdded(event: SSContractAdded): void {
|
||||
|
@ -103,7 +100,6 @@ export function handleSSContractAdded(event: SSContractAdded): void {
|
|||
if (!existingContracts.includes(event.params.contractAddress.toHexString()))
|
||||
existingContracts.push(event.params.contractAddress.toHexString())
|
||||
templates.ssTemplates = existingContracts
|
||||
templates.eventIndex = event.logIndex
|
||||
templates.save()
|
||||
}
|
||||
export function handleSSContractRemoved(event: SSContractRemoved): void {
|
||||
|
@ -119,7 +115,6 @@ export function handleSSContractRemoved(event: SSContractRemoved): void {
|
|||
if (role != event.params.contractAddress.toHexString()) newList.push(role)
|
||||
}
|
||||
templates.ssTemplates = newList
|
||||
templates.eventIndex = event.logIndex
|
||||
templates.save()
|
||||
}
|
||||
|
||||
|
@ -135,7 +130,6 @@ export function handleFixedRateContractAdded(
|
|||
if (!existingContracts.includes(event.params.contractAddress.toHexString()))
|
||||
existingContracts.push(event.params.contractAddress.toHexString())
|
||||
templates.fixedRateTemplates = existingContracts
|
||||
templates.eventIndex = event.logIndex
|
||||
templates.save()
|
||||
}
|
||||
export function handleFixedRateContractRemoved(
|
||||
|
@ -153,7 +147,6 @@ export function handleFixedRateContractRemoved(
|
|||
if (role != event.params.contractAddress.toHexString()) newList.push(role)
|
||||
}
|
||||
templates.fixedRateTemplates = newList
|
||||
templates.eventIndex = event.logIndex
|
||||
templates.save()
|
||||
}
|
||||
export function handleDispenserContractAdded(
|
||||
|
@ -168,7 +161,6 @@ export function handleDispenserContractAdded(
|
|||
if (!existingContracts.includes(event.params.contractAddress.toHexString()))
|
||||
existingContracts.push(event.params.contractAddress.toHexString())
|
||||
templates.dispenserTemplates = existingContracts
|
||||
templates.eventIndex = event.logIndex
|
||||
templates.save()
|
||||
}
|
||||
export function handleDispenserContractRemoved(
|
||||
|
@ -186,6 +178,5 @@ export function handleDispenserContractRemoved(
|
|||
if (role != event.params.contractAddress.toHexString()) newList.push(role)
|
||||
}
|
||||
templates.dispenserTemplates = newList
|
||||
templates.eventIndex = event.logIndex
|
||||
templates.save()
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ export function handleExchangeCreated(event: ExchangeCreated): void {
|
|||
fixedRateExchange.createdTimestamp = event.block.timestamp.toI32()
|
||||
fixedRateExchange.tx = event.transaction.hash.toHex()
|
||||
fixedRateExchange.block = event.block.number.toI32()
|
||||
fixedRateExchange.eventIndex = event.logIndex
|
||||
fixedRateExchange.save()
|
||||
|
||||
addFixedRateExchange()
|
||||
|
@ -78,7 +77,6 @@ export function handleRateChange(event: ExchangeRateChanged): void {
|
|||
BigInt.fromI32(18).toI32()
|
||||
)
|
||||
newExchangeUpdate.newPrice = fixedRateExchange.price
|
||||
newExchangeUpdate.eventIndex = event.logIndex
|
||||
|
||||
newExchangeUpdate.save()
|
||||
fixedRateExchange.save()
|
||||
|
@ -91,7 +89,6 @@ export function handleMintStateChanged(event: ExchangeMintStateChanged): void {
|
|||
)
|
||||
const fixedRateExchange = getFixedRateExchange(fixedRateId)
|
||||
fixedRateExchange.withMint = event.params.withMint
|
||||
fixedRateExchange.eventIndex = event.logIndex
|
||||
fixedRateExchange.save()
|
||||
}
|
||||
|
||||
|
@ -112,7 +109,6 @@ export function handleActivated(event: ExchangeActivated): void {
|
|||
newExchangeUpdate.block = event.block.number.toI32()
|
||||
|
||||
fixedRateExchange.active = true
|
||||
newExchangeUpdate.eventIndex = event.logIndex
|
||||
|
||||
newExchangeUpdate.save()
|
||||
fixedRateExchange.save()
|
||||
|
@ -136,7 +132,6 @@ export function handleDeactivated(event: ExchangeDeactivated): void {
|
|||
newExchangeUpdate.block = event.block.number.toI32()
|
||||
|
||||
fixedRateExchange.active = false
|
||||
newExchangeUpdate.eventIndex = event.logIndex
|
||||
newExchangeUpdate.save()
|
||||
fixedRateExchange.save()
|
||||
}
|
||||
|
@ -159,7 +154,6 @@ export function handleAllowedSwapperChanged(
|
|||
newExchangeUpdate.exchangeId = fixedRateId
|
||||
fixedRateExchange.allowedSwapper = event.params.allowedSwapper.toHex()
|
||||
newExchangeUpdate.newAllowedSwapper = fixedRateExchange.allowedSwapper
|
||||
newExchangeUpdate.eventIndex = event.logIndex
|
||||
newExchangeUpdate.save()
|
||||
fixedRateExchange.save()
|
||||
}
|
||||
|
@ -211,7 +205,6 @@ export function handleSwap(event: Swapped): void {
|
|||
BigInt.fromI32(baseToken.decimals).toI32()
|
||||
)
|
||||
|
||||
swap.eventIndex = event.logIndex
|
||||
swap.save()
|
||||
|
||||
updateFixedRateExchangeSupply(event.params.exchangeId, event.address)
|
||||
|
@ -233,7 +226,6 @@ export function handleSwap(event: Swapped): void {
|
|||
)
|
||||
datatoken.lastPriceToken = priceToken.id
|
||||
datatoken.lastPriceValue = fixedRateExchange.price
|
||||
datatoken.eventIndex = event.logIndex
|
||||
datatoken.save()
|
||||
}
|
||||
|
||||
|
@ -252,7 +244,6 @@ export function handlePublishMarketFeeChanged(
|
|||
event.params.swapFee.toBigDecimal(),
|
||||
BigInt.fromI32(18).toI32()
|
||||
)
|
||||
fixedRateExchange.eventIndex = event.logIndex
|
||||
fixedRateExchange.save()
|
||||
}
|
||||
}
|
||||
|
@ -270,7 +261,7 @@ export function handleTokenCollected(event: TokenCollected): void {
|
|||
fixedRateExchange.baseTokenBalance.minus(
|
||||
weiToDecimal(event.params.amount.toBigDecimal(), baseToken.decimals)
|
||||
)
|
||||
fixedRateExchange.eventIndex = event.logIndex
|
||||
|
||||
fixedRateExchange.save()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,8 +48,6 @@ export function handleMetadataCreated(event: MetadataCreated): void {
|
|||
nftUpdate.timestamp = event.block.timestamp.toI32()
|
||||
nftUpdate.tx = event.transaction.hash.toHex()
|
||||
nftUpdate.block = event.block.number.toI32()
|
||||
nftUpdate.eventIndex = event.logIndex
|
||||
nft.eventIndex = event.logIndex
|
||||
|
||||
nftUpdate.save()
|
||||
nft.save()
|
||||
|
@ -74,8 +72,6 @@ export function handleMetadataUpdated(event: MetadataUpdated): void {
|
|||
nftUpdate.timestamp = event.block.timestamp.toI32()
|
||||
nftUpdate.tx = event.transaction.hash.toHex()
|
||||
nftUpdate.block = event.block.number.toI32()
|
||||
nftUpdate.eventIndex = event.logIndex
|
||||
nft.eventIndex = event.logIndex
|
||||
|
||||
nftUpdate.save()
|
||||
nft.save()
|
||||
|
@ -100,8 +96,6 @@ export function handleMetadataState(event: MetadataState): void {
|
|||
nftUpdate.timestamp = event.block.timestamp.toI32()
|
||||
nftUpdate.tx = event.transaction.hash.toHex()
|
||||
nftUpdate.block = event.block.number.toI32()
|
||||
nftUpdate.eventIndex = event.logIndex
|
||||
nft.eventIndex = event.logIndex
|
||||
|
||||
nftUpdate.save()
|
||||
nft.save()
|
||||
|
@ -126,8 +120,6 @@ export function handleTokenUriUpdate(event: TokenURIUpdate): void {
|
|||
nftUpdate.tx = event.transaction.hash.toHex()
|
||||
nftUpdate.block = event.block.number.toI32()
|
||||
nftUpdate.assetState = nft.assetState
|
||||
nftUpdate.eventIndex = event.logIndex
|
||||
nft.eventIndex = event.logIndex
|
||||
nftUpdate.save()
|
||||
nft.save()
|
||||
}
|
||||
|
@ -141,7 +133,6 @@ export function handleAddedManager(event: AddedManager): void {
|
|||
if (!existingRoles.includes(event.params.user.toHexString()))
|
||||
existingRoles.push(event.params.user.toHexString())
|
||||
nft.managerRole = existingRoles
|
||||
nft.eventIndex = event.logIndex
|
||||
nft.save()
|
||||
}
|
||||
export function handleRemovedManager(event: RemovedManager): void {
|
||||
|
@ -157,7 +148,6 @@ export function handleRemovedManager(event: RemovedManager): void {
|
|||
if (role !== event.params.user.toHexString()) newList.push(role)
|
||||
}
|
||||
nft.managerRole = newList
|
||||
nft.eventIndex = event.logIndex
|
||||
nft.save()
|
||||
}
|
||||
|
||||
|
@ -170,7 +160,6 @@ export function handleAddedTo725StoreList(event: AddedTo725StoreList): void {
|
|||
if (!existingRoles.includes(event.params.user.toHexString()))
|
||||
existingRoles.push(event.params.user.toHexString())
|
||||
nft.storeUpdateRole = existingRoles
|
||||
nft.eventIndex = event.logIndex
|
||||
nft.save()
|
||||
}
|
||||
|
||||
|
@ -189,7 +178,6 @@ export function handleRemovedFrom725StoreList(
|
|||
if (role !== event.params.user.toHexString()) newList.push(role)
|
||||
}
|
||||
nft.storeUpdateRole = newList
|
||||
nft.eventIndex = event.logIndex
|
||||
nft.save()
|
||||
}
|
||||
|
||||
|
@ -204,7 +192,6 @@ export function handleAddedToCreateERC20List(
|
|||
if (!existingRoles.includes(event.params.user.toHexString()))
|
||||
existingRoles.push(event.params.user.toHexString())
|
||||
nft.erc20DeployerRole = existingRoles
|
||||
nft.eventIndex = event.logIndex
|
||||
nft.save()
|
||||
}
|
||||
|
||||
|
@ -223,7 +210,6 @@ export function handleRemovedFromCreateERC20List(
|
|||
if (role !== event.params.user.toHexString()) newList.push(role)
|
||||
}
|
||||
nft.erc20DeployerRole = newList
|
||||
nft.eventIndex = event.logIndex
|
||||
nft.save()
|
||||
}
|
||||
|
||||
|
@ -254,7 +240,6 @@ export function handleRemovedFromMetadataList(
|
|||
if (role !== event.params.user.toHexString()) newList.push(role)
|
||||
}
|
||||
nft.metadataRole = newList
|
||||
nft.eventIndex = event.logIndex
|
||||
nft.save()
|
||||
}
|
||||
|
||||
|
@ -265,7 +250,6 @@ export function handleCleanedPermissions(event: CleanedPermissions): void {
|
|||
nft.erc20DeployerRole = newList
|
||||
nft.storeUpdateRole = newList
|
||||
nft.managerRole = newList
|
||||
nft.eventIndex = event.logIndex
|
||||
nft.save()
|
||||
}
|
||||
|
||||
|
@ -275,7 +259,6 @@ export function handleNftTransferred(event: Transfer): void {
|
|||
const oldOwner = nft.owner
|
||||
const newOwner = getUser(event.params.to.toHexString())
|
||||
nft.owner = newOwner.id
|
||||
nft.eventIndex = event.logIndex
|
||||
nft.save()
|
||||
|
||||
const transferId = `${nft.address}-${event.transaction.hash.toHex()}-${
|
||||
|
@ -288,7 +271,6 @@ export function handleNftTransferred(event: Transfer): void {
|
|||
newTransfer.txId = event.transaction.hash.toHex()
|
||||
newTransfer.timestamp = event.block.timestamp.toI32()
|
||||
newTransfer.block = event.block.number.toI32()
|
||||
newTransfer.eventIndex = event.logIndex
|
||||
newTransfer.save()
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ export function createToken(address: Address, isDatatoken: boolean): Token {
|
|||
token.createdTimestamp = 0
|
||||
token.block = 0
|
||||
token.tx = ''
|
||||
token.eventIndex = BigInt.zero()
|
||||
token.save()
|
||||
return token
|
||||
}
|
||||
|
@ -61,7 +60,6 @@ export function createNftToken(address: Address): Nft {
|
|||
token.tx = ''
|
||||
token.orderCount = BigInt.zero()
|
||||
token.hasMetadata = false
|
||||
token.eventIndex = BigInt.zero()
|
||||
token.save()
|
||||
addNft()
|
||||
return token
|
||||
|
@ -95,7 +93,6 @@ export function getNftTokenWithID(tokenId: string): Nft {
|
|||
nftToken.tx = ''
|
||||
nftToken.orderCount = BigInt.zero()
|
||||
nftToken.hasMetadata = false
|
||||
nftToken.eventIndex = BigInt.zero()
|
||||
nftToken.save()
|
||||
addNft()
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ export function getveAllocateUser(
|
|||
allocateUser.lastContact = 0
|
||||
const veOcean = getveOCEAN(sender)
|
||||
allocateUser.veOcean = veOcean.id
|
||||
allocateUser.eventIndex = event.logIndex
|
||||
|
||||
allocateUser.save()
|
||||
}
|
||||
|
@ -65,7 +64,6 @@ export function getveAllocateId(
|
|||
allocateId.lastContact = 0
|
||||
allocateId.chainId = BigInt.zero()
|
||||
allocateId.nftAddress = ''
|
||||
allocateId.eventIndex = event.logIndex
|
||||
|
||||
allocateId.save()
|
||||
}
|
||||
|
@ -91,7 +89,6 @@ export function getveAllocation(
|
|||
veAllocation.tx = event.transaction.hash.toHex()
|
||||
veAllocation.block = event.block.number.toI32()
|
||||
veAllocation.lastContact = 0
|
||||
veAllocation.eventIndex = event.logIndex
|
||||
|
||||
veAllocation.save()
|
||||
}
|
||||
|
@ -117,7 +114,6 @@ export function writeveAllocationUpdate(
|
|||
allocationUpdate.timestamp = event.block.timestamp.toI32()
|
||||
allocationUpdate.tx = event.transaction.hash.toHex()
|
||||
allocationUpdate.block = event.block.number.toI32()
|
||||
allocationUpdate.eventIndex = event.logIndex
|
||||
|
||||
allocationUpdate.save()
|
||||
}
|
||||
|
@ -137,7 +133,6 @@ export function getveDelegation(id: string): VeDelegation {
|
|||
veDelegation.receiver = ''
|
||||
veDelegation.delegator = ''
|
||||
veDelegation.block = 0
|
||||
veDelegation.eventIndex = BigInt.zero()
|
||||
veDelegation.save()
|
||||
}
|
||||
return veDelegation
|
||||
|
@ -156,7 +151,6 @@ export function getDeposit(id: string): VeDeposit {
|
|||
deposit.timestamp = BigInt.zero()
|
||||
deposit.tx = ''
|
||||
deposit.block = 0
|
||||
deposit.eventIndex = BigInt.zero()
|
||||
// do not save it
|
||||
// deposit.save()
|
||||
}
|
||||
|
@ -207,10 +201,6 @@ export function handleOneAllocation(
|
|||
allocateId.chainId = chainId
|
||||
allocateId.nftAddress = nftAddress
|
||||
|
||||
allocateUser.eventIndex = event.logIndex
|
||||
allocateId.eventIndex = event.logIndex
|
||||
veAllocation.eventIndex = event.logIndex
|
||||
|
||||
// save entities
|
||||
allocateUser.save()
|
||||
allocateId.save()
|
||||
|
|
|
@ -24,7 +24,6 @@ export function handleDelegation(event: DelegateBoost): void {
|
|||
veDelegation.cancelTime = _cancelTime
|
||||
veDelegation.expireTime = _expireTime
|
||||
veDelegation.block = event.block.number.toI32()
|
||||
veDelegation.eventIndex = event.logIndex
|
||||
veDelegation.save()
|
||||
}
|
||||
|
||||
|
@ -43,7 +42,6 @@ export function handleExtendBoost(event: ExtendBoost): void {
|
|||
veDelegation.amount = _amount
|
||||
veDelegation.cancelTime = _cancelTime
|
||||
veDelegation.expireTime = _expireTime
|
||||
veDelegation.eventIndex = event.logIndex
|
||||
veDelegation.save()
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ export function handleClaimed(event: Claimed): void {
|
|||
claim.block = event.block.number.toI32()
|
||||
claim.tx = event.transaction.hash.toHex()
|
||||
claim.timestamp = event.block.timestamp
|
||||
claim.eventIndex = event.logIndex
|
||||
claim.save()
|
||||
}
|
||||
|
||||
|
@ -47,6 +46,5 @@ export function handleCheckpoint(event: CheckpointToken): void {
|
|||
checkpoint.tx = event.transaction.hash.toHex()
|
||||
checkpoint.timestamp = event.params.time
|
||||
checkpoint.VeFeeDistributor = distributor.id
|
||||
checkpoint.eventIndex = event.logIndex
|
||||
checkpoint.save()
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ export function handleDeposit(event: Deposit): void {
|
|||
deposit.tx = event.transaction.hash.toHex()
|
||||
deposit.sender = event.transaction.from.toHex()
|
||||
deposit.veOcean = veOCEAN.id
|
||||
deposit.eventIndex = event.logIndex
|
||||
deposit.save()
|
||||
// --------------------------------------------
|
||||
|
||||
|
@ -62,7 +61,6 @@ export function handleWithdraw(event: Withdraw): void {
|
|||
deposit.tx = event.transaction.hash.toHex()
|
||||
deposit.sender = event.transaction.from.toHex()
|
||||
deposit.veOcean = veOCEAN.id
|
||||
deposit.eventIndex = event.logIndex
|
||||
deposit.save()
|
||||
// --------------------------------------------
|
||||
|
||||
|
|
|
@ -159,7 +159,6 @@ describe('DFRewards tests', async () => {
|
|||
}
|
||||
type
|
||||
tx
|
||||
eventIndex
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
@ -220,7 +219,6 @@ describe('DFRewards tests', async () => {
|
|||
}
|
||||
type
|
||||
tx
|
||||
eventIndex
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
|
|
@ -162,20 +162,17 @@ describe('Datatoken tests', async () => {
|
|||
createdTimestamp,
|
||||
tx,
|
||||
block,
|
||||
lastPriceValue,
|
||||
eventIndex
|
||||
lastPriceValue
|
||||
}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(initialQuery)
|
||||
})
|
||||
await sleep(2500)
|
||||
await sleep(2000)
|
||||
const dt = (await initialResponse.json()).data.token
|
||||
assert(dt !== undefined, 'undefined token')
|
||||
const dtTx = dt.tx
|
||||
|
||||
const tx: TransactionReceipt = await web3.eth.getTransactionReceipt(dtTx)
|
||||
const tx: TransactionReceipt = await web3.eth.getTransactionReceipt(dt.tx)
|
||||
assert(dt.id === datatokenAddress, 'incorrect value for: id')
|
||||
assert(dt.symbol, 'incorrect value for: symbol')
|
||||
assert(dt.name, 'incorrect value for: name')
|
||||
|
@ -273,8 +270,7 @@ describe('Datatoken tests', async () => {
|
|||
createdTimestamp,
|
||||
tx,
|
||||
block,
|
||||
lastPriceValue,
|
||||
eventIndex
|
||||
lastPriceValue
|
||||
}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
|
@ -283,10 +279,8 @@ describe('Datatoken tests', async () => {
|
|||
})
|
||||
await sleep(2000)
|
||||
const dt = (await initialResponse.json()).data.token
|
||||
assert(dt !== undefined, 'undefined token')
|
||||
const dtTx = dt.tx
|
||||
|
||||
const tx: TransactionReceipt = await web3.eth.getTransactionReceipt(dtTx)
|
||||
const tx: TransactionReceipt = await web3.eth.getTransactionReceipt(dt.tx)
|
||||
assert(dt.id === datatokenAddress, 'incorrect value for: id')
|
||||
assert(dt.symbol, 'incorrect value for: symbol')
|
||||
assert(dt.name, 'incorrect value for: name')
|
||||
|
@ -364,7 +358,7 @@ describe('Datatoken tests', async () => {
|
|||
assert(Number(user2balance) === 0, 'Invalid user2 balance')
|
||||
|
||||
const query = {
|
||||
query: `query {token(id: "${newDtAddress.toLowerCase()}"){id,orderCount,orders {id, nftOwner{id}, lastPriceToken{id}},eventIndex}}`
|
||||
query: `query {token(id: "${newDtAddress.toLowerCase()}"){id,orderCount,orders {id, nftOwner{id}, lastPriceToken{id}}}}`
|
||||
}
|
||||
|
||||
await sleep(2000)
|
||||
|
|
|
@ -139,8 +139,7 @@ describe('Dispenser tests', async () => {
|
|||
createdTimestamp,
|
||||
tx,
|
||||
block,
|
||||
orderCount,
|
||||
eventIndex}}`
|
||||
orderCount}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -203,8 +202,7 @@ describe('Dispenser tests', async () => {
|
|||
createdTimestamp,
|
||||
tx,
|
||||
block,
|
||||
lastPriceValue,
|
||||
eventIndex
|
||||
lastPriceValue
|
||||
}}`
|
||||
}
|
||||
const dtResponse = await fetch(subgraphUrl, {
|
||||
|
@ -264,7 +262,7 @@ describe('Dispenser tests', async () => {
|
|||
assert((await datatoken.getPermissions(dtAddress, user1)).minter === true)
|
||||
await sleep(sleepMs)
|
||||
const minterQuery = {
|
||||
query: `query {token(id: "${dtAddress}"){minter{id},eventIndex}}`
|
||||
query: `query {token(id: "${dtAddress}"){minter{id}}}`
|
||||
}
|
||||
|
||||
const minterResponse = await fetch(subgraphUrl, {
|
||||
|
@ -315,7 +313,6 @@ describe('Dispenser tests', async () => {
|
|||
dispenses {
|
||||
id
|
||||
}
|
||||
eventIndex
|
||||
__typename
|
||||
}}`
|
||||
}
|
||||
|
@ -345,7 +342,7 @@ describe('Dispenser tests', async () => {
|
|||
|
||||
it('Deactivates dispenser', async () => {
|
||||
const deactiveQuery = {
|
||||
query: `query {dispenser(id: "${dispenserId}"){active,eventIndex}}`
|
||||
query: `query {dispenser(id: "${dispenserId}"){active}}`
|
||||
}
|
||||
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
|
@ -371,7 +368,7 @@ describe('Dispenser tests', async () => {
|
|||
|
||||
it('Activates exchange', async () => {
|
||||
const activeQuery = {
|
||||
query: `query {dispenser(id: "${dispenserId}"){active,eventIndex}}`
|
||||
query: `query {dispenser(id: "${dispenserId}"){active}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -405,7 +402,6 @@ describe('Dispenser tests', async () => {
|
|||
block
|
||||
createdTimestamp
|
||||
tx
|
||||
eventIndex
|
||||
__typename
|
||||
}}}`
|
||||
}
|
||||
|
@ -444,7 +440,7 @@ describe('Dispenser tests', async () => {
|
|||
|
||||
// Check balance after owner withdraw
|
||||
const balanceQuery = {
|
||||
query: `query {dispenser(id: "${dispenserId}"){balance,eventIndex}}`
|
||||
query: `query {dispenser(id: "${dispenserId}"){balance}}`
|
||||
}
|
||||
|
||||
const response = await fetch(subgraphUrl, {
|
||||
|
@ -458,7 +454,7 @@ describe('Dispenser tests', async () => {
|
|||
|
||||
it('Updates allowed swapper', async () => {
|
||||
const swapperQuery = {
|
||||
query: `query {dispenser(id: "${dispenserId}"){allowedSwapper,eventIndex}}`
|
||||
query: `query {dispenser(id: "${dispenserId}"){allowedSwapper}}`
|
||||
}
|
||||
// Check initial allowedSwapper
|
||||
const swapperResponse1 = await fetch(subgraphUrl, {
|
||||
|
|
|
@ -50,7 +50,6 @@ async function getSubgraphApprovedTokens() {
|
|||
id
|
||||
}
|
||||
}
|
||||
eventIndex
|
||||
}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
|
|
|
@ -152,8 +152,7 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
createdTimestamp,
|
||||
tx,
|
||||
block,
|
||||
orderCount,
|
||||
eventIndex}}`
|
||||
orderCount}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -223,8 +222,7 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
tx,
|
||||
block,
|
||||
lastPriceToken,
|
||||
lastPriceValue,
|
||||
eventIndex
|
||||
lastPriceValue
|
||||
}}`
|
||||
}
|
||||
const dtResponse = await fetch(subgraphUrl, {
|
||||
|
@ -314,8 +312,7 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
tx
|
||||
block
|
||||
publishMarketFeeAddress
|
||||
publishMarketSwapFee,
|
||||
eventIndex
|
||||
publishMarketSwapFee
|
||||
}
|
||||
}`
|
||||
}
|
||||
|
@ -401,7 +398,6 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
}
|
||||
oldPrice
|
||||
newPrice
|
||||
eventIndex
|
||||
}
|
||||
}}`
|
||||
}
|
||||
|
@ -471,7 +467,7 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
})
|
||||
it('Deactivates exchange', async () => {
|
||||
const deactiveQuery = {
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){active,eventIndex}}`
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){active}}`
|
||||
}
|
||||
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
|
@ -498,7 +494,7 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
|
||||
it('Activates exchange', async () => {
|
||||
const activeQuery = {
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){active,eventIndex}}`
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){active}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -524,7 +520,7 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
|
||||
it('Activate Minting', async () => {
|
||||
const mintingQuery = {
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){withMint,eventIndex}}`
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){withMint}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -551,7 +547,7 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
|
||||
it('Deactivate Minting', async () => {
|
||||
const mintingQuery = {
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){withMint,eventIndex}}`
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){withMint}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -591,7 +587,6 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
oceanFeeAmount
|
||||
marketFeeAmount
|
||||
consumeMarketFeeAmount
|
||||
eventIndex
|
||||
__typename
|
||||
}
|
||||
}}`
|
||||
|
@ -697,7 +692,6 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
createdTimestamp
|
||||
tx
|
||||
oceanFeeAmount
|
||||
eventIndex
|
||||
__typename
|
||||
}
|
||||
}}`
|
||||
|
@ -726,7 +720,7 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||
|
||||
it('Updates allowed swapper', async () => {
|
||||
const swapperQuery = {
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){allowedSwapper,eventIndex}}`
|
||||
query: `query {fixedRateExchange(id: "${fixedRateId}"){allowedSwapper}}`
|
||||
}
|
||||
// Check initial allowedSwapper
|
||||
const swapperResponse1 = await fetch(subgraphUrl, {
|
||||
|
|
|
@ -144,8 +144,7 @@ describe('NFT tests', async () => {
|
|||
createdTimestamp,
|
||||
tx,
|
||||
block,
|
||||
orderCount,
|
||||
eventIndex}}`
|
||||
orderCount}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -234,8 +233,7 @@ describe('NFT tests', async () => {
|
|||
createdTimestamp,
|
||||
tx,
|
||||
block,
|
||||
orderCount,
|
||||
eventIndex}}`
|
||||
orderCount}}`
|
||||
}
|
||||
const response = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
|
|
@ -152,7 +152,7 @@ describe('Simple Publish & consume test', async () => {
|
|||
const graphNftToken = erc721Address.toLowerCase()
|
||||
const query = {
|
||||
query: `query {
|
||||
nft(id:"${graphNftToken}"){symbol,id,eventIndex}}`
|
||||
nft(id:"${graphNftToken}"){symbol,id}}`
|
||||
}
|
||||
const response = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -191,7 +191,7 @@ describe('Simple Publish & consume test', async () => {
|
|||
|
||||
const queryOriginalOwner = {
|
||||
query: `query {
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner{id},eventIndex}}`
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner{id}}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -235,7 +235,7 @@ describe('Simple Publish & consume test', async () => {
|
|||
await sleep(2000)
|
||||
const query2 = {
|
||||
query: `query {
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner{id}, transferable,eventIndex}}`
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner{id}, transferable}}`
|
||||
}
|
||||
const response = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -283,7 +283,7 @@ describe('Simple Publish & consume test', async () => {
|
|||
const orderId = `${orderTx.transactionHash.toLowerCase()}-${datatokenAddress.toLowerCase()}-${user1.toLowerCase()}`
|
||||
|
||||
const query = {
|
||||
query: `query {order(id:"${orderId}"){id, providerFee, lastPriceToken{id}, eventIndex}}`
|
||||
query: `query {order(id:"${orderId}"){id, providerFee, lastPriceToken{id}}}`
|
||||
}
|
||||
|
||||
await sleep(2000)
|
||||
|
@ -357,7 +357,7 @@ describe('Simple Publish & consume test', async () => {
|
|||
const orderId = `${orderTx.transactionHash.toLowerCase()}-${datatokenAddress.toLowerCase()}-${user4.toLowerCase()}`
|
||||
|
||||
const initialQuery = {
|
||||
query: `query {order(id:"${orderId}"){id, providerFee, lastPriceToken{id}, eventIndex}}`
|
||||
query: `query {order(id:"${orderId}"){id, providerFee, lastPriceToken{id}}}`
|
||||
}
|
||||
await sleep(2000)
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
|
@ -426,7 +426,7 @@ describe('Simple Publish & consume test', async () => {
|
|||
// Check the new provider fee has been set in OrderReuse
|
||||
|
||||
const reuseQuery = {
|
||||
query: `query {orderReuse(id:"${reusedOrder.transactionHash}"){id, providerFee, eventIndex}}`
|
||||
query: `query {orderReuse(id:"${reusedOrder.transactionHash}"){id, providerFee}}`
|
||||
}
|
||||
|
||||
await sleep(2000)
|
||||
|
|
|
@ -73,7 +73,7 @@ describe('Tests coverage without provider/aquarius', async () => {
|
|||
const graphNftToken = erc721Address.toLowerCase()
|
||||
const query = {
|
||||
query: `query {
|
||||
nft(id:"${graphNftToken}"){symbol,id,eventIndex}}`
|
||||
nft(id:"${graphNftToken}"){symbol,id}}`
|
||||
}
|
||||
const response = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
|
@ -125,7 +125,7 @@ describe('Tests coverage without provider/aquarius', async () => {
|
|||
id,
|
||||
owner{id},
|
||||
transferable,
|
||||
transferHistory(orderBy: timestamp, orderDirection: desc){id,nft,oldOwner,newOwner,txId,timestamp,block,eventIndex}
|
||||
transferHistory(orderBy: timestamp, orderDirection: desc){id,nft,oldOwner,newOwner,txId,timestamp,block}
|
||||
}}`
|
||||
}
|
||||
const response = await fetch(subgraphUrl, {
|
||||
|
|
Loading…
Reference in New Issue