Description:
Smart contract deployed on Ethereum with Factory features.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"john.sol": {
"content": "// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.23;
interface IBasicContractTest {
function adder(
uint _a,
uint _b
) external returns (uint result, bool success);
function subtractor(
uint _a,
uint _b
) external returns (uint result, bool success);
}
contract SafeMathContract is IBasicContractTest {
function adder(
uint _a,
uint _b
) external pure override returns (uint result, bool success) {
if (type(uint).max - _a < _b) {
return (0, true);
} else {
result = _a + _b;
return (result, false);
}
}
function subtractor(
uint _a,
uint _b
) external pure override returns (uint result, bool success) {
if (_b > _a) {
return (0, true);
} else {
result = _a - _b;
return (result, false);
}
}
}"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": []
}
}}
Submitted on: 2025-10-30 18:18:14
Comments
Log in to comment.
No comments yet.