Address
0x2cd1fc99b9d8a036f22a8ea6120211b16e8fade4Current Holdings
$74.47
TXs sent
not counted
First Active
2026-06-28
block 26,894,552
Last Active
33 days ago
block 27,288,986
Funded By
not identified
Net worth historyi
18 snapshots · to block 27,480,474coverage change 26 Augcoverage change 27 Augcoverage change 27 Augcoverage change 27 Augcoverage change 27 Aug
partial matchAirdropHelpersolc 0.8.20+commit.a1b79de6runtime partial · creation partial
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function burn(uint256 amount) external;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
}
abstract contract Ownable is Context {
address private _owner;
address private _proposedOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event NewOwnerProposed(address indexed proposedNewOwner);
constructor () {
_owner = _msgSender();
emit OwnershipTransferred(address(0), _owner);
}
function owner() public view virtual returns (address) {
return _owner;
}
function proposedNewOwner() public view returns (address) {
return _proposedOwner;
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
modifier onlyProposedOwner() {
require(proposedNewOwner() == _msgSender(), "Ownable: caller is not the proposed owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function proposeNewOwner(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit NewOwnerProposed(newOwner);
_proposedOwner = newOwner;
}
function acceptOwnership() public virtual onlyProposedOwner {
require(_proposedOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, _proposedOwner);
_owner = _proposedOwner;
_proposedOwner = address(0);
}
}
contract AirdropHelper is Ownable {
// Event emitted when an airdrop is executed
event AirdropExecuted(
address tokenAddress,
uint256 totalAmount,
address[] recipients,
uint256[] amounts
);
/**
* @dev Execute an airdrop of ERC20 tokens
* @param tokenAddress The address of the ERC20 token to airdrop
* @param recipients Array of recipient addresses
* @param multipliers Array of point multipliers for each recipient
* @param totalAmount Total amount of tokens to distribute
*/
function executeAirdrop(
address tokenAddress,
address[] calldata recipients,
uint256[] calldata multipliers,
uint256 totalAmount
) external onlyOwner {
require(recipients.length > 0, "No recipients provided");
require(recipients.length == multipliers.length, "Arrays length mismatch");
IERC20 token = IERC20(tokenAddress);
// Calculate total points
uint256 totalPoints = 0;
for (uint256 i = 0; i < multipliers.length; i++) {
totalPoints += multipliers[i];
}
require(totalPoints > 0, "Total points must be greater than zero");
// Calculate and transfer tokens to each recipient
uint256[] memory amounts = new uint256[](recipients.length);
for (uint256 i = 0; i < recipients.length; i++) {
// Calculate amount based on points
amounts[i] = (totalAmount * multipliers[i]) / totalPoints;
// Transfer tokens to recipient
require(token.transfer(recipients[i], amounts[i]), "Token transfer failed");
}
// Emit event
emit AirdropExecuted(tokenAddress, totalAmount, recipients, amounts);
}
/**
* @dev Recover any ERC20 tokens sent to the contract
* @param tokenAddress The address of the ERC20 token to recover
* @param amount The amount of tokens to recover
*/
function recoverERC20(address tokenAddress, uint256 amount) external onlyOwner {
IERC20 token = IERC20(tokenAddress);
require(token.transfer(owner(), amount), "Token recovery failed");
}
}