# Base Learn Roles - 1 > Base Learn Newcomer Contract Code: **Published by:** [timurlenk](https://paragraph.com/@timurlenk/) **Published on:** 2025-09-16 **Categories:** base **URL:** https://paragraph.com/@timurlenk/base-learn-roles-1 ## 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); } } } ## Publication Information - [timurlenk](https://paragraph.com/@timurlenk/): Publication homepage - [All Posts](https://paragraph.com/@timurlenk/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@timurlenk): Subscribe to updates - [Twitter](https://twitter.com/timurwp1): Follow on Twitter