Skip to content

Instantly share code, notes, and snippets.

@MASDXI
Last active April 4, 2022 11:52
Show Gist options
  • Save MASDXI/e6edb38fad097ef31bc0c764d85ee627 to your computer and use it in GitHub Desktop.
Save MASDXI/e6edb38fad097ef31bc0c764d85ee627 to your computer and use it in GitHub Desktop.
RTLO smart contract
// SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
contract Calculator {
function add(uint256 x, uint256 y) public pure returns (uint256) {
/* start function*/
require(x + y >= x);
return /*first number*/x + y/*second number*/
/* end function*/;
}
function sub(uint256 x, uint256 y) public pure returns (uint256) {
/* start function*/
require(y <= x);
return /*bigger number*/x - y/*samller number*/
/* end function*/;
}
function subRTL(uint256 x, uint256 y) public pure returns (uint256) {
/* start function*/
require(y <= x);
return /*bigger number‮/*rebmun rellams*/y - x/*
‭/*end function */;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment