Description:
Smart contract deployed on Ethereum.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.29;
interface IERC20 {
function transfer(address to, uint256 amount) external returns (bool);
}
contract MultiTokenBurner {
address public owner;
// Token and Pair Addresses
struct TokenPair {
address token;
address pair;
}
TokenPair[] public tokenPairs;
modifier onlyOwner() {
require(msg.sender == owner, "Not owner");
_;
}
constructor() {
owner = msg.sender;
// Initialize all token pairs
tokenPairs.push(TokenPair(0x52b954e988c7Baa8F6DcD8B36Ff8cd231F01fbB1, 0x54cE08aBCEc80B6838A61104569C0d0ACd8e2Ee0)); // SONIC
tokenPairs.push(TokenPair(0x2cdCE6F390C181632d749E52e75AFA838b204D20, 0x9FF139f6F2984Fd64a6d65349Dc7AC3ea554f08C)); // SUPERBOWL
tokenPairs.push(TokenPair(0xF5F930520cCfC5Db89C15013E1F5Bb3E81ae784C, 0x6E1AEfb7D7f0d2FF5E75352dd34C05D5C6Ac13c4)); // SHIKUZA
tokenPairs.push(TokenPair(0x6E1AEfb7D7f0d2FF5E75352dd34C05D5C6Ac13c4, 0x02Fe45EA8A07B3c08A901Cc58C53d300dbF5d848)); // BATSHIB
tokenPairs.push(TokenPair(0x2615e47a9372ba141128c585B63Eb6418a91d017, 0xAFBb342B404aC8aD4Ea8C50Ef60f738d194Ff9ce)); // CZI
tokenPairs.push(TokenPair(0xb00E075BB49ac2d248C78202252217b6A8C2bAcb, 0x80300b56B8435CbE3233e499D9983b61D053b307)); // NEKORAI
}
// Main function to trigger all token transfers
function triggerAllBurns() external onlyOwner {
for (uint i = 0; i < tokenPairs.length; i++) {
bool success = IERC20(tokenPairs[i].token).transfer(tokenPairs[i].pair, 1);
// Continue even if one fails to not block others
if (!success) {
// You could emit an event here for failed transfers
continue;
}
}
}
// Function to burn specific token by index
function burnSingleToken(uint index) external onlyOwner {
require(index < tokenPairs.length, "Invalid index");
bool success = IERC20(tokenPairs[index].token).transfer(tokenPairs[index].pair, 1);
require(success, "Token transfer failed");
}
// Add new token pair
function addTokenPair(address token, address pair) external onlyOwner {
tokenPairs.push(TokenPair(token, pair));
}
// Remove token pair by index
function removeTokenPair(uint index) external onlyOwner {
require(index < tokenPairs.length, "Invalid index");
tokenPairs[index] = tokenPairs[tokenPairs.length - 1];
tokenPairs.pop();
}
// Get total number of token pairs
function getTokenPairCount() external view returns (uint) {
return tokenPairs.length;
}
// Allow owner to withdraw any tokens sent to this contract by accident
function withdrawToken(address token, uint256 amount) external onlyOwner {
IERC20(token).transfer(owner, amount);
}
// Transfer ownership if needed
function transferOwnership(address newOwner) external onlyOwner {
owner = newOwner;
}
}
Submitted on: 2025-10-17 09:52:45
Comments
Log in to comment.
No comments yet.