Skip to content

Instantly share code, notes, and snippets.

@maurelian
Created October 6, 2019 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maurelian/d5ff93bc192ad18d48f1f7489248033b to your computer and use it in GitHub Desktop.
Save maurelian/d5ff93bc192ad18d48f1f7489248033b to your computer and use it in GitHub Desktop.
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