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
pragma solidity ^0.8.0;
contract BasicMath {
uint256 constant MAX_INT = type(uint256).max;
function adder(uint256 _a, uint256 _b) external pure returns (uint256 sum, bool error) {
if (_b > MAX_INT - _a) {
return (0, true); // Overflow occurred
}
return (_a + _b, false);
}
function subtractor(uint256 _a, uint256 _b) external pure returns (uint256 difference, bool error) {
if (_b > _a) {
return (0, true); // Underflow occurred
}
return (_a - _b, false);
}
}"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": []
}
}}
Submitted on: 2025-10-29 20:28:43
Comments
Log in to comment.
No comments yet.