Skip to content

Move SCL Linked Lib to Embedded#39

Open
hanzel98 wants to merge 1 commit intomainfrom
chore/link-to-embedded-scl-library
Open

Move SCL Linked Lib to Embedded#39
hanzel98 wants to merge 1 commit intomainfrom
chore/link-to-embedded-scl-library

Conversation

@hanzel98
Copy link
Contributor

@hanzel98 hanzel98 commented Dec 19, 2024

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.sol that we need into our local repository and changed the visibility of its function verify from public to internal.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants