Contract

0xB8B464C7bEaBb50D38e145982a523E2F14765bd2

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Burn Token6890062024-12-19 11:53:4245 hrs ago1734609222IN
0xB8B464C7...F14765bd2
0 S0.000051231.1
Burn Token5763862024-12-18 15:39:212 days ago1734536361IN
0xB8B464C7...F14765bd2
0 S0.000088871.1

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
tokenBurner

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at SonicScan.org on 2024-12-16
*/

// SPDX-License-Identifier: MIT
// File: @openzeppelin/[email protected]/utils/Context.sol


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// File: @openzeppelin/[email protected]/access/Ownable.sol


// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;


/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// File: @openzeppelin/[email protected]/token/ERC20/IERC20.sol


// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

// File: contracts/tokenBurner.sol

pragma solidity ^0.8.16;

contract tokenBurner is Ownable {
    address public immutable tokenAddress = 0x4EEC869d847A6d13b0F6D1733C5DEC0d1E741B4f;
    address public constant DEAD_WALLET = 0x000000000000000000000000000000000000dEaD;

    uint256 public totalTokenBurned;
    
    event TokensBurned(uint256 amount);
    
    constructor(address initialOwner) Ownable() {    }
    
    function burnToken(uint256 amount) external onlyOwner {
        require(amount > 0, "Amount must be greater than 0");
        
        IERC20 token = IERC20(tokenAddress);
        uint256 contractBalance = token.balanceOf(address(this));
        require(contractBalance >= amount, "Insufficient balance in contract");
        
        require(token.transfer(DEAD_WALLET, amount), "Transfer failed");
        
        totalTokenBurned += amount;
        emit TokensBurned(amount);
    }
    
    function getContractBalance() external view returns (uint256) {
        return IERC20(tokenAddress).balanceOf(address(this));
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensBurned","type":"event"},{"inputs":[],"name":"DEAD_WALLET","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getContractBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052734eec869d847a6d13b0f6d1733c5dec0d1e741b4f60805234801561002857600080fd5b50604051610718380380610718833981016040819052610047916100a6565b61005033610056565b506100d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100b857600080fd5b81516001600160a01b03811681146100cf57600080fd5b9392505050565b60805161061a6100fe6000396000818160f80152818161014e015261024c015261061a6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b146100ce5780639d76ea58146100f3578063a01c34831461011a578063f2fde38b1461012357600080fd5b80632221466c1461008d5780636f9fb98a146100a9578063715018a6146100b15780637b47ec1a146100bb575b600080fd5b61009660015481565b6040519081526020015b60405180910390f35b610096610136565b6100b96101c6565b005b6100b96100c9366004610539565b6101da565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100a0565b6100db7f000000000000000000000000000000000000000000000000000000000000000081565b6100db61dead81565b6100b9610131366004610552565b610416565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561019d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c19190610582565b905090565b6101ce61048f565b6101d860006104e9565b565b6101e261048f565b600081116102375760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064015b60405180910390fd5b6040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156102a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c49190610582565b9050828110156103165760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e742062616c616e636520696e20636f6e7472616374604482015260640161022e565b60405163a9059cbb60e01b815261dead6004820152602481018490526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610365573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610389919061059b565b6103c75760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b604482015260640161022e565b82600160008282546103d991906105bd565b90915550506040518381527f6ef4855b666dcc7884561072e4358b28dfe01feb1b7f4dcebc00e62d50394ac79060200160405180910390a1505050565b61041e61048f565b6001600160a01b0381166104835760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161022e565b61048c816104e9565b50565b6000546001600160a01b031633146101d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161022e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561054b57600080fd5b5035919050565b60006020828403121561056457600080fd5b81356001600160a01b038116811461057b57600080fd5b9392505050565b60006020828403121561059457600080fd5b5051919050565b6000602082840312156105ad57600080fd5b8151801515811461057b57600080fd5b808201808211156105de57634e487b7160e01b600052601160045260246000fd5b9291505056fea26469706673582212201b885e7b73010eabd962c09978de6bdfd1f02802f0e0c550c0d06ff933f1ac6b64736f6c634300081000330000000000000000000000000ca5bb48c8e2bdffce8fc15534bcfd5c39abadd0

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b146100ce5780639d76ea58146100f3578063a01c34831461011a578063f2fde38b1461012357600080fd5b80632221466c1461008d5780636f9fb98a146100a9578063715018a6146100b15780637b47ec1a146100bb575b600080fd5b61009660015481565b6040519081526020015b60405180910390f35b610096610136565b6100b96101c6565b005b6100b96100c9366004610539565b6101da565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100a0565b6100db7f0000000000000000000000004eec869d847a6d13b0f6d1733c5dec0d1e741b4f81565b6100db61dead81565b6100b9610131366004610552565b610416565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000004eec869d847a6d13b0f6d1733c5dec0d1e741b4f6001600160a01b0316906370a0823190602401602060405180830381865afa15801561019d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c19190610582565b905090565b6101ce61048f565b6101d860006104e9565b565b6101e261048f565b600081116102375760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064015b60405180910390fd5b6040516370a0823160e01b81523060048201527f0000000000000000000000004eec869d847a6d13b0f6d1733c5dec0d1e741b4f906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156102a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c49190610582565b9050828110156103165760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e742062616c616e636520696e20636f6e7472616374604482015260640161022e565b60405163a9059cbb60e01b815261dead6004820152602481018490526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610365573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610389919061059b565b6103c75760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b604482015260640161022e565b82600160008282546103d991906105bd565b90915550506040518381527f6ef4855b666dcc7884561072e4358b28dfe01feb1b7f4dcebc00e62d50394ac79060200160405180910390a1505050565b61041e61048f565b6001600160a01b0381166104835760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161022e565b61048c816104e9565b50565b6000546001600160a01b031633146101d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161022e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561054b57600080fd5b5035919050565b60006020828403121561056457600080fd5b81356001600160a01b038116811461057b57600080fd5b9392505050565b60006020828403121561059457600080fd5b5051919050565b6000602082840312156105ad57600080fd5b8151801515811461057b57600080fd5b808201808211156105de57634e487b7160e01b600052601160045260246000fd5b9291505056fea26469706673582212201b885e7b73010eabd962c09978de6bdfd1f02802f0e0c550c0d06ff933f1ac6b64736f6c63430008100033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000ca5bb48c8e2bdffce8fc15534bcfd5c39abadd0

-----Decoded View---------------
Arg [0] : initialOwner (address): 0x0CA5bb48C8E2bDFfCE8FC15534BCFd5C39aBadd0

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000ca5bb48c8e2bdffce8fc15534bcfd5c39abadd0


Deployed Bytecode Sourcemap

6548:1016:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6765:31;;;;;;;;;160:25:1;;;148:2;133:18;6765:31:0;;;;;;;;7426:133;;;:::i;2814:103::-;;;:::i;:::-;;6918:496;;;;;;:::i;:::-;;:::i;2173:87::-;2219:7;2246:6;-1:-1:-1;;;;;2246:6:0;2173:87;;;-1:-1:-1;;;;;545:32:1;;;527:51;;515:2;500:18;2173:87:0;381:203:1;6587:82:0;;;;;6676:80;;6714:42;6676:80;;3072:201;;;;;;:::i;:::-;;:::i;7426:133::-;7506:45;;-1:-1:-1;;;7506:45:0;;7545:4;7506:45;;;527:51:1;7479:7:0;;7513:12;-1:-1:-1;;;;;7506:30:0;;;;500:18:1;;7506:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7499:52;;7426:133;:::o;2814:103::-;2059:13;:11;:13::i;:::-;2879:30:::1;2906:1;2879:18;:30::i;:::-;2814:103::o:0;6918:496::-;2059:13;:11;:13::i;:::-;7000:1:::1;6991:6;:10;6983:52;;;::::0;-1:-1:-1;;;6983:52:0;;1271:2:1;6983:52:0::1;::::0;::::1;1253:21:1::0;1310:2;1290:18;;;1283:30;1349:31;1329:18;;;1322:59;1398:18;;6983:52:0::1;;;;;;;;;7128:30;::::0;-1:-1:-1;;;7128:30:0;;7152:4:::1;7128:30;::::0;::::1;527:51:1::0;7078:12:0::1;::::0;7056::::1;::::0;-1:-1:-1;;;;;7128:15:0;::::1;::::0;::::1;::::0;500:18:1;;7128:30:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7102:56;;7196:6;7177:15;:25;;7169:70;;;::::0;-1:-1:-1;;;7169:70:0;;1629:2:1;7169:70:0::1;::::0;::::1;1611:21:1::0;;;1648:18;;;1641:30;1707:34;1687:18;;;1680:62;1759:18;;7169:70:0::1;1427:356:1::0;7169:70:0::1;7268:35;::::0;-1:-1:-1;;;7268:35:0;;6714:42:::1;7268:35;::::0;::::1;1962:51:1::0;2029:18;;;2022:34;;;-1:-1:-1;;;;;7268:14:0;::::1;::::0;::::1;::::0;1935:18:1;;7268:35:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7260:63;;;::::0;-1:-1:-1;;;7260:63:0;;2551:2:1;7260:63:0::1;::::0;::::1;2533:21:1::0;2590:2;2570:18;;;2563:30;-1:-1:-1;;;2609:18:1;;;2602:45;2664:18;;7260:63:0::1;2349:339:1::0;7260:63:0::1;7364:6;7344:16;;:26;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;7386:20:0::1;::::0;160:25:1;;;7386:20:0::1;::::0;148:2:1;133:18;7386:20:0::1;;;;;;;6972:442;;6918:496:::0;:::o;3072:201::-;2059:13;:11;:13::i;:::-;-1:-1:-1;;;;;3161:22:0;::::1;3153:73;;;::::0;-1:-1:-1;;;3153:73:0;;3122:2:1;3153:73:0::1;::::0;::::1;3104:21:1::0;3161:2;3141:18;;;3134:30;3200:34;3180:18;;;3173:62;-1:-1:-1;;;3251:18:1;;;3244:36;3297:19;;3153:73:0::1;2920:402:1::0;3153:73:0::1;3237:28;3256:8;3237:18;:28::i;:::-;3072:201:::0;:::o;2338:132::-;2219:7;2246:6;-1:-1:-1;;;;;2246:6:0;798:10;2402:23;2394:68;;;;-1:-1:-1;;;2394:68:0;;3529:2:1;2394:68:0;;;3511:21:1;;;3548:18;;;3541:30;3607:34;3587:18;;;3580:62;3659:18;;2394:68:0;3327:356:1;3433:191:0;3507:16;3526:6;;-1:-1:-1;;;;;3543:17:0;;;-1:-1:-1;;;;;;3543:17:0;;;;;;3576:40;;3526:6;;;;;;;3576:40;;3507:16;3576:40;3496:128;3433:191;:::o;196:180:1:-;255:6;308:2;296:9;287:7;283:23;279:32;276:52;;;324:1;321;314:12;276:52;-1:-1:-1;347:23:1;;196:180;-1:-1:-1;196:180:1:o;589:286::-;648:6;701:2;689:9;680:7;676:23;672:32;669:52;;;717:1;714;707:12;669:52;743:23;;-1:-1:-1;;;;;795:31:1;;785:42;;775:70;;841:1;838;831:12;775:70;864:5;589:286;-1:-1:-1;;;589:286:1:o;880:184::-;950:6;1003:2;991:9;982:7;978:23;974:32;971:52;;;1019:1;1016;1009:12;971:52;-1:-1:-1;1042:16:1;;880:184;-1:-1:-1;880:184:1:o;2067:277::-;2134:6;2187:2;2175:9;2166:7;2162:23;2158:32;2155:52;;;2203:1;2200;2193:12;2155:52;2235:9;2229:16;2288:5;2281:13;2274:21;2267:5;2264:32;2254:60;;2310:1;2307;2300:12;2693:222;2758:9;;;2779:10;;;2776:133;;;2831:10;2826:3;2822:20;2819:1;2812:31;2866:4;2863:1;2856:15;2894:4;2891:1;2884:15;2776:133;2693:222;;;;:::o

Swarm Source

ipfs://1b885e7b73010eabd962c09978de6bdfd1f02802f0e0c550c0d06ff933f1ac6b

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.