-
-
Save casweeney/70b11daba1788a7593010926ecca3d59 to your computer and use it in GitHub Desktop.
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
uint256 constant SALARY=20000; | |
struct Workers{ | |
uint8 count; | |
string name; | |
} | |
library Arithmetic{ | |
function add(uint a,uint b) internal pure returns(uint){ | |
return a+b; | |
} | |
function constructStruct(Workers storage w, uint8 _c,string memory _n,uint256 id,mapping(uint=>Workers) storage workers) internal { | |
w=workers[id]; | |
w.count=_c; | |
w.name=_n; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment