Skip to content

Commit 6ad5886

Browse files
committed
fix: debug missing price updates
1 parent 71cf6c8 commit 6ad5886

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/sdk/market/PriceOracleBaseContract.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,14 @@ export class PriceOracleBaseContract<abi extends Abi | readonly unknown[]>
151151
const { txs } = updates;
152152

153153
for (const tx of txs) {
154-
const { to: priceFeed, callData } = tx;
154+
const { to: priceFeed, callData, description } = tx;
155155
const [token, reserve] = this.findTokenForPriceFeed(priceFeed);
156156
// this situation happend when we have combined updates from multiple markrts,
157157
// but this particular feed is not added to this particular oracle
158158
if (!token) {
159+
this.logger?.debug(
160+
`skipping onDemandPriceUpdate ${description}): token not found for price feed ${priceFeed} in oracle ${this.address}`,
161+
);
159162
continue;
160163
}
161164
const { args } = decodeFunctionData({
@@ -170,6 +173,9 @@ export class PriceOracleBaseContract<abi extends Abi | readonly unknown[]>
170173
data,
171174
});
172175
}
176+
this.logger?.debug(
177+
`got ${result.length} onDemandPriceUpdates from ${txs.length} txs`,
178+
);
173179
return result;
174180
}
175181

src/sdk/market/pricefeeds/RedstoneUpdater.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class RedstoneUpdater extends SDKConstruct {
8181
tx: priceFeed.createRawTx({
8282
functionName: "updatePrice",
8383
args: [data as Hex],
84-
description: `updating price for ${dataFeedId} [${priceFeed.address}]`,
84+
description: `updating price for ${dataFeedId} [${this.sdk.provider.addressLabels.get(priceFeed.address)}]`,
8585
}),
8686
timestamp,
8787
});

0 commit comments

Comments
 (0)