Description:
Smart contract deployed on Ethereum with Factory features.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"1.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
}\r
"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": []
}
}}
Submitted on: 2025-11-01 17:25:06
Comments
Log in to comment.
No comments yet.