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 {}
}
Submitted on: 2025-10-26 14:20:53
Comments
Log in to comment.
No comments yet.