Enable linking libraries in deployContract() #2564
Unanswered
pistomat
asked this question in
Idea / Feature Request
Replies: 1 comment 1 reply
-
is that supported today? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Viem currently does not support linking libraries on deployment. Compiled ABI include
linkReferences
list of placeholders in bytecode that should be replaced with an address of a deployed library. Hardhat with Ethers has this feature already:https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-ethers#library-linking
It would be great if Viem also had this support. The logic should be pretty straightforward, replace the placeholder listed in
linkReferences
in a for loop with supplied addresses.More context:
https://docs.soliditylang.org/en/latest/using-the-compiler.html#library-linking
Beta Was this translation helpful? Give feedback.
All reactions