SafeMathContract

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "TESTBASE2.sol": {
      "content": "// SPDX-License-Identifier: UNLICENSED\r
pragma solidity ^0.8.23;\r
\r
interface IBasicContractTest {\r
    function adder(\r
        uint _a,\r
        uint _b\r
    ) external returns (uint result, bool success);\r
\r
    function subtractor(\r
        uint _a,\r
        uint _b\r
    ) external returns (uint result, bool success);\r
}\r
\r
contract SafeMathContract is IBasicContractTest {\r
    function adder(\r
        uint _a,\r
        uint _b\r
    ) external pure override returns (uint result, bool success) {\r
        if (type(uint).max - _a < _b) {\r
            return (0, true);\r
        } else {\r
            result = _a + _b;\r
            return (result, false);\r
        }\r
    }\r
\r
    function subtractor(\r
        uint _a,\r
        uint _b\r
    ) external pure override returns (uint result, bool success) {\r
        if (_b > _a) {\r
            return (0, true);\r
        } else {\r
            result = _a - _b;\r
            return (result, false);\r
        }\r
    }\r
}"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": false,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "remappings": []
  }
}}

Tags:
Factory|addr:0x02b3973575b61752b70accc1e8e9b4bd47be6c59|verified:true|block:23683209|tx:0xbbcee6ad423621294dbe25caab09a6d9888d6d2f37b0e4ffb224ea280e533243|first_check:1761743238

Submitted on: 2025-10-29 14:07:18

Comments

Log in to comment.

No comments yet.