Skip to content
View justzulya's full-sized avatar

Block or report justzulya

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
justzulya/README.md

// 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);
}

}

Popular repositories Loading

  1. justzulya justzulya Public

    Config files for my GitHub profile.

    28

  2. Zu Zu Public

    Zulya - Kodz

    24

  3. keys keys Public

    16

  4. key key Public

    16

  5. main- main- Public

    16