delegation-framework
delegation-framework copied to clipboard
Move SCL Linked Lib to Embedded
What?
- Moving the Linked SCL Library to embedded.
Why?
Context: Libraries with public functions are automatically deployed on the network, and then the bytecode of the contract that needs the library requires the library's address to know where to find it, libraries with internal functions don't get deployed. This mechanism is implemented to save money on deployments and decrease the code size.
- Extra considerations: Embedded libraries will be more expensive to deploy since the code is included with every contract deployment, but it will be cheaper to execute the code. Linked libraries will be the opposite, they'll make the contract deployments more affordable since you aren't redeploying that bytecode, but using them also increases execution costs due to the extra delegatecalls into the Linked Library
How?
- Copied the code of the specific
libSCL_RIP7212.solthat we need into our local repository and changed the visibility of its function verify from public to internal.