Skip to content

Release 7 Oct. - #30

Merged
laurenluz merged 10 commits into
mainfrom
staging
Oct 7, 2026
Merged

laurenluz merged 10 commits into
mainfrom
staging

Conversation

@RamRamez

@RamRamez RamRamez commented Oct 7, 2026

Copy link
Copy Markdown
Member

No description provided.

ae2079 and others added 10 commits May 4, 2026 20:41
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)
@laurenluz
laurenluz merged commit 6819ed8 into main Oct 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants