S Price: $0.461347 (+5.51%)

Contract

0x1DD853Efe213E28565B0121D448358483025f110

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

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

Contract Source Code Verified (Exact Match)

Contract Name:
Storage

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
No with 200 runs

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

// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.8.2 <0.9.0;

/**
 * @title Storage
 * @dev Store & retrieve value in a variable
 * @custom:dev-run-script ./scripts/deploy_with_ethers.ts
 */
contract Storage {

    uint256 number;

    event TestLog(uint256 indexed num);
    /**
     * @dev Store value in variable
     * @param num value to store
     */
    function store(uint256 num) public {
        number = num;
        emit TestLog(num);
    }

    function store2(uint256 num) public returns(uint256){
        number = num;
        emit TestLog(num);
        return number + 1;
    }

    /**
     * @dev Return value 
     * @return value of 'number'
     */
    function retrieve() public view returns (uint256){
        return number;
    }
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"num","type":"uint256"}],"name":"TestLog","type":"event"},{"inputs":[],"name":"retrieve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"num","type":"uint256"}],"name":"store","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"num","type":"uint256"}],"name":"store2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

6080604052348015600e575f80fd5b506102548061001c5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c806327f151f5146100435780632e64cec1146100735780636057361d14610091575b5f80fd5b61005d6004803603810190610058919061016b565b6100ad565b60405161006a91906101a5565b60405180910390f35b61007b6100f6565b60405161008891906101a5565b60405180910390f35b6100ab60048036038101906100a6919061016b565b6100fe565b005b5f815f81905550817fc9a2166775dcce465c3dc43d6ad4e991fef0c0cb017ad4533430a332a10276f960405160405180910390a260015f546100ef91906101eb565b9050919050565b5f8054905090565b805f81905550807fc9a2166775dcce465c3dc43d6ad4e991fef0c0cb017ad4533430a332a10276f960405160405180910390a250565b5f80fd5b5f819050919050565b61014a81610138565b8114610154575f80fd5b50565b5f8135905061016581610141565b92915050565b5f602082840312156101805761017f610134565b5b5f61018d84828501610157565b91505092915050565b61019f81610138565b82525050565b5f6020820190506101b85f830184610196565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6101f582610138565b915061020083610138565b9250828201905080821115610218576102176101be565b5b9291505056fea26469706673582212204c886c86c3cea469c1aaf27e2b0ec8c1877b62ed69142ad9376533ab3958f1c864736f6c634300081a0033

Deployed Bytecode

0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c806327f151f5146100435780632e64cec1146100735780636057361d14610091575b5f80fd5b61005d6004803603810190610058919061016b565b6100ad565b60405161006a91906101a5565b60405180910390f35b61007b6100f6565b60405161008891906101a5565b60405180910390f35b6100ab60048036038101906100a6919061016b565b6100fe565b005b5f815f81905550817fc9a2166775dcce465c3dc43d6ad4e991fef0c0cb017ad4533430a332a10276f960405160405180910390a260015f546100ef91906101eb565b9050919050565b5f8054905090565b805f81905550807fc9a2166775dcce465c3dc43d6ad4e991fef0c0cb017ad4533430a332a10276f960405160405180910390a250565b5f80fd5b5f819050919050565b61014a81610138565b8114610154575f80fd5b50565b5f8135905061016581610141565b92915050565b5f602082840312156101805761017f610134565b5b5f61018d84828501610157565b91505092915050565b61019f81610138565b82525050565b5f6020820190506101b85f830184610196565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6101f582610138565b915061020083610138565b9250828201905080821115610218576102176101be565b5b9291505056fea26469706673582212204c886c86c3cea469c1aaf27e2b0ec8c1877b62ed69142ad9376533ab3958f1c864736f6c634300081a0033

Deployed Bytecode Sourcemap

208:591:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;489:139;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;715:81;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;387:94;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;489:139;533:7;561:3;552:6;:12;;;;588:3;580:12;;;;;;;;;;619:1;610:6;;:10;;;;:::i;:::-;603:17;;489:139;;;:::o;715:81::-;756:7;782:6;;775:13;;715:81;:::o;387:94::-;442:3;433:6;:12;;;;469:3;461:12;;;;;;;;;;387:94;:::o;88:117:1:-;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:329::-;749:6;798:2;786:9;777:7;773:23;769:32;766:119;;;804:79;;:::i;:::-;766:119;924:1;949:53;994:7;985:6;974:9;970:22;949:53;:::i;:::-;939:63;;895:117;690:329;;;;:::o;1025:118::-;1112:24;1130:5;1112:24;:::i;:::-;1107:3;1100:37;1025:118;;:::o;1149:222::-;1242:4;1280:2;1269:9;1265:18;1257:26;;1293:71;1361:1;1350:9;1346:17;1337:6;1293:71;:::i;:::-;1149:222;;;;:::o;1377:180::-;1425:77;1422:1;1415:88;1522:4;1519:1;1512:15;1546:4;1543:1;1536:15;1563:191;1603:3;1622:20;1640:1;1622:20;:::i;:::-;1617:25;;1656:20;1674:1;1656:20;:::i;:::-;1651:25;;1699:1;1696;1692:9;1685:16;;1720:3;1717:1;1714:10;1711:36;;;1727:18;;:::i;:::-;1711:36;1563:191;;;;:::o

Swarm Source

ipfs://4c886c86c3cea469c1aaf27e2b0ec8c1877b62ed69142ad9376533ab3958f1c8

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

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.