0

I'm currently working on a Solidity project that involves using external libraries. I need to access the address of an external library within my contract.

Is there a way to retrieve an external library's address in Solidity?

I've gone through the Solidity documentation but couldn't find a direct way to obtain the address of an external library.

Thank you in advance for your help!

1 Answer 1

0

And yet ! Docs most of the time do have the answer.

Here it is:

external libraries addresses

This : https://docs.soliditylang.org/en/v0.8.21/contracts.html#libraries

and this : https://docs.soliditylang.org/en/v0.8.21/contracts.html#function-signatures-and-selectors-in-libraries

should give you all you need to find your answer. However I think that instead of finding the address of an external library maybe you could just use its code and deploy it with your contracts ?

1
  • 1
    Thanks! It works!
    – InterNos
    Aug 23 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.