Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move SCL Linked Lib to Embedded #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

@hanzel98 hanzel98 requested a review from a team as a code owner December 19, 2024 15:51
@hanzel98 hanzel98 self-assigned this Dec 19, 2024
@@ -0,0 +1,52 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd add a comment in the code itself about why we've copied it to this repo and the changes made

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