Conversation
…ions Fix broken transactions
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| error, | ||
| error.stack, | ||
| ); | ||
| return undefined; |
There was a problem hiding this comment.
New code breaks contract caching, returns stale/undefined value
High Severity
The newly inserted lines 396–418 in getTokenContractsBySaleAddress are placed before the original contract-caching assignment at lines 419–424. Line 396 does return this.contracts[saleAddress] immediately after fetching instance and tokenContractInstance, but before they are stored into this.contracts[saleAddress]. Since the cache guard at line 379 already returned early for cached entries, this.contracts[saleAddress] is undefined here, so the function always returns undefined for uncached addresses. Additionally, return undefined at line 418 makes the original caching code (lines 419–424) and the original retry-capable catch block (line 427) completely unreachable dead code. This breaks token creation, price syncing, and all callers of this method.


Note
Medium Risk
Touches core transaction validation/processing and event decoding logic, so mistakes could skip or mis-derive trades; changes are localized and covered by new unit tests.
Overview
Improves BCL transaction ingestion robustness by allowing reprocessing of previously persisted broken buy/sell rows (zero volume /
NaNprice fields) and by skipping failed/reverted transactions based onreturnType/return_type.Adds a raw
tx.raw.logfallback decoder inTransactionsService.decodeTxEvents()for buy/sell/create flows when ABI decoding yields no events, and makesTransactionProcessorServicethrow on live buy/sell transactions that still lack decoded events (to force later reprocessing) instead of persisting derived zero/NaNdata.Hardens a few edges:
TransactionsController.listTransactions()now returns an empty page when token lookup fails, andTokensService.getTokenContractsBySaleAddress()treats common bytecode/ACI mismatch errors as “unsupported contract” (warn + returnundefined). Tests were added/updated to cover the new validation, fallback decoding, and controller behavior.Written by Cursor Bugbot for commit f3923a8. This will update automatically on new commits. Configure here.