Created
August 11, 2022 05:44
-
-
Save Realkayzee/1947ebdd83dbfc3dfd64ab6f541bc02f 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