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": []
}
}}
Submitted on: 2025-11-07 14:06:53
Comments
Log in to comment.
No comments yet.