August 2018
Intermediate to advanced
404 pages
11h 19m
English
Libraries are commonly used for code reusability. They are similar to contracts and the functions in a library are invoked using delegatecall. This allows the code to run from the caller's context and storage. Library functions can also be called directly if they do not modify the state.
Calls to library functions act like calls to an external contract (delegatecall). This is true for all cases except for library functions marked as internal. These functions are invoked with the internal calling convention (JUMP) in EVM.