Created
September 9, 2021 17:32
-
-
Save josefrichter/3d4adaec4322c5eb1cfce5bf49b2c0ab to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=undefined&optimize=false&runs=200&gist=
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
import "./SafeMath.sol"; | |
// import "./Math.sol"; | |
// library Math { | |
// function divide(uint256 a, uint256 b) internal pure returns (uint256) { | |
// require(b > 0); | |
// uint256 c = a / b; | |
// return c; | |
// } | |
// } | |
contract MyContract { | |
using SafeMath for uint256; | |
uint256 public value; | |
function calculate(uint256 _value1, uint256 _value2) public { | |
value = _value1.div(_value2); | |
// value = Math.divide(_value1, _value2); | |
// value = _value1 / _value2; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment