ETHSender

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.26;

contract ETHSender {
    address public addr;
    address public owner;
        
    constructor(address _addr) {
        require(_addr != address(0), "Bad Address");
        addr = _addr;
        owner = msg.sender;
    }
    
    modifier onlyOwner() {
        require(msg.sender == owner, "Not authorized Access");
        _;
    }
    
    function setaddr(address _newaddr) external onlyOwner {
        require(_newaddr != address(0), "Invalid target address");
        addr = _newaddr;
    }
    
    function sendETH() external payable returns (bool) {
        require(msg.value > 0, "nothing");
        
        (bool done, ) = addr.call{value: msg.value}("");
        
        return done;
    }
    
    receive() external payable {}
}

Tags:
addr:0xfd3524cdd389633544bab2d7987e3f58b4692edc|verified:true|block:23661594|tx:0x34b817893ce11df10e04a3c54d8bc2b9db64d9601b6abbb9a15e12980904682a|first_check:1761484853

Submitted on: 2025-10-26 14:20:53

Comments

Log in to comment.

No comments yet.