S Price: $0.435249 (+6.02%)

Contract

0x96e79A4ae6e5AD8F69EbAe08880fF26A0fe8E08A

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Change Name25831262025-01-05 12:42:2536 days ago1736080945IN
0x96e79A4a...A0fe8E08A
0 S0.000037641.1

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

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x1788309f...F51502e3e
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Greeter

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at SonicScan.org on 2025-01-05
*/

// 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, "!"));
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_initialName","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"oldName","type":"string"},{"indexed":false,"internalType":"string","name":"newName","type":"string"}],"name":"NameChanged","type":"event"},{"inputs":[{"internalType":"string","name":"_newName","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"greet","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561000f575f80fd5b506004361061004a575f3560e01c806306fdde031461004e5780635353a2d81461006c5780638da5cb5b14610088578063cfae3217146100a6575b5f80fd5b6100566100c4565b604051610063919061038b565b60405180910390f35b610086600480360381019061008191906104e8565b61014f565b005b6100906102b5565b60405161009d919061056e565b60405180910390f35b6100ae6102da565b6040516100bb919061038b565b60405180910390f35b5f80546100d0906105b4565b80601f01602080910402602001604051908101604052809291908181526020018280546100fc906105b4565b80156101475780601f1061011e57610100808354040283529160200191610147565b820191905f5260205f20905b81548152906001019060200180831161012a57829003601f168201915b505050505081565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d590610654565b60405180910390fd5b5f8080546101eb906105b4565b80601f0160208091040260200160405190810160405280929190818152602001828054610217906105b4565b80156102625780601f1061023957610100808354040283529160200191610262565b820191905f5260205f20905b81548152906001019060200180831161024557829003601f168201915b50505050509050815f90816102779190610818565b507f6c20b91d1723b78732eba64ff11ebd7966a6e4af568a00fa4f6b72c20f58b02a81836040516102a99291906108e7565b60405180910390a15050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60605f6040516020016102ed9190610a3a565b604051602081830303815290604052905090565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561033857808201518184015260208101905061031d565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61035d82610301565b610367818561030b565b935061037781856020860161031b565b61038081610343565b840191505092915050565b5f6020820190508181035f8301526103a38184610353565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6103fa82610343565b810181811067ffffffffffffffff82111715610419576104186103c4565b5b80604052505050565b5f61042b6103ab565b905061043782826103f1565b919050565b5f67ffffffffffffffff821115610456576104556103c4565b5b61045f82610343565b9050602081019050919050565b828183375f83830152505050565b5f61048c6104878461043c565b610422565b9050828152602081018484840111156104a8576104a76103c0565b5b6104b384828561046c565b509392505050565b5f82601f8301126104cf576104ce6103bc565b5b81356104df84826020860161047a565b91505092915050565b5f602082840312156104fd576104fc6103b4565b5b5f82013567ffffffffffffffff81111561051a576105196103b8565b5b610526848285016104bb565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6105588261052f565b9050919050565b6105688161054e565b82525050565b5f6020820190506105815f83018461055f565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806105cb57607f821691505b6020821081036105de576105dd610587565b5b50919050565b7f4f6e6c7920746865206f776e65722063616e20706572666f726d2074686973205f8201527f616374696f6e0000000000000000000000000000000000000000000000000000602082015250565b5f61063e60268361030b565b9150610649826105e4565b604082019050919050565b5f6020820190508181035f83015261066b81610632565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026106ce7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610693565b6106d88683610693565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61071c610717610712846106f0565b6106f9565b6106f0565b9050919050565b5f819050919050565b61073583610702565b61074961074182610723565b84845461069f565b825550505050565b5f90565b61075d610751565b61076881848461072c565b505050565b5b8181101561078b576107805f82610755565b60018101905061076e565b5050565b601f8211156107d0576107a181610672565b6107aa84610684565b810160208510156107b9578190505b6107cd6107c585610684565b83018261076d565b50505b505050565b5f82821c905092915050565b5f6107f05f19846008026107d5565b1980831691505092915050565b5f61080883836107e1565b9150826002028217905092915050565b61082182610301565b67ffffffffffffffff81111561083a576108396103c4565b5b61084482546105b4565b61084f82828561078f565b5f60209050601f831160018114610880575f841561086e578287015190505b61087885826107fd565b8655506108df565b601f19841661088e86610672565b5f5b828110156108b557848901518255600182019150602085019450602081019050610890565b868310156108d257848901516108ce601f8916826107e1565b8355505b6001600288020188555050505b505050505050565b5f6040820190508181035f8301526108ff8185610353565b905081810360208301526109138184610353565b90509392505050565b5f81905092915050565b7f48656c6c6f2c20000000000000000000000000000000000000000000000000005f82015250565b5f61095a60078361091c565b915061096582610926565b600782019050919050565b5f815461097c816105b4565b610986818661091c565b9450600182165f81146109a057600181146109b5576109e7565b60ff19831686528115158202860193506109e7565b6109be85610672565b5f5b838110156109df578154818901526001820191506020810190506109c0565b838801955050505b50505092915050565b7f21000000000000000000000000000000000000000000000000000000000000005f82015250565b5f610a2460018361091c565b9150610a2f826109f0565b600182019050919050565b5f610a448261094e565b9150610a508284610970565b9150610a5b82610a18565b91508190509291505056fea264697066735822122066c050cc8806c4a40ab73a3f34cc87edd4cc670667246b8068e2c7dbef98c79664736f6c63430008160033

Deployed Bytecode Sourcemap

61:709:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85:18;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;448:182;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;110:20;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;640:127;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;85:18;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;448:182::-;251:5;;;;;;;;;;;237:19;;:10;:19;;;229:70;;;;;;;;;;;;:::i;:::-;;;;;;;;;522:21:::1;546:4:::0;522:28:::1;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;568:8;561:4;:15;;;;;;:::i;:::-;;592:30;604:7;613:8;592:30;;;;;;;:::i;:::-;;;;;;;;511:119;448:182:::0;:::o;110:20::-;;;;;;;;;;;;;:::o;640:127::-;680:13;748:4;720:38;;;;;;;;:::i;:::-;;;;;;;;;;;;;706:53;;640:127;:::o;7:99:1:-;59:6;93:5;87:12;77:22;;7:99;;;:::o;112:169::-;196:11;230:6;225:3;218:19;270:4;265:3;261:14;246:29;;112:169;;;;:::o;287:246::-;368:1;378:113;392:6;389:1;386:13;378:113;;;477:1;472:3;468:11;462:18;458:1;453:3;449:11;442:39;414:2;411:1;407:10;402:15;;378:113;;;525:1;516:6;511:3;507:16;500:27;349:184;287:246;;;:::o;539:102::-;580:6;631:2;627:7;622:2;615:5;611:14;607:28;597:38;;539:102;;;:::o;647:377::-;735:3;763:39;796:5;763:39;:::i;:::-;818:71;882:6;877:3;818:71;:::i;:::-;811:78;;898:65;956:6;951:3;944:4;937:5;933:16;898:65;:::i;:::-;988:29;1010:6;988:29;:::i;:::-;983:3;979:39;972:46;;739:285;647:377;;;;:::o;1030:313::-;1143:4;1181:2;1170:9;1166:18;1158:26;;1230:9;1224:4;1220:20;1216:1;1205:9;1201:17;1194:47;1258:78;1331:4;1322:6;1258:78;:::i;:::-;1250:86;;1030:313;;;;:::o;1349:75::-;1382:6;1415:2;1409:9;1399:19;;1349:75;:::o;1430:117::-;1539:1;1536;1529:12;1553:117;1662:1;1659;1652:12;1676:117;1785:1;1782;1775:12;1799:117;1908:1;1905;1898:12;1922:180;1970:77;1967:1;1960:88;2067:4;2064:1;2057:15;2091:4;2088:1;2081:15;2108:281;2191:27;2213:4;2191:27;:::i;:::-;2183:6;2179:40;2321:6;2309:10;2306:22;2285:18;2273:10;2270:34;2267:62;2264:88;;;2332:18;;:::i;:::-;2264:88;2372:10;2368:2;2361:22;2151:238;2108:281;;:::o;2395:129::-;2429:6;2456:20;;:::i;:::-;2446:30;;2485:33;2513:4;2505:6;2485:33;:::i;:::-;2395:129;;;:::o;2530:308::-;2592:4;2682:18;2674:6;2671:30;2668:56;;;2704:18;;:::i;:::-;2668:56;2742:29;2764:6;2742:29;:::i;:::-;2734:37;;2826:4;2820;2816:15;2808:23;;2530:308;;;:::o;2844:146::-;2941:6;2936:3;2931;2918:30;2982:1;2973:6;2968:3;2964:16;2957:27;2844:146;;;:::o;2996:425::-;3074:5;3099:66;3115:49;3157:6;3115:49;:::i;:::-;3099:66;:::i;:::-;3090:75;;3188:6;3181:5;3174:21;3226:4;3219:5;3215:16;3264:3;3255:6;3250:3;3246:16;3243:25;3240:112;;;3271:79;;:::i;:::-;3240:112;3361:54;3408:6;3403:3;3398;3361:54;:::i;:::-;3080:341;2996:425;;;;;:::o;3441:340::-;3497:5;3546:3;3539:4;3531:6;3527:17;3523:27;3513:122;;3554:79;;:::i;:::-;3513:122;3671:6;3658:20;3696:79;3771:3;3763:6;3756:4;3748:6;3744:17;3696:79;:::i;:::-;3687:88;;3503:278;3441:340;;;;:::o;3787:509::-;3856:6;3905:2;3893:9;3884:7;3880:23;3876:32;3873:119;;;3911:79;;:::i;:::-;3873:119;4059:1;4048:9;4044:17;4031:31;4089:18;4081:6;4078:30;4075:117;;;4111:79;;:::i;:::-;4075:117;4216:63;4271:7;4262:6;4251:9;4247:22;4216:63;:::i;:::-;4206:73;;4002:287;3787:509;;;;:::o;4302:126::-;4339:7;4379:42;4372:5;4368:54;4357:65;;4302:126;;;:::o;4434:96::-;4471:7;4500:24;4518:5;4500:24;:::i;:::-;4489:35;;4434:96;;;:::o;4536:118::-;4623:24;4641:5;4623:24;:::i;:::-;4618:3;4611:37;4536:118;;:::o;4660:222::-;4753:4;4791:2;4780:9;4776:18;4768:26;;4804:71;4872:1;4861:9;4857:17;4848:6;4804:71;:::i;:::-;4660:222;;;;:::o;4888:180::-;4936:77;4933:1;4926:88;5033:4;5030:1;5023:15;5057:4;5054:1;5047:15;5074:320;5118:6;5155:1;5149:4;5145:12;5135:22;;5202:1;5196:4;5192:12;5223:18;5213:81;;5279:4;5271:6;5267:17;5257:27;;5213:81;5341:2;5333:6;5330:14;5310:18;5307:38;5304:84;;5360:18;;:::i;:::-;5304:84;5125:269;5074:320;;;:::o;5400:225::-;5540:34;5536:1;5528:6;5524:14;5517:58;5609:8;5604:2;5596:6;5592:15;5585:33;5400:225;:::o;5631:366::-;5773:3;5794:67;5858:2;5853:3;5794:67;:::i;:::-;5787:74;;5870:93;5959:3;5870:93;:::i;:::-;5988:2;5983:3;5979:12;5972:19;;5631:366;;;:::o;6003:419::-;6169:4;6207:2;6196:9;6192:18;6184:26;;6256:9;6250:4;6246:20;6242:1;6231:9;6227:17;6220:47;6284:131;6410:4;6284:131;:::i;:::-;6276:139;;6003:419;;;:::o;6428:141::-;6477:4;6500:3;6492:11;;6523:3;6520:1;6513:14;6557:4;6554:1;6544:18;6536:26;;6428:141;;;:::o;6575:93::-;6612:6;6659:2;6654;6647:5;6643:14;6639:23;6629:33;;6575:93;;;:::o;6674:107::-;6718:8;6768:5;6762:4;6758:16;6737:37;;6674:107;;;;:::o;6787:393::-;6856:6;6906:1;6894:10;6890:18;6929:97;6959:66;6948:9;6929:97;:::i;:::-;7047:39;7077:8;7066:9;7047:39;:::i;:::-;7035:51;;7119:4;7115:9;7108:5;7104:21;7095:30;;7168:4;7158:8;7154:19;7147:5;7144:30;7134:40;;6863:317;;6787:393;;;;;:::o;7186:77::-;7223:7;7252:5;7241:16;;7186:77;;;:::o;7269:60::-;7297:3;7318:5;7311:12;;7269:60;;;:::o;7335:142::-;7385:9;7418:53;7436:34;7445:24;7463:5;7445:24;:::i;:::-;7436:34;:::i;:::-;7418:53;:::i;:::-;7405:66;;7335:142;;;:::o;7483:75::-;7526:3;7547:5;7540:12;;7483:75;;;:::o;7564:269::-;7674:39;7705:7;7674:39;:::i;:::-;7735:91;7784:41;7808:16;7784:41;:::i;:::-;7776:6;7769:4;7763:11;7735:91;:::i;:::-;7729:4;7722:105;7640:193;7564:269;;;:::o;7839:73::-;7884:3;7839:73;:::o;7918:189::-;7995:32;;:::i;:::-;8036:65;8094:6;8086;8080:4;8036:65;:::i;:::-;7971:136;7918:189;;:::o;8113:186::-;8173:120;8190:3;8183:5;8180:14;8173:120;;;8244:39;8281:1;8274:5;8244:39;:::i;:::-;8217:1;8210:5;8206:13;8197:22;;8173:120;;;8113:186;;:::o;8305:543::-;8406:2;8401:3;8398:11;8395:446;;;8440:38;8472:5;8440:38;:::i;:::-;8524:29;8542:10;8524:29;:::i;:::-;8514:8;8510:44;8707:2;8695:10;8692:18;8689:49;;;8728:8;8713:23;;8689:49;8751:80;8807:22;8825:3;8807:22;:::i;:::-;8797:8;8793:37;8780:11;8751:80;:::i;:::-;8410:431;;8395:446;8305:543;;;:::o;8854:117::-;8908:8;8958:5;8952:4;8948:16;8927:37;;8854:117;;;;:::o;8977:169::-;9021:6;9054:51;9102:1;9098:6;9090:5;9087:1;9083:13;9054:51;:::i;:::-;9050:56;9135:4;9129;9125:15;9115:25;;9028:118;8977:169;;;;:::o;9151:295::-;9227:4;9373:29;9398:3;9392:4;9373:29;:::i;:::-;9365:37;;9435:3;9432:1;9428:11;9422:4;9419:21;9411:29;;9151:295;;;;:::o;9451:1395::-;9568:37;9601:3;9568:37;:::i;:::-;9670:18;9662:6;9659:30;9656:56;;;9692:18;;:::i;:::-;9656:56;9736:38;9768:4;9762:11;9736:38;:::i;:::-;9821:67;9881:6;9873;9867:4;9821:67;:::i;:::-;9915:1;9939:4;9926:17;;9971:2;9963:6;9960:14;9988:1;9983:618;;;;10645:1;10662:6;10659:77;;;10711:9;10706:3;10702:19;10696:26;10687:35;;10659:77;10762:67;10822:6;10815:5;10762:67;:::i;:::-;10756:4;10749:81;10618:222;9953:887;;9983:618;10035:4;10031:9;10023:6;10019:22;10069:37;10101:4;10069:37;:::i;:::-;10128:1;10142:208;10156:7;10153:1;10150:14;10142:208;;;10235:9;10230:3;10226:19;10220:26;10212:6;10205:42;10286:1;10278:6;10274:14;10264:24;;10333:2;10322:9;10318:18;10305:31;;10179:4;10176:1;10172:12;10167:17;;10142:208;;;10378:6;10369:7;10366:19;10363:179;;;10436:9;10431:3;10427:19;10421:26;10479:48;10521:4;10513:6;10509:17;10498:9;10479:48;:::i;:::-;10471:6;10464:64;10386:156;10363:179;10588:1;10584;10576:6;10572:14;10568:22;10562:4;10555:36;9990:611;;;9953:887;;9543:1303;;;9451:1395;;:::o;10852:514::-;11013:4;11051:2;11040:9;11036:18;11028:26;;11100:9;11094:4;11090:20;11086:1;11075:9;11071:17;11064:47;11128:78;11201:4;11192:6;11128:78;:::i;:::-;11120:86;;11253:9;11247:4;11243:20;11238:2;11227:9;11223:18;11216:48;11281:78;11354:4;11345:6;11281:78;:::i;:::-;11273:86;;10852:514;;;;;:::o;11372:148::-;11474:11;11511:3;11496:18;;11372:148;;;;:::o;11526:157::-;11666:9;11662:1;11654:6;11650:14;11643:33;11526:157;:::o;11689:400::-;11849:3;11870:84;11952:1;11947:3;11870:84;:::i;:::-;11863:91;;11963:93;12052:3;11963:93;:::i;:::-;12081:1;12076:3;12072:11;12065:18;;11689:400;;;:::o;12119:874::-;12222:3;12259:5;12253:12;12288:36;12314:9;12288:36;:::i;:::-;12340:89;12422:6;12417:3;12340:89;:::i;:::-;12333:96;;12460:1;12449:9;12445:17;12476:1;12471:166;;;;12651:1;12646:341;;;;12438:549;;12471:166;12555:4;12551:9;12540;12536:25;12531:3;12524:38;12617:6;12610:14;12603:22;12595:6;12591:35;12586:3;12582:45;12575:52;;12471:166;;12646:341;12713:38;12745:5;12713:38;:::i;:::-;12773:1;12787:154;12801:6;12798:1;12795:13;12787:154;;;12875:7;12869:14;12865:1;12860:3;12856:11;12849:35;12925:1;12916:7;12912:15;12901:26;;12823:4;12820:1;12816:12;12811:17;;12787:154;;;12970:6;12965:3;12961:16;12954:23;;12653:334;;12438:549;;12226:767;;12119:874;;;;:::o;12999:151::-;13139:3;13135:1;13127:6;13123:14;13116:27;12999:151;:::o;13156:400::-;13316:3;13337:84;13419:1;13414:3;13337:84;:::i;:::-;13330:91;;13430:93;13519:3;13430:93;:::i;:::-;13548:1;13543:3;13539:11;13532:18;;13156:400;;;:::o;13562:801::-;13893:3;13915:148;14059:3;13915:148;:::i;:::-;13908:155;;14080:92;14168:3;14159:6;14080:92;:::i;:::-;14073:99;;14189:148;14333:3;14189:148;:::i;:::-;14182:155;;14354:3;14347:10;;13562:801;;;;:::o

Swarm Source

ipfs://66c050cc8806c4a40ab73a3f34cc87edd4cc670667246b8068e2c7dbef98c796

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.