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": {
    "optimizer": {
      "enabled": false,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "remappings": []
  }
}}

Tags:
Factory|addr:0x8b983b1fd1764a6894b70bd13d28f47497c809f2|verified:true|block:23747296|tx:0x9cdc889733c09a7b6aa7dd4ee969dbda3fbe2979de3c06f26785a61c8d09a41d|first_check:1762520811

Submitted on: 2025-11-07 14:06:53

Comments

Log in to comment.

No comments yet.