BatchPayer

0x6308d030b4278c028ff58db602d1e86d6a7ceed9

Verification
Verified
v0.8.24+commit.e11b9ed9
Type
Contract
340 bytes
ABI entries
1
0 read · 1 write
License
none

Contract information

Address
0x6308d030b4278c028ff58db602d1e86d6a7ceed9
Chain
Robinhood Chain (4663)
Compiler
v0.8.24+commit.e11b9ed9
Optimization
Enabled
Creation tx
0x0c417dad2e…26590f19f0

Token

Not a token

This contract does not expose ERC-20 metadata.

Read contract (0)

No read functions

The ABI is unavailable or exposes no view functions.

ABI

[
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "tracker",
        "type": "address"
      },
      {
        "internalType": "address[]",
        "name": "holders",
        "type": "address[]"
      }
    ],
    "name": "payMany",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]

Source code

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

interface IDividendTracker {
    function withdraw(address holder) external;
}

/// @title  BatchPayer — a gas-saving payout *trigger* for the MEMEDEX DividendTracker.
/// @notice STATELESS, PERMISSIONLESS, and NON-CUSTODIAL. This contract holds no funds and has no privileges.
///         The only thing it can do is call the DividendTracker's already-public `withdraw(holder)`, which pays
///         that holder everything they are owed straight to THEIR OWN wallet — the destination is fixed inside
///         the (immutable) tracker and cannot be influenced from here. Therefore this contract can NEVER
///         withhold, redirect, pause, or drain anything. It exists only to speed up honest payouts by triggering
///         many `withdraw` calls in one transaction instead of rolling the tracker's append-only holder array
///         (which never removes sold-out wallets, so it bloats forever and wastes gas).
///
///         The tracker's security guarantees are untouched: any holder can still call `withdraw` on the tracker
///         themselves at any time, exactly as before. Nothing about "can't be paused/upgraded/drained" or
///         "no one can withhold, redirect, or withdraw what you're owed" changes — this only automates the
///         permissionless path that already exists.
contract BatchPayer {
    /// @notice Trigger `tracker.withdraw(holder)` for each address in `holders`. A per-holder try/catch means a
    ///         single holder whose reward token misbehaves (honeypot / paused / blacklist) is skipped rather than
    ///         reverting the whole batch — matching the fault-tolerance of the tracker's own `process()`.
    /// @param tracker The DividendTracker address.
    /// @param holders The wallets to pay (the keeper feeds in the CURRENT set of real holders each cycle).
    function payMany(address tracker, address[] calldata holders) external {
        IDividendTracker t = IDividendTracker(tracker);
        uint256 n = holders.length;
        for (uint256 i = 0; i < n; i++) {
            try t.withdraw(holders[i]) {} catch {
                // a misbehaving reward token for this holder is skipped; they can be retried next cycle or
                // self-withdraw. Never reverts the batch.
            }
        }
    }
}
Chain explorer2365msChain node85ms