Counter

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "contracts/Counter.sol": {
      "content": "/**
 *Submitted for verification at Etherscan.io on 2022-12-15
 */

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

contract Counter {
    uint public count;

    // Function to get the current count
    function get() public view returns (uint) {
        return count;
    }

    // Function to increment count by 1
    function inc() public {
        count += 1;
    }

    // Function to decrement count by 1
    function dec() public {
        // This function will fail if count = 0
        count -= 1;
    }
}"
    }
  },
  "settings": {
    "evmVersion": "paris",
    "optimizer": {
      "enabled": false,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    }
  }
}}

Tags:
Factory|addr:0x45c99e434d17e1d85ebef958e021af678e5162f4|verified:true|block:23711853|tx:0x6f5f864b62f47d619d4aba7c258cfdc9b583aad1f9f5fd868c6b8b92925c4b79|first_check:1762092672

Submitted on: 2025-11-02 15:11:14

Comments

Log in to comment.

No comments yet.