Is there a way to get an external library address?
It is possible to obtain the address of a library by converting the library type to the
addresstype, i.e. using
As the compiler does not know the address where the library will be deployed, the compiled hex code will contain placeholders of the form
__$30bbc0abd4d6364515865950d3e0d10953$__. The placeholder is a 34 character prefix of the hex encoding of the keccak256 hash of the fully qualified library name, which would be for example
libraries/bigint.sol:BigIntif the library was stored in a file called
libraries/directory. Such bytecode is incomplete and should not be deployed. Placeholders need to be replaced with actual addresses. You can do that by either passing them to the compiler when the library is being compiled or by using the linker to update an already compiled binary.