Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x269BD788...09B63Cc72 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
BasicMath
Compiler Version
v0.8.26+commit.8a97fa7a
Contract Source Code (Solidity)
/** *Submitted for verification at sepolia.basescan.org on 2024-08-25 */ // 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); } }
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"_a","type":"uint256"},{"internalType":"uint256","name":"_b","type":"uint256"}],"name":"adder","outputs":[{"internalType":"uint256","name":"sum","type":"uint256"},{"internalType":"bool","name":"error","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_a","type":"uint256"},{"internalType":"uint256","name":"_b","type":"uint256"}],"name":"subtractor","outputs":[{"internalType":"uint256","name":"difference","type":"uint256"},{"internalType":"bool","name":"error","type":"bool"}],"stateMutability":"pure","type":"function"}]
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610034575f3560e01c806306b034e9146100385780635270312a14610069575b5f80fd5b610052600480360381019061004d919061015a565b61009a565b6040516100609291906101c1565b60405180910390f35b610083600480360381019061007e919061015a565b6100f4565b6040516100919291906101c1565b60405180910390f35b5f80837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6100c89190610215565b8311156100db575f6001915091506100ed565b82846100e79190610248565b5f915091505b9250929050565b5f808383111561010a575f60019150915061011c565b82846101169190610215565b5f915091505b9250929050565b5f80fd5b5f819050919050565b61013981610127565b8114610143575f80fd5b50565b5f8135905061015481610130565b92915050565b5f80604083850312156101705761016f610123565b5b5f61017d85828601610146565b925050602061018e85828601610146565b9150509250929050565b6101a181610127565b82525050565b5f8115159050919050565b6101bb816101a7565b82525050565b5f6040820190506101d45f830185610198565b6101e160208301846101b2565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61021f82610127565b915061022a83610127565b9250828203905081811115610242576102416101e8565b5b92915050565b5f61025282610127565b915061025d83610127565b9250828201905080821115610275576102746101e8565b5b9291505056fea2646970667358221220382ed7be37475cabef71acd4e727a58af2ac02b098c14ab545c4e96472970d7c64736f6c634300081a0033
Deployed Bytecode Sourcemap
60:545:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;139:226;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;373:229;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;139:226;201:11;214:10;256:2;113:17;246:12;;;;:::i;:::-;241:2;:17;237:87;;;283:1;286:4;275:16;;;;;;237:87;347:2;342;:7;;;;:::i;:::-;351:5;334:23;;;;139:226;;;;;;:::o;373:229::-;440:18;460:10;492:2;487;:7;483:78;;;519:1;522:4;511:16;;;;;;483:78;584:2;579;:7;;;;:::i;:::-;588:5;571:23;;;;373:229;;;;;;:::o;88:117:1:-;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:474::-;758:6;766;815:2;803:9;794:7;790:23;786:32;783:119;;;821:79;;:::i;:::-;783:119;941:1;966:53;1011:7;1002:6;991:9;987:22;966:53;:::i;:::-;956:63;;912:117;1068:2;1094:53;1139:7;1130:6;1119:9;1115:22;1094:53;:::i;:::-;1084:63;;1039:118;690:474;;;;;:::o;1170:118::-;1257:24;1275:5;1257:24;:::i;:::-;1252:3;1245:37;1170:118;;:::o;1294:90::-;1328:7;1371:5;1364:13;1357:21;1346:32;;1294:90;;;:::o;1390:109::-;1471:21;1486:5;1471:21;:::i;:::-;1466:3;1459:34;1390:109;;:::o;1505:320::-;1620:4;1658:2;1647:9;1643:18;1635:26;;1671:71;1739:1;1728:9;1724:17;1715:6;1671:71;:::i;:::-;1752:66;1814:2;1803:9;1799:18;1790:6;1752:66;:::i;:::-;1505:320;;;;;:::o;1831:180::-;1879:77;1876:1;1869:88;1976:4;1973:1;1966:15;2000:4;1997:1;1990:15;2017:194;2057:4;2077:20;2095:1;2077:20;:::i;:::-;2072:25;;2111:20;2129:1;2111:20;:::i;:::-;2106:25;;2155:1;2152;2148:9;2140:17;;2179:1;2173:4;2170:11;2167:37;;;2184:18;;:::i;:::-;2167:37;2017:194;;;;:::o;2217:191::-;2257:3;2276:20;2294:1;2276:20;:::i;:::-;2271:25;;2310:20;2328:1;2310:20;:::i;:::-;2305:25;;2353:1;2350;2346:9;2339:16;;2374:3;2371:1;2368:10;2365:36;;;2381:18;;:::i;:::-;2365:36;2217:191;;;;:::o
Swarm Source
ipfs://382ed7be37475cabef71acd4e727a58af2ac02b098c14ab545c4e96472970d7c
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.