Created
April 24, 2019 16:36
-
-
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
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.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