BasicMath

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/BasicMath.sol": {
      "content": "// SPDX-License-Identifier: MIT\r
pragma solidity ^0.8.0;\r
\r
contract BasicMath {\r
    uint256 constant MAX_INT = type(uint256).max;\r
\r
    function adder(uint256 _a, uint256 _b) external pure returns (uint256 sum, bool error) {\r
        if (_b > MAX_INT - _a) {\r
            return (0, true); // Overflow occurred\r
        }\r
        return (_a + _b, false);\r
    }\r
\r
    function subtractor(uint256 _a, uint256 _b) external pure returns (uint256 difference, bool error) {\r
        if (_b > _a) {\r
            return (0, true); // Underflow occurred\r
        }\r
        return (_a - _b, false);\r
    }\r
}"
    }
  },
  "settings": {
    "evmVersion": "prague",
    "metadata": {
      "bytecodeHash": "ipfs"
    },
    "optimizer": {
      "enabled": false,
      "runs": 200
    },
    "remappings": [],
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    }
  }
}}

Tags:
Factory|addr:0xbcec75bb28d00f8783a73faec890d49e7ca8054b|verified:true|block:23720171|tx:0x197c592140daeed39f6c99c70f9a821f34a69b2a1dbf465bdd1099fc84f4ce48|first_check:1762189493

Submitted on: 2025-11-03 18:04:54

Comments

Log in to comment.

No comments yet.