TokenDisperse
0x2e2e31ff2aecb12b6728d5dd0e4737ec09717735
Verification
Verified
0.8.28+commit.7893614a
Type
Contract
602 bytes
ABI entries
3
0 read · 1 write
License
none
Contract information
- Address
- 0x2e2e31ff2aecb12b6728d5dd0e4737ec09717735
- Chain
- Robinhood Chain (4663)
- Compiler
- 0.8.28+commit.7893614a
- Optimization
- Enabled
- Creator
- 0xf43cEA6eF9…46fF5cD044
- Creation tx
- 0x02e7ef7a06…750b105764
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": [],
"name": "LenMismatch",
"type": "error"
},
{
"inputs": [],
"name": "TransferFailed",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "address[]",
"name": "recipients",
"type": "address[]"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "disperseTokenSimple",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
interface IERC20Lite {
function transferFrom(address from, address to, uint256 amount) external returns (bool);
function transfer(address to, uint256 amount) external returns (bool);
}
/// @notice One-tx ERC20 airdrop helper (approve once, then disperse).
contract TokenDisperse {
error LenMismatch();
error TransferFailed();
function disperseTokenSimple(address token, address[] calldata recipients, uint256 amount)
external
{
uint256 n = recipients.length;
if (n == 0) revert LenMismatch();
uint256 total = amount * n;
if (!IERC20Lite(token).transferFrom(msg.sender, address(this), total)) revert TransferFailed();
for (uint256 i; i < n; ++i) {
if (!IERC20Lite(token).transfer(recipients[i], amount)) revert TransferFailed();
}
}
}
Chain explorer2897msChain node87ms