Verified contractExactMIT
BasicMath
Address0xa6184911a4fc7c2846c7b4d7cbb72be5abcae98c
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.30
- Same code
4 more contracts
Details
- Compiler
- solc 0.8.30+commit.73712a01
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 23,597,210
- Creation transaction
- 0xa90e9acd73…ad8d651c47
1.BasicMath.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract BasicMath {
function adder(uint256 _a, uint256 _b) public pure returns (uint256, bool) {
// 오버플로우 체크 로직 구현
if (_a > type(uint256).max - _b) {
return (0, true);
}
return (_a + _b, false);
}
function subtractor(uint256 _a, uint256 _b) public pure returns (uint256, bool) {
// 언더플로우 체크 로직 구현
if (_a < _b) {
return (0, true);
}
return (_a - _b, false);
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.