Skip to content

Add external library support#630

Merged
anishnaik merged 10 commits intomasterfrom
dev/add-external-library-support
Jun 5, 2025
Merged

Add external library support#630
anishnaik merged 10 commits intomasterfrom
dev/add-external-library-support

Conversation

@priyankabose
Copy link
Copy Markdown
Contributor

Overview

This PR adds support for external libraries in Medusa, allowing for proper deployment, linking, and testing of contracts that depend on external Solidity libraries.

Key Changes

  • Added infrastructure to identify and map library dependencies between contracts
  • Implemented topological sorting algorithm for determining correct deployment order
  • Created bytecode linking functionality to replace library placeholders with deployed addresses
  • Updated test chain deployment process to respect library dependency order

Testing

  • Added test contracts in fuzzing/testdata/contracts/external_library/ demonstrating various library dependency scenarios
  • Test contracts include multi-level dependencies (libraries depending on other libraries)
  • Tests validate correct library deployment order and proper function execution through dependencies

Copy link
Copy Markdown
Collaborator

@anishnaik anishnaik left a comment

Choose a reason for hiding this comment

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

bing bong

@anishnaik anishnaik merged commit f7d132b into master Jun 5, 2025
1 of 9 checks passed
@anishnaik anishnaik deleted the dev/add-external-library-support branch June 5, 2025 18:48
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