Repository navigation
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…dler Update Polygon donation handler allowlist
# Conflicts: # src/services/chains/evm/evmTransactionService.test.ts # src/services/chains/evm/evmTransactionService.ts
Register the Optimism Sepolia (11155420) testnet and its DonationHandler contract (0x0810d67AF8A815761C6E50A736aCd5EB0630606F) so staging can verify donations made through the newly deployed handler. The network is registered only when OPTIMISM_SEPOLIA_RPC_URL is set, so it stays isolated to opted-in environments (staging) and production never advertises, accepts, or verifies the testnet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dler Add Optimism Sepolia donation handler for staging
POST /api/donation-handler-logs scans DonationMade events emitted by the
DonationHandler contract(s) of an EVM network over a block range, so the
core reconciler cron can catch missed and headless donations without ever
touching an RPC itself.
- EvmTransactionService.getDonationHandlerLogs: getLogs over [fromBlock,
toBlock] filtered to the network's handler addresses (loops per address
since ethers v5 takes a single address; Polygon has two), decodes each
DonationMade log (recipient/token/amount) and enriches it with the tx
sender and block timestamp (cached per-tx/per-block). amount is returned
as a wei string (bigint is not JSON-serializable).
- Omitting fromBlock/toBlock returns the current head only ("latest-only"
mode), letting the caller seed its per-chain cursor with no historical
scan. toBlock is clamped to the head; span capped at 10k blocks (Joi).
- EVM-only guard; unknown/non-EVM networks -> 400 BlockchainError.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses CodeRabbit review on the block-range logs endpoint: - Fail the scan instead of emitting corrupt records: a missing getBlock or getTransaction result now throws a NETWORK_ERROR BlockchainError rather than returning blockTimestamp:0 (mis-dates the donation) or from:'' (silently drops it). The core reconciler catches per-chain and retries the range next run. - Bound enrichment RPC concurrency: de-duplicate the unique block numbers and tx hashes, then fetch them via a small mapWithConcurrency worker pool (cap 8) instead of unbounded serial round trips, so a wide range with many events can't blow the request timeout. - Add focused evmTransactionService tests for getDonationHandlerLogs: native/ERC-20 decoding, head clamping, chronological sorting, block/tx lookup de-duplication, multi-handler scanning, provider failures (missing block/tx), unsupported network, latest-only mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…point Add DonationMade block-range logs endpoint (giveth-v6-core#393)
kkatusic
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.