Created
October 6, 2019 04:24
-
-
Save maurelian/d5ff93bc192ad18d48f1f7489248033b to your computer and use it in GitHub Desktop.
This file contains 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.5.9; | |
library Math { | |
function add(uint a, uint b) public returns (uint){ | |
return a + b; | |
} | |
} | |
contract UsesMath { | |
using Math for uint; | |
function foo(uint input) external { | |
input.add(100); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment