From 7ef2da482aa8d2a1faa59f608357c26f64aa8b26 Mon Sep 17 00:00:00 2001 From: Ed Noepel Date: Thu, 5 Oct 2023 11:34:22 -0400 Subject: [PATCH] assign pool in mergeOrRemove entity --- src/mappings/erc-721-pool.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mappings/erc-721-pool.ts b/src/mappings/erc-721-pool.ts index ab2ec73..17a5b5b 100644 --- a/src/mappings/erc-721-pool.ts +++ b/src/mappings/erc-721-pool.ts @@ -1,4 +1,4 @@ -import { ByteArray, Bytes, ethereum } from "@graphprotocol/graph-ts" +import { ByteArray, Bytes, ethereum, log } from "@graphprotocol/graph-ts" import { AddCollateralNFT as AddCollateralNFTEvent, AddQuoteToken as AddQuoteTokenEvent, @@ -355,6 +355,7 @@ export function handleMergeOrRemoveCollateralNFT( // use transaction metadata to access the list of removalIndexes const dataWithoutSelector = event.transaction.input.subarray(4) + log.warning("mergeOrRemove event.transaction.input {}", [event.transaction.input.toHexString()]) //prepend a "tuple" prefix (function params are arrays, not tuples) const tuplePrefix = ByteArray.fromHexString( '0x0000000000000000000000000000000000000000000000000000000000000020' @@ -405,6 +406,7 @@ export function handleMergeOrRemoveCollateralNFT( pool.bucketTokenIds = findAndRemoveTokenIds(tokenIdsToRemove, pool.bucketTokenIds) } + mergeOrRemove.pool = pool.id updateAccountPools(account, pool) // save entities to store