Skip to content

Instantly share code, notes, and snippets.

@Eyongkevin
Created April 24, 2019 16:36
Show Gist options
  • Select an option

  • Save Eyongkevin/65c02d2ce9a2a9374ae282fb07677862 to your computer and use it in GitHub Desktop.

Select an option

Save Eyongkevin/65c02d2ce9a2a9374ae282fb07677862 to your computer and use it in GitHub Desktop.
This solidity file contain code that uses the library from the file libraryF.sol
pragma solidity ^0.4.24;
import {count} from './libraryF.sol';
contract Math{
using count for count.hold;
using count for uint;
count.hold h;
mapping(uint => count.hold) hh;
constructor() public {
hh[0] = count.hold(10);
}
function add(uint a, uint b) public pure returns(uint){
return a.addUint(b);
}
function subHold(uint a) public view returns(uint){
return hh[0].subUint(a);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment