Discover more of SonicScan Block Explorer's tools and services in one place.
Contract Source Code:
File 1 of 1 : Greeter
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; contract Greeter { string public name; address public owner; event NameChanged(string oldName, string newName); modifier onlyOwner() { require(msg.sender == owner, "Only the owner can perform this action"); _; } constructor(string memory _initialName) { name = _initialName; owner = msg.sender; } function changeName(string memory _newName) external onlyOwner { string memory oldName = name; name = _newName; emit NameChanged(oldName, _newName); } function greet() external view returns (string memory) { return string(abi.encodePacked("Hello, ", name, "!")); } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.