matter-labs / era-compiler-solidity

Solidity compiler for ZKsync
https://github.com/matter-labs/era-compiler-solidity
Apache License 2.0
61 stars 21 forks source link

Add support for deploy-time linking #102

Open Karrq opened 1 week ago

Karrq commented 1 week ago

🌟 Feature Request

📝 Description

This features request is to port the existing solc support for deploy-time linking into zksolc. solc achieves this by leaving placeholders in the bytecode to be filled in later (via itself or otherwise).

🤔 Rationale

It allows tooling such as foundry and hardhat to deploy libraries in a temporary environment and link them to the contracts in use, without having to recompile everything, greatly improving UX.

📋 Additional Context

This feature request comes from investigating the following issue on foundry-zksync: https://github.com/matter-labs/foundry-zksync/issues/382

hedgar2017 commented 1 week ago

Hey @Karrq, thank you for this request!

We're currently migrating to our new LLVM-based assembler and linker, and will think how to design this properly on our instruction set.